* src/pic16/gen.c (genrshTwo): fixed sign extension
[fw/sdcc] / ChangeLog
1 2005-08-07 Raphael Neider <rneider AT web.de>
2
3         * src/pic16/gen.c (genrshTwo): fixed sign extension
4         * src/pic16/device.c: added pic18f2320, 4220 and 4320
5         * device/include/pic16/pic18f2220.h: changed some bit definitions,
6           added T0CONbits
7         * device/include/pic16/pic18f4220.h: NEW, header for
8           pic18f4220 and pic18f4320
9         * device/include/pic16/pic18fregs.h: added new devices,
10           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
11         * device/include/pic16/signal.h: resolved name clashes
12           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
13           to also allow testing for interrupt enable bits, added
14           comments on how to use the macros
15         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
16         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
17           register definitions for the devices
18         * device/lib/pic16/pics.all: added new devices
19         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
20           allocated memory
21         * device/lib/pic16/libc/stdlib/memfree: do not count
22           the block header as free memory
23         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
24           simplified and added missing end-of-blocklist-marker
25           (reported by Peter Onion, fixes #1252814)
26         * (_mergeHeapBlock): fixed loop condition
27         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
28           len==0, restructured code
29         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
30           up a bit, reduced bitfield accesses, prevent endless loops
31           in case of heap corruption
32         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
33           "unreferenced arguments/must return a value" warnings
34         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
35           replaced BAUDREG with SPBRG
36         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
37           device/lib/pic16/debug/gstack/gstack.c: replaced
38           _naked, _asm, _endasm with __naked, __asm, __endasm
39
40 2005-08-05 Raphael Neider <rneider AT web.de>
41
42         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
43           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
44
45 2005-08-05 Borut Razem <borut.razem AT siol.net>
46
47         * device/lib/Makefile.in: added missing ';'
48         * configure: removed ^M characters
49
50 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
51
52         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
53           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
54           License
55
56 2005-08-04 Borut Razem <borut.razem AT siol.net>
57
58         * configure.in: pic16 libraries build 2nd try - enable running
59           configure in device/lib/pic16
60         * configure: regenerated from configure.in
61         * device/lib/Makefile.in: create $(PORT)/bin directory
62
63 2005-08-03 Raphael Neider <rneider AT web.de>
64
65         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
66           to get/set values via pointers
67         * (genUnpackBits,genPackBits): changed detection of
68           ptr->bitfield vs. sym.bitfield, fixed access via generic
69           pointers, removed dead (wrong) code for multibyte bitfields
70         * (genNearPointerGet, genGenPointerGet): removed useless code,
71           fixed bitfield detection, fixes #1250594
72         * (genNearPointerSet): removed useless code
73         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
74           and introduced macro pic16_emitpcode that conditionally emits
75           the origin of the following pCode (useful for debugging SDCC)
76         * src/pic16/pcode.c: changed (and disabled) some debug outputs
77         * (createDefmap): fixed handling of LFSR for --optimize-df
78
79 2005-08-02 Borut Razem <borut.razem AT siol.net>
80
81         * device/lib/Makefile.in: pic16 libraries build enabled since
82           gputils-0.13.2 are now localy installed at sourceforge's compile farm
83
84 2005-08-02 Raphael Neider <rneider AT web.de>
85
86         * src/pic16/gen.c (genPackBits): removed deprecated warning
87         * (genGenPointerSet): fixed bitfield detection
88
89 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
90
91         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
92
93 2005-07-31 Raphael Neider <rneider AT web.de>
94
95         * device/lib/pic16/libdev/pic18f458.c,
96           device/include/pic16/pic18f458.h: added missing T0CONbits
97
98 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
99
100         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
101
102 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
103
104         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
105
106 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
107
108         * device/include/mcs51/at89c51ed2.h: added.
109
110 2005-07-23 Raphael Neider <rneider AT web.de>
111
112         * src/pic/gen.h: added emitpcode macro for debugging
113         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
114           and replace by macro adding debug information on demand
115         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
116         * (gencjne): tried to fix; replaced with correct (slower) code
117         * (gen{Unp,P}ackBits): fixed single bit access
118         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
119         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
120           previous instruction
121         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
122           register has to be handled with care (forbidding movement
123           of assignments/uses, removing assignments completely, ...)
124         * (pCodeOptime2pCodes): make use of regIsSpecial
125         * added lots of debugging output (commented out)
126         * src/pic/rallloc.c (deassignLRs): prevent operand registers
127           from being reused as result UNLESS it is known to work
128
129 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
130
131         * support/Util/dbuf.h: include <stddef.h> for size_t
132         * .version: changed to version 2.5.2
133
134 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
135
136         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
137
138 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
139
140         * src/hc08/gen.c (genMinus): fixed bug #1241835,
141           (genModOneByte): removed needless psha/pula
142
143 2005-07-22 Raphael Neider <rneider AT web.de>
144
145         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
146           have PIC14 handled like PIC16, fixes broken pic14 linker calls
147         * src/pic/gen.c (resolveIfx): do not "invent" labels
148         * (genSkipc): changed to positive logic
149         * (genSkipCond): removed as no longer needed
150         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
151           backport from PIC16
152         * (genLeftShift): check operands are in different registers
153         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
154           INCF does not update CARRY...
155         * src/pic/main.c: fixed _linkCmd
156         * src/pic/pcode.c (unlinkpCode): added inactive code
157         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
158           alive (do not assign result and operand overlapping registers)
159
160 2005-07-22 Raphael Neider <rneider AT web.de>
161
162         * src/pic/device.c (dump_sfr): replaced register declaration with
163           call to emitSymbolToFile() to avoid duplicate symbols
164         * (assignRelocatableRegisters): do not declare external symbols
165         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
166           right (take size of type, not etype)
167         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
168         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
169         * (packRegsForAccUse): disabled assignment of WREG as
170           the result reg to prevent occurence of just fixed #1235003,
171           fixes #1242954
172         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
173           symbols (avoids duplicate symbols in .asm file)
174         * (pic14emitRegularMap): use emitSymbolToFile()
175         * src/pic/gen.c (aopOp): fixed spillLocation handling
176         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
177         * (genDataPointerSet): removed unneccessary variables/output
178
179 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
180
181         * as/mcs51/lkarea.c: enlarged codemap for banked memory
182         * device/lib/mcs51/crtbank.asm: added # to 0x0F
183
184 2005-07-21 Raphael Neider <rneider AT web.de>
185
186         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
187           architecture cannot handle them efficiently, fixes bug #1235003
188         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
189           check for empty sets before using them (fixes bug #1232190)
190
191 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
192
193         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
194           (lnksect2): generate warnings for memory overlap
195         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
196           constseg to set the name of these segments so you can instruct the linker
197           to place them in banks
198         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
199         * src/SDCCglobl.h: added MODEL_HUGE to enum,
200           added code_seg and const_seg to options
201         * src/SDCCglue.c (emitMaps): use options.const_seg,
202           (createInterruptVect): put interrupt vectors in segment HOME,
203           (glue): put HOME before static segment and put the main glue in HOME,
204           (glue): use options.code_seg
205         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
206         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
207           these segments so you can instruct the linker to place them in banks
208           (linkEdit): use code_loc for HOME segment which should be the first
209           segment in code memory now
210         * src/SDCCmem.c: fixed more stuff like bug 1238386
211         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
212           (changePointer): don't change function pointers to code pointers for
213           banked functions,
214           (compareType): added exceptional check for banked function pointers
215         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
216         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
217           after static in code memory
218         * src/mcs51/gen.c: added aopLiteralLong prototype,
219           (aopForSym): use getSize for functions,
220           (genCall): generate banked calls over one trampoline __sdcc_banked_call
221           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
222           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
223           the segment,
224           (genPcall): use call for literal function pointers and generate banked
225           calls over the one trampoline so there's only one place for the user to
226           modify according to his/hers hardware,
227           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
228           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
229         * src/mcs51/main.c: added keyword banked,
230           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
231         * support/Util/SDCCerr.c,
232         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
233           needed for passing the bank and address to the trampoline
234         * device/lib/mcs51/crtbank.asm: added for bankswitching
235         * device/lib/mcs51/Makefile: added crtbank
236
237 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
238
239         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
240           for fields at offset 0 of a struct or union as reported
241           on 2005-07-07 in the developer mailing list.
242
243 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
244
245         * src/SDCCmem.c: fixed bug 1238386
246
247 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
248
249         * src/mcs51/peeph.def: added labelrefcounting for peepholes
250           (patch #1144962), added peephole 300, enabled 259.x
251         * doc/sdccman.lyx: removed screenshot and provided link instead
252
253 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
254
255         * doc/sdccman.lyx: added section about debugging with ddd
256         * doc/figures/ddd_example.eps: screenshot of debugging session
257
258 2005-07-04 Raphael Neider <rneider AT web.de>
259
260         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
261           like CODE pointers, fixes #1115683
262         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
263           call, fixes bugs #1232211, #1228110,
264           fixed wrong casts to pCodeFlow from pCodeInstructions
265
266 2005-07-04 Raphael Neider <rneider AT web.de>
267
268         * src/pic/gen.c (popGet): changed assert to allow for
269           bit operands
270         * (popGetAddr): changed signature to provide
271           an additional index, patched all call sites
272         * (genCmpEq): handle literal-like operands correctly
273         * (genAddrOf): added sanity checks on __code/__data pointers
274         * (genAssign): added handling of symbols from __code section
275         * (gencjne): do not generate code for comparisons whose result
276           is neither stored nor used, fixes bug #1171114
277         * (AccLsh, AccRsh): operate on operand instead of WREG
278         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
279           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
280           by known count
281         * rewrote complete shift-by-literal logic, commented unused
282           functions out
283         * (genConstPointerGet): get multiple bytes (if result size > 1),
284           fixed handling of non-immediate addresses
285         * (genPointerGet): handle CODE pointers like CONST pointers
286         * (genpic14Code): insert C-SRC lines as Cource-pCodes
287         * ({aop,op}_isLitLike): NEW, single place to decide whether an
288           operand is to be treated as a literal or not
289         * (mov2w,genPcall,genCmpEq),
290           src/pic/genarith.c: use aop_isLitLike() to decide between
291           literal/register contents
292         * (addSign): added missing offset
293         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
294           only emit comment in debug-mode,
295           use {aop,op}_isLitLike throughout the file
296         * src/pic/glue.c: fix initializers for pointers (work in progress)
297         * src/pic/pcode.c (get_op): honor index on _const symbols
298         * ({reset,dump}pCodeStatistics): NEW, estimate code size
299         * (dumppBlock): added pCode size estimation
300         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
301           check for IS_SYMOP before OP_SYMBOL'ing
302         * fixed indentation, compacted switch-statements
303         * (allocReg): find free register and allocate it instead of
304           allocating new registers all the time
305         * (deassignLRs): prevent POINTER_GET's from being assigned the same
306           registers as its operands (necessary only for multibyte GETs)
307
308 2005-07-01 Raphael Neider <rneider AT web.de>
309
310         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
311           debugging .asm-output macros FENTRY + FEXIT
312         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
313           way... I wonder...
314         * (emitpComment): NEW, printf to pCode
315         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
316           offset handling
317         * (popGetAddr): NEW, variant of popGet to access an immediates
318           high(er) bytes instead of the n'th byte of memory they reference,
319           replaced popGet with popGetAddr where neccessary
320         * (genDataPointerGet): reactivated and fixed implementation
321         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
322           accesses
323         * (genDataPointerSet): fixed multibyte assignments
324         * (genpic14Code): fixed --i-code-in-asm handling
325         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
326         * (genPlus): fixed index-out-of-bounds error
327         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
328         * src/pic/ralloc.c: added debugging output macro FENTRY2
329         * (spillThis): fixed indentation, enbraced for-body for clarity
330         * (rematStr): commented out as now unused
331         * (regTypeNum): commented out special spill case (overwrites
332           arbitrary values)
333         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
334
335 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
336
337         * doc/sdccman.lyx: documented sfr16/sfr32,
338           added example for using storage class with function pointers
339         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
340
341 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
342
343         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
344         * device/lib/_itoa.c,
345         * device/lib/_ltoa.c: optimized codesize
346         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
347           but don't know how to suppress the double warning.
348         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
349         * support/Util/SDCCerr.c,
350         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
351
352 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
353
354         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
355           fixed old K&R prototypes
356         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
357         * device/lib/_gptrget.c,
358         * device/lib/_gptrgetc.c,
359         * device/lib/_gptrput.c: changed versions for new memory indicator values,
360           also new versions for small generic pointers and banked generic pointers
361         * src/port.h: added const_name
362         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
363         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
364         * src/SDCCcse.c (findPrevIc): check all associative operators
365         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
366         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
367         * src/SDCCmem.c: updated comments,
368           set far-space to 0 for pdata, results in optimized code
369         * src/SDCCmem.h: added macro CONST_NAME
370         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
371           moving the info into the highest bits, see also gptrget/gptrput
372         * src/src.dsp: added sdcc.ico to project files
373         * src/avr/gen.c (genCast): fixed bug 0x%d
374         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
375         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
376           relation between ptr_type and DCL_TYPE,
377           (genCast): fixed bug 0x%d
378         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
379           (CODE)" for const_name
380         * src/hc08/gen.c (genCast): fixed bug 0x%d
381         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
382           (hc08_port): added "CONST (CODE)" for const_name
383         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
384           (aopForRemat, adjustArithmeticResult): disconnected direct relation
385           between ptr_type and DCL_TYPE,
386           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
387           operand* and took AOP() inside function so sfr-ness can be checked,
388           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
389           new prototype,
390           (genFunction, genEndFunction): optimized stack setup,
391           (genMinus): optimized for literals with ending zeroes (in bytes),
392           (genCast): fixed bug 0x%d
393         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
394           (mcs51_port): added "CONST (CODE)" for const_name
395         * src/mcs51/peeph.def: made rule 226 more generic
396         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
397         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
398         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
399         * src/z80/main.c (z80_port): added NULL for const_name,
400           (gbz80_port): added NULL for const_name
401         * support/regression/tests/bug663539.c,
402         * support/regression/tests/sfr16.c: new tests
403
404 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
405
406         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
407
408 2005-06-24 Raphael Neider <rneider AT web.de>
409
410         * device/lib/pic16/libdev/pic18f[68][567]20.c:
411           corrected typos...
412         * device/include/pic16/signal.h: added USBIF
413           and SIG_USB
414
415 2005-06-24 Raphael Neider <rneider AT web.de>
416
417         * device/lib/pic16/libdev/pic18f2455.c,
418           device/include/pic16/pic18f2455.h: NEW
419         * device/include/pic16/pic18fregs.h,
420           device/lib/pic16/pics.all,
421           src/pic16/device.c: added 18f2455
422         * device/lib/pic16/libdev/pic18f[68][567]20.c,
423           device/include/pic16/{pic18f[68][567].h,usart.h}:
424           replaced MULTIPLE_USARTS define with more relaible
425           compatibility sfrs (for USART access)
426
427 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
428
429         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
430           and the output asm file line is printed on two lines.
431
432 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
433
434         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
435           BGT, BLE, BHI, and BLS instructions
436         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
437           genCmpEq): removed
438         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
439           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
440           fixes bug #1216342
441         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
442
443 2005-06-15 Raphael Neider <rneider AT web.de>
444
445         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
446         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
447         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
448           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
449           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
450
451 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
452
453         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
454           Marcel Telka in bug #1215704
455
456 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
457
458         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
459           located in shared memory bank.
460
461 2005-05-31 Raphael Neider <rneider AT web.de>
462
463         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
464           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
465           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
466
467 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
468
469         * device/lib/_strncpy.c: fixed the fix
470
471 2005-05-26 Raphael Neider <rneider AT web.de>
472
473         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
474           initializers with \0, bug #1208187
475         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
476           intializers with \0, bug #1208187
477
478 2005-05-26 Raphael Neider <rneider AT web.de>
479
480         * src/pic16/glue.c (pic16_printIvalChar): fixed string
481           initializers with \0, bug #1208187
482         * src/pic16/main.c (_process_pragma): added sanity checks
483           for stack position and size, emit warnings when appropriate
484
485 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
486
487         * device/lib/_strncpy.c: fixed not filling with \0
488
489 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
490
491         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
492           createFunction),
493         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
494           compound_statement),
495         * src/SDCCsymt.h,
496         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
497
498 2005-05-24 Raphael Neider <rneider AT web.de>
499
500         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
501
502 2005-05-24 Raphael Neider <rneider AT web.de>
503
504         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
505           TRISE definitions, closes bug #1162453
506
507 2005-05-22 Raphael Neider <rneider AT web.de>
508
509         * src/pic16/main.c (_process_pragma): check for missing
510           arguments to pragmas code and udata
511         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
512           consistency fixes to match other headers (thanks to Jim Paris)
513         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
514
515 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
516
517         * src/SDCCicode.c (isOperandEqual): fixed missing ;
518
519 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
520
521         * support/regression/tests/bug1198642.c: new test
522         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
523         * src/SDCCcse.c (findPrevIc): added comment, please have a look
524         * support/scripts/resource.h,
525         * support/scripts/resource.rc,
526         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
527         * support/scripts/sdcc.ico: added 32x32 icon
528
529 2005-05-18 Raphael Neider <rneider AT web.de>
530
531         * device/lib/pic16/libdev/pic18f*.c,
532         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
533           keywords to "__sfr" and "__at (X)"
534         * device/include/pic16/pic18fregs.h: added pic18f4520
535         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
536           #1203088 (MPLAB compatibility)
537
538 2005-05-17 Raphael Neider <rneider AT web.de>
539
540         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
541         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
542         * device/lib/pic16/pics.all: added new devices
543         * src/pic16/device.c: added support for pic18f4520
544
545 2005-05-16 Raphael Neider <rneider AT web.de>
546         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
547         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
548         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
549           convenience function for bit access
550
551 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
552
553         * device/lib/printf_large.c: fixed bug 1193299
554         * support/regression/tests/bug1057979.c: added test %3.3s
555
556 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
557
558         * device/include/mcs51/8051.h,
559         * device/include/mcs51/8052.h: made parseable with lint
560         * device/include/mcs51/lint.h: added include file for (sp)lint
561         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
562         * doc/cdbfileformat.lyx,
563         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
564
565 2005-05-14 Raphael Neider <rneider AT web.de>
566
567         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
568         * device/lib/pic16/libc/stdlib/itoa.c (new)
569         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
570         * device/lib/pic16/libio/Makefile: exclude subdir according to
571           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
572         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
573         * src/pic16/gen.c (genFunction): prevent annoying warning
574         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
575           nameclashes on BeOS
576         * support/cpp2/cppmain.c (cpp_output_string): new
577         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
578           fixes bug 1116802
579
580 2005-05-13 Borut Razem <borut.razem AT siol.net>
581
582         * src/SDCCmain.c (linkEdit): fixed bug 1195202
583
584 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
585
586         * .version: changed to version 2.5.1; back to bleeding edge development
587
588 2005-05-11 Borut Razem <borut.razem AT siol.net>
589
590         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
591           generate PDF version 1.3 documents
592
593 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
594
595         * .version: changed to version 2.5.0
596
597 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
598
599         * doc/sdccman.lyx: updated weblinks, index and smaller updates
600
601 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
602
603         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
604         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
605         well as many smaller updates.
606         * .version: changed to version 2.5.0-pre1
607
608 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
609
610         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
611
612 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
613
614         * support/regression/tests/bug1185672.c: added
615         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
616           bug 1185672
617         * src/mcs51/gen.c (genCall): added comments, made it look safer
618         * src/mcs51/gen.c (genEndFunction): simplified
619
620 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
621
622         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
623
624 2005-04-14 Borut Razem <borut.razem AT siol.net>
625
626         * fixed bug 1045046 - SIGSEGV with really simple code?:
627           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
628           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
629
630 2005-04-14 Borut Razem <borut.razem AT siol.net>
631
632         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
633           src/pic16/device.h: temporarily disabled experimental #inline pragma
634           for 2.5.0 release
635
636 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
637
638         * device/include/z80/stdio.h,
639         * device/include/z80/string.h: removed these highly incomplete files so
640           SDCC can use the default ones in device/include/
641
642 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
643
644         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
645         gcc warning.
646         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
647         fix sdcpp warnings.
648
649 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
650
651         * device/include/malloc.h: removed redundant __reentrant prototypes
652         * device/lib/_mullong.c: added working xstack variant in asm (C version
653           doesn't pass regression tests)
654         * device/lib/bpx.c: used __data and made bpx char for mcs51
655         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
656           (createFunction): fixed bug with xstackPtr
657         * src/SDCCcse.c: corrected comments
658         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
659           (killDeadCode, eBBlockFromiCode): removed unused code
660         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
661           corrected comments
662         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
663           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
664           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
665           (genModOneByte): fixed warning in MSVC
666         * src/mcs51/main.c (): added comments
667         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
668
669 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
670
671         * src/SDCCmain.c (linkEdit): oops, changed one line too many
672
673 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
674
675         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
676
677 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
678
679         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
680         characters arrays of larger size than the declared one.
681
682 2005-04-10 Borut Razem <borut.razem AT siol.net>
683
684         * src/pic/gen.c (genInline),
685           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
686           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
687           (findNextInstruction), (findPrevInstruction),
688           (findInstructionUsingLabel),
689           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
690         * src/pic/pcode.c (findLabel): added missing '\n'
691         * src/src.dsp: added SDCCdwarf2.c to the project
692
693 2005-04-09 Borut Razem <borut.razem AT siol.net>
694
695         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
696
697 2005-04-08 Raphael Neider <rneider AT web.de>
698
699         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
700           into the chain after a given one) and mergeDefmapSymbols (combine
701           defmap entries for each symbol per pcode)
702         * (createDefmap): have defmap entries merged in the end
703         * (defmapReplaceSymRef): split defmap entries covering two accesses to
704           a symbol before replacing one access type's symbol, merge symbols in
705           the end (replacement symbol might already have an entry)
706         * (assignValnums): keep reference to written WREG intact
707
708 2005-04-08 Raphael Neider <rneider AT web.de>
709
710         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
711           Alpha)
712
713 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
714
715         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
716         bytes
717
718 2005-04-07 Raphael Neider <rneider AT web.de>
719
720         * device/include/pic16/usart.h: added compatibility defines for
721           devices with more than one USART
722         * device/include/pic16/pic18f[68][567]20.h: activated above defines
723
724 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
725
726         * device/lib/Makefile.in: updated for port specific include
727
728 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
729
730         * support/regression/ports/mcs51/spec.mk: added mcs51 include
731
732 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
733
734         * device/include/8051.h,
735         * device/include/8052.h,
736         * device/include/at89S8252.h,
737         * device/include/at89c55.h,
738         * device/include/at89x051.h,
739         * device/include/at89x51.h,
740         * device/include/at89x52.h,
741         * device/include/mcs51reg.h,
742         * device/include/reg51.h,
743         * device/include/reg764.h,
744         * device/include/regc515c.h,
745         * device/include/sab80515.h: (re)moved these 12 files
746         * device/include/mcs51/8051.h,
747         * device/include/mcs51/8052.h,
748         * device/include/mcs51/at89S8252.h,
749         * device/include/mcs51/at89c55.h,
750         * device/include/mcs51/at89x051.h,
751         * device/include/mcs51/at89x51.h,
752         * device/include/mcs51/at89x52.h,
753         * device/include/mcs51/mcs51reg.h,
754         * device/include/mcs51/reg51.h,
755         * device/include/mcs51/reg764.h,
756         * device/include/mcs51/regc515c.h,
757         * device/include/mcs51/sab80515.h: and added them here
758
759 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
760
761         * device/include/stdarg.h: changed SDCC specific keywords to double
762           underlined form.
763         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
764           mcs51 and ds390.
765         * device/include/hc08/mc68hc908gp32.h,
766         * device/include/hc08/mc68hc908jb8.h,
767         * device/include/hc08/mc68hc908jkjl.h,
768         * device/include/hc08/mc68hc908qy.h: fixed comments
769         * device/include/mcs51/README: updated
770         * device/include/mcs51/c8051f120.h: added PINRSF
771         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
772         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
773           amidst code. Also inline is not supported.
774
775 2005-04-06 Raphael Neider <rneider AT web.de>
776
777         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
778         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
779           callers stack/frame pointers
780
781 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
782
783         * device/include/pic16/usart.h: added, missing in previous commit,
784         * device/include/pic16/adc.h: fixed typo,
785         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
786         commit,
787         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
788         <p18fxxx.inc>
789         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
790         uninitialized because a bug appears with gplink
791         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
792         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
793         complains for unrecognised option
794
795 2005-04-05 Raphael Neider <rneider AT web.de>
796
797         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
798           structs as well (using memcpy)
799         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
800           on ISRs (GOTO has no label)
801         * src/pic16/device.h: added OF_OPTIMIZE_DF
802         * src/pic16/main.c: added compiler switch --optimize-df to enable the
803           new data flow analysis/optimization
804         * src/pic16/pcode.c: added (prototypes for and implementation of)
805           dataflow analysis functions, fixed pCodeInstructions' inCond and
806           outCond values, made RCALL a branch instruction
807         * (pic16_unlinkpCode): keep C line if possible
808         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
809           C line moved if possible
810         * (pic16_getRegFrompCodeOp): NEW, improved version of...
811         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
812           to use new pic16_getRegFrompCodeOp (works for more SFRs)
813         * (pic16_BuildFlow): fixed skip instructions with label (did not start
814           new flow)
815         * (pic16_getJumptabpCode): NEW, needed in...
816         * (LinkFlow): fixed handling of jumptables, calls and conditional
817           branches
818         * (pic16_InsertCommentAfter): NEW
819         * (pic16_pCodeReplace): made verbose and flow preserving
820         * (AnalyzeFlow): added call to data flow analysis
821         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
822         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
823         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
824
825 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
826
827         * src/SDCCast.c (decorateType): fixed bug #1105626
828
829 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
830
831         * device/include/asm/pic16/features.h,
832         * pic18f*.h headers,
833         * device/include/pic16/adc.h,
834         * device/include/pic16/delay.h,
835         * device/include/pic16/i2c.h,
836         * device/include/pic16/malloc.h,
837         * device/include/pic16/stdio.h,
838         * device/include/pic16/stdlib.h,
839         * device/include/pic16/string.h,
840         * device/lib/pic16/libc/stdio/printf_tiny.c,
841         * device/lib/pic16/libc/stdio/printf_small.c,
842         * device/lib/pic16/libc/stdio/strmgpsim.c,
843         * device/lib/pic16/libc/stdio/strmmssp.c,
844         * device/lib/pic16/libc/stdio/strmusart.c,
845         * device/lib/pic16/libc/stdio/vfprintf.c,
846         * device/lib/pic16/libc/stdlib/ltoa.c,
847         * device/lib/pic16/libc/stdlib/putchar.c,
848         * device/lib/pic16/libc/stdlib/x_ftoa.c,
849         * device/lib/pic16/libc/stdlib/memchrpgm.c,
850         * device/lib/pic16/libc/stdlib/memchrram.c,
851         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
852         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
853         * device/lib/pic16/libio/adc/adcbusy.c,
854         * device/lib/pic16/libio/adc/adcread.c,
855         * device/lib/pic16/libio/adc/adcsetch.c,
856         * device/lib/pic16/libio/usart/ubaud.c,
857         * device/lib/pic16/libio/usart/ubusy.c,
858         * device/lib/pic16/libio/usart/udrdy.c,
859         * device/lib/pic16/libio/usart/uopen.c,
860         * device/lib/pic16/libio/usart/uputc.c,
861         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
862         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
863         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
864         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
865         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
866         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
867         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
868         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
869         specific keywords to double underlined form,
870         * device/lib/pic16/libc/Makefile.rules,
871         * device/lib/pic16/libsdcc/Makefile.rules,
872         * device/lib/pic16/libm/Makefile,
873         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
874         to compile with C standard set in Makefile.common
875         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
876         rand.c and crc.c in compilation process,
877         * device/lib/pic16/libsdcc/int/divuint.c,
878         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
879         `c' from signed to unsigned,
880         * device/lib/pic16/startup/crt0.c,
881         * device/lib/pic16/startup/crt0i.c,
882         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
883         keywords to double underlined form, bug fixes in _do_cinit function
884         which prevented the correct initialization of the .idata segment,
885         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
886         core to enter a infinite loop
887         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
888
889 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
890
891         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
892
893 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
894
895         * device/include/Makefile.in: add support for hc08 subdirectory
896         * device/include/hc08/: new subdirectory
897         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
898         Lucas Loizaga, thanks!
899         * device/include/hc08/mc68hc908qy.h,
900         * device/include/hc08/mc68hc908gp32.h,
901         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
902         their own directory. Changed internal macro names to use the compiler
903         reserved namespace. Changed SDCC specific keywords to double
904         underlined form.
905         * device/include/math.h,
906         * device/include/malloc.h,
907         * device/include/stdarg.h,
908         * device/include/stdbool.h
909         * device/include/string.h,
910         * device/include/tinibios.h,
911         * device/include/ds400rom.h,
912         * device/include/8051.h,
913         * device/include/8052.h,
914         * device/include/80c51xa.h,
915         * device/include/at89c55.h,
916         * device/include/at89S8252.h,
917         * device/include/at89x51.h,
918         * device/include/at89x52.h,
919         * device/include/ds80c390.h,
920         * device/include/reg764.h,
921         * device/include/regc515c.h,
922         * device/include/sab80515.h,
923         * device/include/mcs51/c8051f000.h,
924         * device/include/mcs51/c8051f018.h,
925         * device/include/mcs51/c8051f020.h,
926         * device/include/mcs51/c8051f040.h,
927         * device/include/mcs51/c8051f060.h,
928         * device/include/mcs51/c8051f120.h,
929         * device/include/mcs51/c8051f300.h,
930         * device/include/mcs51/c8051f310.h,
931         * device/include/mcs51/c8051f320.h,
932         * device/include/mcs51/c8051f330.h,
933         * device/include/mcs51/c8051f350.h,
934         * device/include/z180.h: Changed SDCC specific keywords to double
935         underlined form.
936
937 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
938
939         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
940         18F4455,
941         * (pic16_assignConfigWordValue): disable testing of configuration
942         register value with config mask,
943         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
944         function with port->fun_prefix,
945         * (genFunction): when generating a naked interrupt function never
946         create an absolute segment placed in interrupt vector address, place
947         the actual interrupt function at IVA instead, when an interrupt
948         function is generated with unspecified interrupt then do not create
949         the absolute section,
950         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
951         code for generating a call to generic pointer get/put function with
952         a call to function pic16_callGenericPointer(),
953         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
954         the call to the generic pointer get/put functions with prefixing the
955         function name with port->fun_prefix,
956         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
957         * src/pic16/main.c (_process_pragma): prefix function with
958         port->fun_prefix,
959         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
960         calling assembler, old 18Fxxxx macro is deprecated,
961         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
962         PC_ASMDIR in while condition,
963         * (findInstruction): add PC_ASMDIR in while condition,
964         * (buildCallTree): prefix main with port->fun_prefix,
965         * (pic16_pCode2str): fixed bug that didn't emit the memory access
966         identifier for variable with banked access in instructions BTFSS,
967         BTFSC, BCF, BSF, BTG
968         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
969         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
970         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
971         perform optimization when enviroment variable NO_REG_OPT is set,
972         * (insideLRBlock): NEW, return 1 if register is inside an
973         INF_LOCALREGS block,
974         * (RemoveRegFromLRBlock): remove a register that is completely
975         eliminated by register optimization, but it is still left in local
976         register store/restore in/from stack block,
977         * (Remove2pcodes): after removing register, check to see if it
978         should be removed from local register store/restore in/from stack
979         block,
980         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
981         DUMMY_READ_VOLATILE,
982
983         * device/include/pic16/adc.h: minor prototype modifications and
984         update,
985         * device/include/pic16/malloc.h: added GPL notice various
986         modifications,
987         * device/include/pic16/stdint.h: NEW, standard header for ints
988         * device/include/pic16/delay.h: NEW, header for delay functions,
989         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
990         delay1mtcy,
991         * device/include/pic16/signal.h: NEW, header providing helper macros
992         for implementing signal handlers,
993         * device/include/pic16/stdio.h: added prototypes for functions,
994         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
995         prototypes for stdin and stdout, added macro PUTCHAR to
996         automatically implement putchar function prototype,
997         * device/include/pic16/usart.h: modified and updated USART library,
998         * device/lib/pic16/libio/adc/,
999         * device/lib/pic16/libio/i2c: some modifications to improve library
1000         performance,
1001         * device/lib/pic16/libc/stdio/: modifications for the new printf*
1002         family of functions,
1003         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
1004         family of functions and other sources,
1005         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
1006         of the PIC18Fxx[28] devices,
1007         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
1008         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
1009         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
1010         _do_cinit function, because the previous failed when local variables
1011         where not placed in the same memory bank,
1012         * device/lib/pic16/libsdcc/char/: various modifications to improve
1013         library performance,
1014         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
1015         information on the new functions of the c library and more...
1016
1017 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1018
1019         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
1020
1021 2005-03-26 Raphael Neider <rneider AT web.de>
1022
1023         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
1024           if condition == CARRY)
1025         * (genCmp): adapted to new genSkipc semantics
1026         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
1027           on rIfx (genCmp was broken)
1028
1029 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1030
1031         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
1032         * src/z80/main.c (_keywords[]),
1033         * src/SDCCglobal.h (struct options),
1034         * src/SDCC.y,
1035         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
1036         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
1037         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
1038         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
1039         always available in leading double underscore form. The C99 support is
1040         mostly missing, but it's a start.
1041         * support/regression/tests/bug-227710.c: fixed nonconforming use of
1042         reserved identifier "__data".
1043
1044 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1045
1046         * src/mcs51/peeph.def: fixed bug 1170013
1047
1048 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
1049
1050         * device/include/mcs51reg.h: fixed bug 842007
1051
1052 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1053
1054         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
1055         last time.
1056
1057 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1058
1059         * src/port.h (struct PORT),
1060         * src/avr/ralloc.c (avr_assignRegisters),
1061         * src/avr/main.c,
1062         * src/ds390/ralloc.c (ds390_assignRegisters),
1063         * src/ds390/main.c,
1064         * src/hc08/ralloc.c (hc08_assignRegisters),
1065         * src/hc08/main.c,
1066         * src/mcs51/ralloc.c (mcs51_assignRegisters),
1067         * src/mcs51/main.c,
1068         * src/pic/ralloc.c (pic14_assignRegisters),
1069         * src/pic/main.c,
1070         * src/pic16/ralloc.c (pic16_assignRegisters),
1071         * src/pic16/main.c,
1072         * src/xa51/ralloc.c (xa51_assignRegisters),
1073         * src/xa51/main.c,
1074         * src/z80/ralloc.c (z80_assignRegisters),
1075         * src/z80/ralloc.h,
1076         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
1077         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
1078         * src/SDCCcse.h,
1079         * src/SDCCdflow.c (computeDataFlow),
1080         * src/SDCCdflow.h,
1081         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
1082         * src/SDCCloop.h,
1083         * src/SDCCcflow.c (*),
1084         * src/SDCCcflow.h,
1085         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
1086         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
1087         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
1088         immedDom() returning wrong block; probably fixes bug #1160833)
1089
1090 2005-03-20 Borut Razem <borut.razem AT siol.net>
1091
1092         * support/scripts/inc2h.pl: WIN32 port
1093
1094 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
1095
1096         * device/lib/makefile.in: added abs.c and labs.c
1097
1098 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
1099
1100         * device/include/stdint.h: added
1101         * device/lib/abs.c: added
1102         * device/lib/labs.c: added
1103         * device/include/stdlib.h: added abs() and labs() prototypes
1104         * device/lib/libsdcc.lib: added abs and labs
1105         * device/include/float.h,
1106         * device/lib/_fsmul.c,
1107         * device/lib/printf_fast.c,
1108         * device/lib/printf_tiny.c: updated comments
1109
1110 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1111
1112         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
1113         bug #1164313
1114
1115 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1116
1117         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
1118         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
1119
1120 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
1121
1122         * device/lib/printf_large.c: removed inline assembly for portability and
1123           readability. Use printf_fast if speed or size are more important.
1124         * src/pic16/gen.c: removed conditions around use of DEBUGpc
1125         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
1126
1127 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
1128
1129         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
1130         prevent compiler warning
1131
1132 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1133
1134         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
1135         moved to level 0 and declared as static. Also they are explicit
1136         placed in access bank. This was necessery because some times they
1137         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
1138         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
1139         optimizations. Currently only compare to unsigned char is implemented,
1140         * src/pic16/gen.c: added fReturnIdx array,
1141         * (struct resolvedIfx) is moved to gen.h and made public,
1142         * (struct _G): added sregsAlloc and sregsAllocSet fields,
1143         * (aopForSym): added an optimization to directly store in stack of
1144         the operand of a SEND iCode,
1145         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
1146         but as registers instead (AOP_REG) using the fReturnIdx array,
1147         * (pic16_freeAsmop): remove the freed register from the
1148         _G.sregsAlloc field,
1149         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
1150         a compare of 'WREG',
1151         * (pic16_popGetTempRegCond): changed function prototype, now
1152         function takes also a bitVector argument v which holds the current
1153         set of registers that are allocated for stack access by aopForSym,
1154         registers allocated in aopForSym for accessing stack symbols are not
1155         any more part of the functions usedRegs field,
1156         * (genCall): some times aopOp is called for a stack variable to be
1157         send, aopForSym might perform the push, if this is true make sure
1158         that genCall doesn't push the variable twice by testing _G.resDirect,
1159         * (genFunction): changed testing for unspecified interrupt number
1160         from 256 to INTNO_UNSPEC,
1161         * modified selection scheme of frame pointer generation. Previously
1162         if function did use local registers a frame pointer was generated,
1163         now a frame pointer is generated only if function has arguments
1164         (that need PLUSW2 register access), or has stack arguments, or the
1165         compiler is not instructed to omit the frame pointer,
1166         * (genEndFunction): before restoring local registers that were saved
1167         in the function preamble, also restore the registers that *might*
1168         have been allocated for stack access,
1169         * (genRet): removed some old comments,
1170         * (genCmp, the active (RN's) version): added a call to the
1171         pic16_genCmp_special function to perform the compare with a more
1172         robust and optimized way,
1173         * (genInline): a feature has been added in inline code generation,
1174         which allows a wildcard variable substitution when writing inline
1175         assembly. Code is incomplete and experimental therefore undocumented,
1176         * (genCast): changed order of aopOp for result and right to allow
1177         aopForSym to directly load the result if possible,
1178         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
1179         perform an optimized compare on some selected special occasions,
1180         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
1181         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
1182         generate an IVT any more,
1183         * src/pic16/main.c (pic16_optionsTable): added command line option
1184         --optimize-cmp,
1185         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
1186         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
1187         macros,
1188         * src/pic16/NOTES: Raphael Neider added in list of active developers
1189         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
1190         jumptable_end to prevent bug #,
1191         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
1192         inCond and outCond fields,
1193         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
1194         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
1195         turn off register spilling,
1196         * (packRegsForOneUse): synced with other ports' versions although it
1197         is not used currently,
1198         * (pic16_packRegisters): added an optimization while reading
1199         structure bitfields, some registers may be saved (malloc code is
1200         decreased by 80 bytes)
1201
1202 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
1203
1204         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
1205         left is a bitfield, if yes, then don't optimize assignment. Perhaps
1206         this can be optimized more?
1207
1208 2005-03-10 Raphael Neider <rneider AT web.de>
1209
1210         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
1211           genNearPointerGet): (hopefully) fixed access to bitfields via
1212           pointers (p->bitN = x; and x = p->bitN; failed)
1213
1214 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
1215
1216         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
1217
1218 2005-03-09 Raphael Neider <rneider AT web.de>
1219
1220         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
1221
1222 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
1223
1224         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
1225         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
1226           (regTypeNum): set REG_BIT type if necessary
1227         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
1228         * support/regression/tests/critical.c: check bug 1144613
1229
1230 2005-03-02 Raphael Neider <rneider AT web.de>
1231
1232         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
1233
1234 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1235
1236         * src/avr/ralloc.c (serialRegAssign),
1237         * src/ds390/ralloc.c (serialRegAssign),
1238         * src/hc08/ralloc.c (serialRegAssign),
1239         * src/mcs51/ralloc.c (serialRegAssign),
1240         * src/pic/ralloc.c (serialRegAssign),
1241         * src/pic16/ralloc.c (serialRegAssign),
1242         * src/xa51/ralloc.c (serialRegAssign),
1243         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
1244
1245 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
1246
1247         * src/SDCCast.c (decorateType): fixed bug 1124787
1248
1249 2005-02-20 Hubert Sack <sack AT digiplan.de>
1250         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1251
1252         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
1253         patch #1121755
1254
1255 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1256
1257         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
1258         to keep the correct label reference count when adding/removing references
1259         to labels. A peephole file using this is appended to patch #1144962.
1260
1261 2005-02-14 Raphael Neider <rneider AT web.de>
1262
1263         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
1264         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
1265         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
1266           retrievals of result operand's value on assignment
1267
1268 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
1269
1270         * device/include/pic16/string.h: modified prototype for memccpy()
1271         to memccpy(void *, void *, char, size_t)
1272         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
1273         check whether to omit frame pointer or not,
1274         * (genInline): convert all occurences of "\n" to LF in inline
1275         assembler blocks, this helps formatting the inline text,
1276         * (pic16_loadFSR0): modified prototype,
1277         * (genNearPointerGet, genNearPointerSet): reorganization of code,
1278         removed some 8051 legacy code,
1279         * (genPackBits): enabled handling bitfields exceeding one byte in size,
1280         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
1281         before allocating temporary registers in functions,
1282
1283 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1284
1285         * support/regression/tests/bitvars.c: corrected the "fix"
1286
1287 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1288
1289         * support/regression/tests/bitvars.c,
1290         * support/regression/tests/bitwise.c,
1291         * support/regression/tests/rotate.c: "fixed" problems on Alpha
1292
1293 2005-02-10 Raphael Neider <rneider AT web.de>
1294
1295         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
1296           different size for Alpha
1297         * src/pic16/gen.c (genCmpEq) : improved compare with 0
1298
1299 2005-02-09 Raphael Neider <rneider AT web.de>
1300
1301         * src/SDCC.lex(doPragma) : save and restore warning options as well
1302           (also added new stack plus clone- and copyAndFreeSDCCERRG())
1303         * have #pragma less_pedantic set the errorlevel to WARNING
1304           (fixes #1117001)
1305         * (cloneOptimize) : fixed wrong malloc's size
1306         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
1307           facilitate correct handling of #pragma (save|restore)
1308
1309 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1310
1311         * src/mcs51/gen.c: removed non-standard C nameless struct/union
1312
1313 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
1314
1315         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
1316
1317 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
1318
1319         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
1320
1321 2005-02-02 Raphael Neider <rneider AT web.de>
1322
1323         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
1324         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
1325         * (pic16_storeForReturn): fixed to allow returning function pointers
1326         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
1327         * device/include/pic16/{stddef.h,stdbool.h}: added
1328
1329 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
1330
1331         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
1332
1333 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
1334
1335         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
1336         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
1337          appeared to be required
1338
1339 2005-01-31 Borut Razem <borut.razem AT siol.net>
1340
1341         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
1342           include/mcs51 and include/z80 directories to the package
1343
1344 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1345
1346         * src/hc08/gen.c (genFunction): fixed bug #1112752
1347
1348 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1349
1350         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
1351
1352 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1353
1354         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
1355
1356 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
1357
1358         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
1359
1360 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
1361
1362         * device/include/c8051fxxx.h: removed these 6 files
1363         * device/include/mcs51/c8051fxxx.h: added these 11 new files
1364
1365 2005-01-26 Raphael Neider <rneider AT web.de>
1366
1367         * src/pic16/gen.c (genAssign): fixed assignment from longs
1368           in codespace (were cut to three bytes)
1369         * (genDummyRead): implemented (except for CODESPACE...),
1370           fixed bug #1108575
1371         * src/pic16/glue.c (emitStatistics): beautified
1372         * device/lib/pic16/libm/Makefile: added include path
1373
1374 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1375
1376         * src/z80/gen.c (aopPut): fixed bug #1103902
1377
1378 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1379
1380         * device/lib/expf.c: fixed bug #1095792
1381
1382 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
1383
1384         * device/lib/pic16/libm: added Math library sources
1385
1386 2005-01-24 Raphael Neider <rneider AT web.de>
1387
1388         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
1389           to enable upcast to pCodeOpReg2 (there is no type tag to
1390           differenciate the two and pic16_popGet2p cast into PCOR2)
1391         * src/pic16/main.c (_process_pragma): fixed another malloc bug
1392           (sizeof(sectNames) changed to sizeof(sectName))
1393           Both patches fix segfaults under MinGW.
1394
1395 2005-01-23 Raphael Neider <rneider AT web.de>
1396
1397         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
1398           Safe_[mc]?alloc()'ed variables
1399         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
1400           of (byte sized) temporaries (assign them to WREG for now)
1401         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
1402           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
1403           this might fix SIGSEGVs on MinGW...
1404         * src/SDCCopt.c (killDeadCode): restored original behaviour
1405           (volatile operands might get thrown away though)
1406
1407 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
1408
1409         * src/pic16/gen.c: fixed bug #1106975,
1410         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
1411         pointer update, INTCON is saved, global interrupts are disabled and
1412         restored after updateing TOS.
1413         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
1414         * added function attribute 'shadowregs' to take advantage of shadow
1415         registers,
1416         * added function attribute 'wparam' as an alternative to the wparam
1417         pragma,
1418         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
1419         user declares a non-ISR function as 'shadowregs',
1420         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
1421
1422 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
1423
1424         * .version: bumped version number to 2.4.8
1425         * device/lib/pic16/pics.all: list of PIC18F devices supported by
1426         pic16 port,
1427         * device/lib/pic16/libio/i2c/: I2C module support library,
1428         * device/include/pic16/i2c.h: I2C support library header,
1429         * device/lib/pic16/libc/stdio/: standard IO support sources,
1430         * (printf_small.c): printf_small() source, supports float print,
1431         * (printf_tiny.c): printf_tiny() source, does not support floats,
1432         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
1433         enable global optimizations for entire library source, other
1434         Makefiles in the source tree are also modified to reflect this,
1435         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
1436         function,
1437         * doc/sdccman.lyx: updated to reflect new changes,
1438         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
1439         sym->onStack if-case,
1440         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
1441         sbit, idata, _idata, xdata, _xdata,
1442         * added pragma library, to link an external library, (see doc),
1443         * removed command line options, --pomit-config-words, --pomit-ivt,
1444         --pleave-reset-vector,
1445         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
1446         when calling assembler to reflect memory model used, also define
1447         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
1448         reflect stack model used,
1449         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
1450         on stack return NULL,
1451
1452 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1453
1454         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
1455           of the operands is volatile. Fixes #1020220
1456
1457 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1458
1459         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
1460         * (OptimizeRegUsage): make sure that there is really no other flow where
1461           the first pCode is used
1462
1463 2005-01-22 Raphael Neider <rneider AT web.de>
1464
1465         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
1466           to fix #1106967 (pCode->seq are not set up correctly)
1467
1468 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1469
1470         * src/SDCCglue.c (glue): make sure code area is declared before the
1471         static initialization area.
1472
1473 2005-01-21 Raphael Neider <rneider AT web.de>
1474
1475         * device/lib/Makefile.in: fixed test for pic16 install dir
1476         * device/lib/pic16/*/Makefile*: modified compile flags to enable
1477           optimizations
1478         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
1479           added --optimize-goto compiler switch and pragma wparam documentation
1480         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
1481         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
1482           and PRODH closing bug #1071770 (peephole optimizer)
1483
1484 2005-01-19 Raphael Neider <rneider AT web.de>
1485
1486         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
1487           cmdLine buffers (used when calling sdcpp...) are large enough
1488           (MAX_PATH=256 truncates arguments leading to system halts when
1489           used in MinGW...)
1490         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
1491         * (genUminus): rewritten to for efficiency
1492         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
1493           used uninitialized in some cases)
1494         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
1495           copy the third byte from the int -- now assumes 0x80 (data memory)
1496         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
1497           operands (genAddLit expects the iCode's operands to swapped as
1498           well), fixed leftover bytes (crashed for short left operands)
1499         * (pic16_genMinusDec): performance improvements, removed false
1500           PIC14 emitSKPNCs
1501         * (pic16_genMinus): fixed to cope with differently sized operands
1502         * src/pic16/glue.c (pic16_glue): added new banksel optimization
1503           for --obanksel > 1
1504         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
1505         * src/pic16/graph.[ch]: implementation of directed graphs, used by
1506           new banksel optimization
1507         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
1508           analysis for temporary registers (segfaults...)
1509         * src/pic16/peeph.def: added rule
1510
1511 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
1512
1513         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
1514         which converts a float number to its ASCII representation
1515         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
1516         functions to convert the fractional and integer part of a float to ASCII,
1517         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
1518         realloc.c): added _MALLOC_SPEC to explicit place variables in data
1519         ram
1520         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
1521         _STATMEM macros,
1522         * device/include/pic16/adc.h: added GPL info,
1523         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
1524         a pCodeOp as tested operand,
1525         * (genNearPointerGet): optimized bit testing, does not use
1526         intermediate register for bit value, test directly instead with
1527         BTFSS, BTFSC, works only for single bits,
1528         * (genpic16Code): dump the name of the iCode in the asm,
1529         * src/pic16/ralloc.c (decodeOp): removed static declaration and
1530         renamed to pic16_decodeOp,
1531         * (serialRegAssign): do not allocate a temporary register for iCode
1532         sequences that test a single bit for 1/0
1533
1534 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
1535
1536         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
1537         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
1538         access stack and frame pointers. They are initially assigned to
1539         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
1540         accessing SFRs. Updated all occurences of modification of stack or
1541         frame pointer in gen.c and pcode.c,
1542         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
1543         assigning of a literal value to pointers,
1544         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
1545         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
1546         selected
1547
1548 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
1549
1550         * doc/sdccman.lyx: update documentation about stack pragma, added
1551         some info for stack memory models
1552
1553 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1554
1555         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
1556
1557 2005-01-08 Raphael Neider <rneider AT web.de>
1558
1559         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
1560           udata sections to fix bug #1097823
1561
1562 2005-01-05 Raphael Neider <rneider AT web.de>
1563
1564         * src/pic16/gen.c (genGenericShift): added handling of differently
1565           sized left operand and result
1566
1567 2005-01-04 Raphael Neider <rneider AT web.de>
1568
1569         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
1570         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
1571           to hold the condition bit)
1572         * added new version of genCmp (old code available via #define)
1573         * added new version of genShiftLeft/genShiftRight in a generic
1574           way, now supports shifting by negative values
1575         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
1576           shiftCount (expected by genGenericShift)
1577         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
1578         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
1579           dump
1580         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
1581           is an invalid literal too...)
1582
1583 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
1584
1585         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
1586         from Raphael Neider,
1587         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
1588         for 8-bit literals. This fixes some literal operands which are sign
1589         extended to 16-bits ints when instruction needs only 8-bits.
1590
1591 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
1592
1593         * device/lib/logf.c: added mcs51 assembly version
1594         * device/lib/expf.c: added mcs51 assembly version
1595         * device/lib/_logexpf.c: new shared asm code for expf and logf
1596         * device/include/math.h: add defines for assembly math library
1597         * device/lib/Makefile.in: build new _logexpf.c
1598         * device/lib/libfloat.lib: use new _logexpf.c
1599
1600 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1601
1602         * src/pic/device.c
1603         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
1604           device types which have less than 0x7f registers.
1605
1606 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1607
1608         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
1609
1610 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
1611
1612         * device/lib/printf_fast.c: only build on supported arch.
1613         * device/lib/printf_tiny.c: only build on supported arch.
1614         * device/lib/printf_fast_f.c: only build if asm float lib
1615         * device/lib/_fsget1arg.c: only build if asm float lib
1616         * device/lib/_fsget2args.c: only build if asm float lib
1617         * device/lib/_fsnormalize.c: only build if asm float lib
1618         * device/lib/_fsreturnval.c: only build if asm float lib
1619         * device/lib/_fsrshift.c: only build if asm float lib
1620         * device/lib/_fsswapargs.c: only build if asm float lib
1621         * device/include/stdio.h: don't provide print_fast,
1622           print_fast_f, print_tiny prototypes if --xstack used
1623
1624 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
1625
1626         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
1627         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
1628           to the SOURCES
1629
1630 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
1631
1632         * device/lib/printf_fast_f.c: same as printf_fast, but
1633           with floating point enabled
1634         * device/lib/printf_fast.c: minor tweaks
1635         * device/include/stdio.h: add printf_fast_f
1636
1637 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
1638
1639         * src/SDCCmain.c: make --float-reent default for mcs51
1640         * device/lib/_fsadd.c: added mcs51 assembly version
1641         * device/lib/_fssub.c: added mcs51 assembly version
1642         * device/lib/_fsmul.c: added mcs51 assembly version
1643         * device/lib/_fsdiv.c: added mcs51 assembly version
1644         * device/lib/_fseq.c: added mcs51 assembly version
1645         * device/lib/_fsneq.c: added mcs51 assembly version
1646         * device/lib/_fsgt.c: added mcs51 assembly version
1647         * device/lib/_fslt.c: added mcs51 assembly version
1648         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
1649         * device/lib/Makefile.in: add _fscmp to build
1650         * device/lib/libfloat.lib: add _fscmp to build
1651
1652 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
1653
1654         * device/lib/_fs2slong.c: added mcs51 assembly version
1655         * device/lib/_fs2sint.c: added mcs51 assembly version
1656         * device/lib/_fs2schar.c: added mcs51 assembly version
1657         * device/lib/_fs2ulong.c: added mcs51 assembly version
1658         * device/lib/_fs2uint.c: added mcs51 assembly version
1659         * device/lib/_fs2uchar.c: added mcs51 assembly version
1660         * device/lib/_slong2fs.c: added mcs51 assembly version
1661         * device/lib/_sint2fs.c: added mcs51 assembly version
1662         * device/lib/_schar2fs.c: added mcs51 assembly version
1663         * device/lib/_ulong2fs.c: added mcs51 assembly version
1664         * device/lib/_uint2fs.c: added mcs51 assembly version
1665         * device/lib/_uchar2fs.c: added mcs51 assembly version
1666         * device/include/float.h: added #define to select asm vs c
1667
1668 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
1669
1670         * device/lib/printf_fast.c: improvements to float output
1671         * device/include/float.h: add defines for assembly float library
1672         * device/lib/_fsget1arg.c: receive 1 float arg
1673         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
1674         * device/lib/_fsnormalize.c: normalize a float
1675         * device/lib/_fsreturnval.c: return float, various helper routines
1676         * device/lib/_fsrshift.c: right shift a float's mantissa
1677         * device/lib/_fsswapargs.c: swap 2 floats
1678         * device/lib/Makefile.in: build these 6 new files for mcs51
1679         * device/lib/libfloat.lib: add these 6 files to the library
1680
1681 2004-12-26 Borut Razem <borut.razem AT siol.net>
1682
1683         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
1684           built by gcc 3.4.2
1685
1686 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
1687
1688         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
1689           and fully reentrant and register bank neutral.
1690         * device/lib/printf_fast.c: added float (not enabled by default),
1691           added compact/slower integer (also not enabled by default),
1692           improved size/speed of fast integer code, other minor changes
1693         * device/include/stdio.h, device/lib/Makefile.in,
1694           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
1695
1696 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
1697
1698         * src/pic16/pcode.c: declaring variables other than at the start of a
1699           block is not supported in C by VC6.
1700
1701 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
1702
1703         * applied a previous patch from Raphael Neider that wasn't included
1704         in the previous commits, which fixes infinite loops within jumptable
1705         improvements,
1706         * made some fixes that previous patches introduced
1707
1708 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
1709
1710         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
1711         that fixes an issue with AOP_PCODE asmop's offset,
1712         * (pic16_popCopyReg): update instance field too,
1713         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
1714         function of pic port,
1715         * (genCmp, genAnd, genAssign),
1716         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
1717
1718 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
1719
1720         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
1721         variables initial values to idata section,
1722         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
1723         variables in some functions. This utilizes parmBytes field of iCode
1724         structure to hold the offset of the variable in stack. (might be
1725         able to use the stack field too?)
1726         * applied patch from Raphael Neider # ### , # ###
1727         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
1728         variable initial values in idata section,
1729         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
1730         for static variables with initial value
1731         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
1732         applied fix in while loop from Raphael Neider.
1733
1734 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
1735
1736         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
1737         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
1738         * src/ds390/ralloc.c (serialRegAssign): spill bits
1739         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
1740         * support/Util/SDCCerr.c,
1741         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
1742         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
1743         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
1744
1745 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
1746
1747         * device/include/sdcc-lib.h: inserted LGPL, added includes
1748           asm/ds390/features.h and asm/mcs51/features.h
1749         * device/include/asm/default/features.h,
1750         * device/include/asm/gbz80/features.h,
1751         * device/include/asm/z80/features.h: added empty _AUTOMEM
1752           and _STATMEM
1753         * device/include/asm/ds390/features.h,
1754         * device/include/asm/mcs51/features.h: added files with defines for
1755           _AUTOMEM and _STATMEM indicating automatic and static storage class
1756         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
1757         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
1758         * src/SDCCicode.c (geniCodeCast),
1759         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
1760         * src/SDCCloop.c (loopInduction): removed unused variable lr
1761         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
1762           to convertToFcall to include char modulo (RFE 1065037), added check
1763           if left operand is unsigned and use abs of literal value
1764         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
1765           as it doesn't work after conversion from peephole.def to peephole.rul
1766         * src/mcs51/gen.c (toBoolean): added check for size,
1767           (genModOneByte): optimized code for signed char modulo a literal
1768           power of 2 (thanks to Hubert Sack),
1769           (genRRC): removed unnecessary "clr c",
1770           (genRLC): replaced "add a,acc" with cheaper "rlc a"
1771         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
1772           jump optimization,
1773           swapped rules 256.c and 256.d,
1774           extended 256.d by using new multiple checks (thanks Erik),
1775           added rules 256.e and 256.f,
1776           updated rule 261.a and 261.b to new generated code
1777         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
1778
1779 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1780
1781         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
1782           induction related bugs, including first part of bug #1074377
1783
1784 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
1785
1786         * applied patch from bug-report #1076292,
1787         * applied patches for genAnd and Goto-optimizations for Raphael
1788         Neider,
1789         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
1790         dump a less iCode information,
1791         * src/pic16/device.h (pic16_options_t): added field debgen,
1792         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
1793         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
1794         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
1795         puclic,
1796         * (various functions): added macros FENTRY and FENTRY2 to functions,
1797         to emit function prologue,
1798         * (various functions): fixed indentation,
1799         * (genNearPointerGet): fixed loading of FSR0,
1800         * (genPackBits): applied patch from Raphael Neider to fix updating
1801         of FSR0 and touching only the modified bits,
1802         * src/pic16/genarith.c (various functions): added macros FENTRY to
1803         emit function prologue in comments,
1804         * src/pic16/pcode.h: added functions debugf2, debugf3,
1805         * src/pic16/ralloc.c: partial fix for packForPush caused
1806         segmentation fault,
1807
1808 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1809
1810         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
1811           <stsp AT users.sourceforge.net> with reversed byte order
1812         * support/regression/tests/rotate.c: added (ds390 skips some tests)
1813
1814 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1815
1816         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
1817           bug #1074377
1818         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
1819         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
1820
1821 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
1822
1823         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
1824
1825 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1826
1827         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
1828           conditions,
1829           (setFromConditionArgs): friendly operand parser for peephole rules,
1830           (operandBaseName, operandsNotRelated): new peephole condition
1831           "operandsNotRelated" -- similar to "operandsNotSame", but takes
1832           architecture specific register naming into account, handles n-way
1833           comparisons, and supports quoted literals
1834         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
1835
1836 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1837
1838         * src/mcs51/peeph.def: fixed bug #1076940
1839
1840 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
1841
1842         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
1843
1844 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1845
1846         Adding support for replacing ljmps with sjmps in jumptables
1847         generated for switch statements. For now you need to set the
1848         environment variable SDCC_SJMP_JUMPTABLE to enable this.
1849         Now 4 algorithms for mcs51 jumptable generation are used:
1850         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
1851         addresses loaded pc-relative for up to 112 cases and stack-pushing
1852         target addresses loaded with offset from dptr for up to 256 cases.
1853
1854         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
1855         * src/mcs51/main.c: adapted constants for switch table generation
1856         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
1857
1858 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
1859
1860         * device/lib/printf_large.c (_print_format): fixed bug 1073386
1861         * support/regression/tests/bug1057979.c: added test for bug 1073386
1862
1863 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
1864
1865         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
1866         compilers
1867
1868 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
1869
1870         * src/pic16/device.h,
1871         * src/pic16/genarith.c,
1872         * src/pic16/glue.c,
1873         * src/pic16/main.c,
1874         * src/pic16/pcode.c: applied patches #1068154 and #1070213
1875
1876 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
1877
1878         Large cummulative patch for pic16 port.
1879         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
1880         to call when a stack overflow occurs,
1881         * (malloc.h): added CVS Id tag,
1882         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
1883         variable,
1884         * added libc directory. The current version of LibC contains string
1885         functions, ctype functions and macros and some functions of the
1886         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
1887         be extensively tested in the future. Standard disclaimer here.
1888         Library is not automatically build yet. But one can build it by
1889         invoking 'make' inside the libc directory.
1890         * added ADC library under libio. Preliminary version yet.
1891
1892         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
1893         * src/pic16/gen.c (aopForRemat): asmop size is filled by
1894         aopForRemat() now and not by pic16_aopOp(),
1895         * (pic16_popGetTempReg): removed warning messgae when allocating
1896         temporary registers, its a buggy feature and will be removed,
1897         * (pic16_popGet): set register instance field in AOP_CRY,
1898         * (pic16_outBitC): fixed for results in size greater than 1,
1899         * (genUminusFloat): fixed for pic16, ported code from mcs51,
1900         * (pic16_storeForReturn): optimized return of 0,
1901         * (genCmp): experimental code for new genCmp which uses PIC18's
1902         special compare&skip instructions. Initial tests fail some times
1903         with variables grater than 1 byte in size, so new code is disabled,
1904         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
1905         a single bit,
1906         * (genCast): began a fix to optimize the casting of a bit to another
1907         bit, now assigning a bitfield to another bitfield will fail, sorry,
1908         * src/pic16/main.c: disabled the use of lr-support feature,
1909         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
1910         * added some function prototypes, added function _debugf prototype,
1911         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
1912         bits with offset (case PO_GPR_BIT),
1913         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
1914         command line,
1915         * (isBankInstruction): modified to return 0 for no banking instruction,
1916         and 1 for banking instruction,
1917         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
1918         caused stop processing pCodes after a inline assembly block,
1919         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
1920         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
1921         registers when it shouldn't,
1922         * src/pic16/ralloc.c (allocReg): add preliminary support for
1923         supporting a limited set of temporary registers,
1924
1925 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1926
1927         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
1928           genDataPointerSet): ensure assignments always copy in MSB to LSB
1929           order,
1930           (loadRegFromAop): recognize CLRH optimization,
1931           (genFunction): optimize RECEIVE iCodes in reentrant functions
1932
1933 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1934
1935         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
1936           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
1937           selected.
1938         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
1939         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
1940           contiguous with data
1941
1942 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1943
1944         * device/lib/_gptrget.c (_gptrget),
1945         * device/lib/_gptrgetc.c (_gptrgetc),
1946         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
1947           instead of sjmp to ret
1948         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
1949           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
1950
1951 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
1952
1953         * .version: bumped version to 2.4.7
1954         * device/lib/_gptrget.c (_gptrget): is now _naked
1955         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
1956         * device/lib/_gptrput.c (_gptrput): is now _naked
1957         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
1958           (createFunction): fixed xstack
1959         * src/SDCCglue.c (emitMaps): set allocation required for bit area
1960         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
1961           or bit either,
1962           (geniCodeCritical): store original interrupt state in an iTemp bit
1963           var unless stack-auto
1964         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
1965         * src/SDCCmain.c (setIncludePath): added include/target to search path
1966         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
1967         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
1968           prototype,
1969           (processFuncArgs): put bit vars in bit area
1970         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
1971           unsaveRBank): fixed xstack,
1972           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
1973           (genFunction, genEndFunction): fixed xstack,
1974           (genAssign): optimization don't walk backwards through mem
1975         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
1976         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
1977         * support/regression/Makefile: also make library (for stack-auto) when
1978           making "all" and added "test-mcs51-xstack-auto"
1979         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
1980         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
1981         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
1982         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
1983         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
1984           make-library by MAKE_LIBRARY
1985         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
1986           regression tests for xstack
1987         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
1988         * support/regression/tests/critical.c: test for critical on mcs51
1989
1990 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1991
1992         * support/regression/ports/ucz80/spec.mk: use include and lib files from
1993           built version of sdcc instead of installed version
1994
1995 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1996
1997         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
1998         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
1999           vprintf.c now
2000         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
2001         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
2002           WARNING: remove device/lib/build/z80/printf.o by hand when
2003           updating from previous build!
2004         * device/lib/z80/printf.c: updated comment
2005         * support/regression/tests/bug1057979.c: test all ports now
2006         * support/regression/tests/bug1065458.c: file added
2007
2008 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2009
2010         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
2011           *_start and *_end symbols for static functions
2012
2013 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
2014
2015         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
2016           and search crt0.o in all library paths,
2017           (setIncludePath): proper handling of --nostdinc,
2018           (setLibPath): proper handling of --nostdlib
2019         * support/regression/Makefile,
2020         * support/regression/ports/ds390/spec.mk,
2021         * support/regression/ports/gbz80/spec.mk,
2022         * support/regression/ports/hc08/spec.mk,
2023         * support/regression/ports/mcs51/spec.mk,
2024         * support/regression/ports/mcs51-large/spec.mk,
2025         * support/regression/ports/mcs51-stack-auto/spec.mk,
2026         * support/regression/ports/z80/spec.mk: use include and lib files from
2027           built version of sdcc instead of installed version
2028         * doc/sdccman.lyx: fixed typo in --nostdinc
2029
2030 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
2031
2032         * src/pic/pcode.c,
2033         * src/pic/device.c,
2034         * src/pic/ralloc.c,
2035         * src/pic/gen.c : added support to generate code for struct bit fields.
2036
2037 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2038
2039         * as/xa51/xa_version.h,
2040         * device/include/errno.h,
2041         * device/include/regc515c.h,
2042         * device/lib/_itoa.c,
2043         * device/lib/_ltoa.c,
2044         * device/lib/ser_ir_cts_rts.c,
2045         * sim/ucsim/xa.src/glob.cc,
2046         * sim/ucsim/xa.src/inst_gen.cc,
2047         * sim/ucsim/xa.src/xa_bit.cc,
2048         * sim/ucsim/xa.src/xa_sfr.cc,
2049         * sim/ucsim/z80.src/inst_dd.cc,
2050         * sim/ucsim/z80.src/inst_fdcb.cc,
2051         * support/scripts/keil2sdcc.pl,
2052         * src/pic16/pic16.dsp,
2053         * src/pic16/pic16a.dsp: corrected cvs line endings
2054         * device/lib/printf_large.c: fixed bug 1057979
2055         * src/pic16/gen.c: fixed non-C standard code
2056         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
2057         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
2058         * support/regression/ports/mcs51/support.c: reload T1 asap
2059         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
2060           pdata use and clear idata startup behaviour
2061         * support/regression/tests/bug1057979.c: added
2062
2063 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
2064
2065         * device/examples/ds390/ow390/ad26.h,
2066         * device/examples/ds390/ow390/cnt1d.h,
2067         * device/examples/ds390/ow390/crcutil.c,
2068         * device/examples/ds390/ow390/ownet.h,
2069         * device/examples/ds390/ow390/owsesu.c,
2070         * device/examples/ds390/ow390/swt12.h,
2071         * device/examples/ds390/ow390/swtoper.c,
2072         * device/examples/ds390/ow390/temp10.h,
2073         * device/examples/ds390/ow390/thermodl.c,
2074         * device/examples/ds390/tinitalk/tinitalk.dsp,
2075         * device/examples/ds390/tinitalk/tinitalk.dsw,
2076         * device/examples/mcs51/clock/hw.h,
2077         * device/examples/mcs51/simple2/go.bat,
2078         * device/examples/serialcomm/windows/serial.h,
2079         * device/examples/xa51/dummy.c,
2080         * device/examples/xa51/hello.c,
2081         * device/include/80c51xa.h,
2082         * device/include/at89x051.h: corrected cvs line endings
2083
2084 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
2085
2086         * src/pic16/main.c (options): added command line --gstack, to trace
2087         stack over/under flows,
2088         * added pragma 'wparam' to allow passing first byte of function
2089         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
2090         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
2091         call to __gstack_test function and sets up the symbol as extern,
2092         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
2093         * popaop): added call to pic16_testStackOverflow,
2094         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
2095         wparamList list,
2096         * (genCall, genPcall): now all parameters are passed via stack
2097         except in functions that are pass to wparam pragma in which WREG is
2098         used too,
2099         * (genPcall): REENTRANT flag is checked to see if variable prototype
2100         contains reentrant keyword, don't call a non-reentrant function, via
2101         a reentrant function pointer or vice versa, functions are never
2102         passed via WREG,
2103         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
2104         D.Winkler,
2105         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
2106         SIGSEGV when accessing a NULL register stucture,
2107         * (pic16_printGPointerType): modified to handle UPPER modifier for
2108         function initializers, changed prototype of function to simpler one,
2109         * (pic16_printIvalFuncPtr): check to see if function is already
2110         added in externs list,
2111         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
2112         optimized a move from W to SFR with a move to the same register
2113         later after a CALL,
2114         * device/lib/pic16/debug: NEW directory, contains debug features
2115         which are enabled when linking with libdebug.lib, currently command
2116         line option --gstack enables stack pointer tracing for over/under
2117         flow, corresponding sources are in debug/gstack
2118
2119 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
2120
2121         * doc/sdccman.lyx: updated SDCC version,
2122         * (PIC16 port): update list of command line options,
2123         * src/pic16/device.h (structure pic16_options_t): added field gstack
2124         to enable stack overflow tracing on push/pops,
2125         * src/pic16/device.c (statistics structure): added statistics
2126         structure,
2127         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
2128         pic16_dump_int_registers): increase statistics counters for each
2129         * variable which is encountered
2130         * (pic16_dump_usection): emit each .udata variable to its own udata
2131         section,
2132         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
2133         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
2134         parameters via stack, otherwise use old scheme,
2135         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
2136         assembler output file,
2137         * src/pic16/main.c: added command line options --gstack to enable
2138         push/pop tracing for stack overflow,
2139         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
2140         instructions): added size of each instruction,
2141         * (pic16_countInstruction): estimate size of instructions in
2142         the_pFile list, inline assembly blocks are not counted,
2143         * (pic16_FixRegisterBanking): trace previous register usage, when
2144         banksel optimizations is greater than 0, don't emit a redudant
2145         banksel directive,
2146
2147 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
2148
2149         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
2150         * src/pic16/ralloc.c : applied same fix for pic16.
2151         * src/pic/gen.c : tidied it up a little.
2152
2153 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2154
2155         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
2156         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
2157
2158 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2159
2160         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
2161
2162 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2163
2164         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
2165         non-reentrant function __modsint in the interrupt function (thus
2166         corrupting math operations during serial I/O)
2167         * device/lib/ser_ir.c: as above, changed buffersize
2168         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
2169         256.c,d for zeroing
2170         * doc/Makefile: added option -t for rsync
2171
2172 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2173
2174         * src/SDCCast.h (struct ast),
2175         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
2176
2177 2004-10-20 Borut Razem <borut.razem AT siol.net>
2178
2179         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
2180         package
2181
2182 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
2183
2184         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
2185         makefile targets,
2186         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
2187         support functions to replace long sequences of MOVFF's from access
2188         bank registers to stack and vice versa,
2189         * src/pic16/device.h: added new field opt_flags, where optimization
2190         flags can be set to enable certain features,
2191         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
2192         * pBlock, (genFunction, genEndFunction): surroung loop for
2193         saving/loading used registers in stack with PC_INFO pCodes,
2194         INF_LREGS. Code in between can then be optimized by pCode optimizer
2195         to support function calls,
2196         * (genDataPointerSet): fixed bug which loaded float fields in
2197         structures with corrupt data,
2198         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
2199         in a standard way debug info on stderr. Feature used for developing
2200         and debugging only,
2201         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
2202         obsolete chunks of code,
2203         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
2204         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
2205         * pic16/src/pcode.c (pic16_newpCodeInfo,
2206         * (pic16_newpCodeOpLocalRegs),
2207         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
2208         feature,
2209         * (pic16_pCodeConstString): printing of the initial value of a
2210         symbol as a comment is inhibited since parsing was already done by
2211         copyStr and output is corrupt,
2212         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
2213
2214 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2215
2216         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
2217
2218 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
2219
2220         * as/mcs51/lkarea.c: removed old K&R style,
2221           (lnksect): changed check on boundary error,
2222           (lnksect2): changed check on boundary error,
2223           (lnksect2): extend XSTK to end of page if size = 1
2224         * as/mcs51/lkmain.c: removed old K&R style,
2225           (Areas51): create l_IRAM symbol
2226         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
2227         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
2228           model-mcs51-stack-auto, added model-mcs51-xstack-auto
2229         * device/lib/_mullong.c: added version to be compiled with xstack
2230         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
2231         * device/lib/mcs51/crtxclear.asm: clear pdata as well
2232         * device/lib/mcs51/crtxstack.asm: fixed comment
2233         * src/SDCCglue.c: maxInterrupts defaults to 0,
2234           (emitMaps): added pdata,
2235           (createInterruptVect): (re)moved default,
2236           (glue): added pdata,
2237           (glue): moved __start__xstack to XSTK with default size 1
2238         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
2239           and options.float_rent when options.stackAuto is set,
2240           (linkEdit): only write XDATA_NAME if provided on command line
2241         * src/SDCCmem.h,
2242         * src/SDCCmem.c: added pdata
2243         * src/port.h: added pdata_name to PORT
2244         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
2245           (saveRegisters, unsaveRegisters): removed usage of B,
2246           (genMinus): fixed accumulator clash,
2247           (genJumpTab): added comment, this needs another look
2248         * src/mcs51/gen.c: added check for "B in use" paranoia,
2249           added pushB() and popB()
2250         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
2251           chance
2252         * src/avr/main.c,
2253         * src/ds390/main.c,
2254         * src/hc08/main.c,
2255         * src/mcs51/main.c,
2256         * src/pic/main.c,
2257         * src/pic16/main.c,
2258         * src/xa51/main.c,
2259         * src/z80/main.c: (reset_regparms) made void parameter explicit and
2260           added PSEG (PAG,XDATA) or NULL to port specifier
2261         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
2262         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
2263           (_mcs51_genInitStartup): removed __start__xstack equ,
2264           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
2265         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
2266         * src/z80/gen.c (_rleAppend): fixed warnings
2267         * support/regression/tests/zeropad.c: added pdata test
2268         * .version: bumped to 2.4.6
2269
2270 2004-10-17 Borut Razem <borut.razem AT siol.net>
2271
2272         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
2273         as a part of nightly build
2274
2275 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
2276
2277         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
2278         WREG holds the first byte function parameters,
2279         * (aopForSym): take special case for symbols which are in FARSPACE
2280         but in CODESPACE too,
2281         * (assignResultValue): modified to take into account _G.useWreg,
2282         * (genCall): don't use wreg for parameter passing when function is
2283         declared as reentrant, too, added optimization INCF to stack
2284         pointer when stack parameter count is 1,
2285         * (genFunction, genEndFunction): refurnished and fixed to not using
2286         wreg for passing parameters when function has varargs or is
2287         reentrant, fixed bug with symbol name compare for generating
2288         functions in absolute address,
2289         * (pic16_storeForReturn): refurnished,
2290         * (genCmp): began writing a new version of the function, not ready
2291         yet, therefore it is disabled,
2292         * (genAssign): do not read code memory when assigning a function to
2293         a pointer function,
2294         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
2295         array of characters, not pointer,
2296         * (pic16initialComments): in debug mode emit an .ident directive for
2297         the assembler,
2298         * (_process_pragma): emit a new warning type (internal to pic16)
2299         when setting stack to default length, emit a similar warning when
2300         placing a function at absolute address and address is not word aligned
2301         * (_pic16_parseOptions): added 'return TRUE' statement,
2302         * (_pic16_linkEdit): if compiling a source, then add the source's
2303         file object, first in the list of objects to link,
2304
2305 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
2306
2307         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
2308         * src/pic/main.c : removed VC warning.
2309         * src/pic/gen.c : changed comment.
2310
2311 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
2312
2313         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
2314         reference to a deprecated symbol _GPTRREG was causing failure to
2315         link. Thanks G. M. Gallant for the info.
2316
2317 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
2318
2319         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
2320         comments for Bugs item #954788.
2321
2322 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
2323
2324         * src/pic16/device.c (pic16_dump_gsection,
2325         * pic16_groupRegistersInSection): handle symbols declared to be in
2326         access bank differently,
2327         * src/pic16/gen.c (struct _G): added field resDirect,
2328         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
2329         send values read from stack directly to result and don't allocate
2330         temporary values,
2331         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
2332         same registers,
2333         * (pic16_sameRegsOfs): NEW,
2334         * (freeAsmop): if _G.resDirect is set then do not mark registers as
2335         free because they were not allocated from temporary pool,
2336         * pic16_popRegFromString): workaround to fix a problem with
2337         allocating variables twice or never,
2338         * (genGenPointerGet): using PRODL instead of FSR0H,
2339         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
2340         instead of FSR0H,
2341         * (genAssign): take advantage of the _G.resDirect flag,
2342         * (genCast): around line 11844, use mov2f instead of directly
2343         MOVFF'ing between operands to account for literal values,
2344         * src/pic16/genutils.c: some new debug functions for gpsim have been
2345         added,
2346         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
2347         float with integer part only,
2348         * src/pic16/main.c (_process_pragma): handle pragma udata access to
2349         place variables in access bank
2350         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
2351         updated sources to reflect recent changes in gen.c
2352
2353 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
2354
2355         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
2356         sources that searched for headers in installation path, now the
2357         device/include/pic16 is used,
2358         * src/pic16/glue.c (pic16glue),
2359         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
2360         .line directives if not in debug mode, this suppresses assembler's
2361         warnings for ignored directives
2362
2363 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2364
2365         * src/port.h: made reset_regparms prototype void parameter explicit.
2366         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
2367         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
2368         * doc/sdccman.lyx: documented warning disabling and how to use
2369           printf_large to make it print floats.
2370         * device/include/stdbool.h: NEW
2371         * device/lib/_atof.c,
2372         * device/lib/_divuint.c,
2373         * device/lib/_divulong.c,
2374         * device/lib/expf.c,
2375         * device/lib/printf_large.c,
2376         * device/lib/sincosf.c,
2377         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
2378         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
2379           a completely reentrant lib.
2380
2381 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
2382
2383         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
2384         * device/include/pic16/stdio.h: fixed bug with colon
2385
2386 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
2387
2388         * device/include/pic16/stdio.h,
2389         * device/include/pic16/stdlib.h,
2390         * device/include/pic16/math.h: NEW
2391         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
2392         declared as _naked to reduce overhead
2393         * device/lib/Makefile.in (target port-specific-objects-pic16):
2394         changed * to *.* so to ignore the CVS directory,
2395         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
2396         stacked variables back in stack,
2397         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
2398         corruption
2399
2400 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
2401
2402         * .version: bumped version number to 2.4.5
2403         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
2404         * support/Util/SDCCerr.c (messages structure): added entry for
2405         W_POSSBUG2
2406
2407         Large cumulative patch for pic16 port and libraries.
2408         * device/include/pic16/sdcc-lib.h,
2409         * device/include/pic16/stdarg.h,
2410         * device/include/asm/pic16/features.h,
2411         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
2412         * device/include/pic16/float.h: changes reentrant keyword with
2413         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
2414         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
2415         updated target build-libraries to include objects from gptr,
2416         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
2417         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
2418         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
2419         all function headings,
2420         * src/SDCCmain.c: added global parameter userIncDirsSet,
2421         * (parseCmdLine): when option -I is encountered add directory to
2422         userIncDirsSet too,
2423         * src/version.awk: added space between control and long,
2424         * src/pic16/NOTES: added some notes for the port,
2425         * src/pic16/gen.c: added prototype for mov2fp function,
2426         * (fReturnpic16[]): properly named return value registers,
2427         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
2428         * (aopForSym): added code to handle symbols with onStack flag set,
2429         symbols onStack are allocated PTRSIZE bytes,
2430         * (aopFreeAsmop): handles special case where asmops are stack objects,
2431         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
2432         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
2433         added argument lock to trace flaws in allocating temporary registers
2434         when developing port,
2435         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
2436         * (pic16_popRegFromString): reenabled allocating a direct register
2437         from string,
2438         * (assignResultValue): various beautifications,
2439         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
2440         referenced function argument,
2441         * (genIpush): reenabled to allow stacked arguments, handles only
2442         ic->parmPush iCodes,
2443         * (genCall, genPcall): major changes to allow for variable argument
2444         functions, fixed a bug with falsely restoring stack pointer after
2445         returning from call,
2446         * (genFunction): pending code for critical function,
2447         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
2448         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
2449         * (genNearPointerGet): fixed bug with indirect reading, was always
2450         reading from INDF0
2451         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
2452         pointers,
2453         * (genAddrOf): rewrote code to take address of a stacked function parameter
2454         * (genCast): fixed casting to generic pointer type,
2455         * src/pic16/gen.h: added AOP_STA,
2456         * (struct asmop): added field stk,
2457         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
2458         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
2459         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
2460         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
2461         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
2462         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
2463         generic pointers,
2464         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
2465         and library paths,
2466         * (pic16_port structure): generic pointer size is set to 3,
2467         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
2468         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
2469         compiler warning,
2470         * src/pic16/ralloc.c (allocReg): prevent allocating register when
2471         operand is an iTemp,
2472
2473 2004-09-24 Martin Helmling <mh AT octo-soft.de>
2474
2475         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
2476         * debugger/mcs51/simi.c: addapt new syntax of s51
2477
2478 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
2479
2480         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
2481         * src/pic16/pcode.c: commented out some calls to free() in order to
2482         fix bug #989576,
2483
2484 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2485
2486         * src/SDCCicode.h,
2487         * src/SDCCicode.c (isiCodeInFunctionCall),
2488         * src/avr/ralloc.c (selectSpil),
2489         * src/pic/ralloc.c (selectSpil),
2490         * src/pic16/ralloc.c (selectSpil),
2491         * src/ds390/ralloc.c (selectSpil),
2492         * src/hc08/ralloc.c (selectSpil),
2493         * src/xa51/ralloc.c (selectSpil),
2494         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
2495         stack in the middle of a function call sequence (fixes bug #1020268)
2496         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
2497         costs associated with the minimum switch case.
2498
2499 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2500
2501         * src/SDCC.lex: fixed bug #1030549
2502
2503 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2504
2505         * src/SDCCcse.h (struct cseDef),
2506         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
2507         over a function call if the CSE is derived from a symbol whose
2508         address has been taken (fixes bug #1029883)
2509         * support/regression/tests/bug-1029883: a new regression test for
2510         this bug
2511
2512 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2513
2514         * src/hc08/gen.c (emitinline): fixed bug #1029778
2515         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
2516         to a cast object is no longer a syntax error ("fixes" bug #1030006,
2517         and starts toward RFE #905167)
2518
2519 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
2520
2521         * src/pic16/gen.c (mov2f): New function to move an operand to
2522         another without considering if it is a literal or a register,
2523         * (pic16_sameRegs): don't check if they are both AOP_REG,
2524         * (AccRsh): removed andmask=0 lines,
2525         * (genLeftShift): duplicated to be improved in future versions,
2526         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
2527         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
2528         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
2529         * (pic16initMnemonics): added initialization for POC_INFSNZW,
2530         * (insertBankSwitch): fixed inserting banksel directives algorithm
2531         for instructions that follow a skip instruction, this fixes a report
2532         for broken subtraction code generation,
2533         * src/pic16/ralloc.c (deassignLRs): do not free register if current
2534         iCode is a left op, just in case result and right share the same
2535         registers
2536
2537 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2538
2539         * src/hc08/main.c,
2540         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
2541         preservation of HX
2542         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
2543         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
2544         on 2004-09-12; it was buggy
2545
2546 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
2547
2548         * src/SDCCsymt.h: removed RESULT_CHECK
2549         * src/SDCCast.c,
2550         * src/SDCCglue.c,
2551         * src/SDCCval.c,
2552         * src/pic/glue.c,
2553         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
2554
2555 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
2556
2557         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
2558         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
2559         configuration values no more rejected by compiler, they are assigned
2560         to configuration registers with a warning message instead,
2561         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
2562         the for-loop so last conf register is emitted too,
2563         * (_pic16_initPaths): link library libsdcc.lib by default,
2564         * (_hasNativeMulFor): modified test for multiplication according to
2565         Raphael Neider's remarks. Integer multiplication is also done with
2566         support functions,
2567         * device/include/pic16/pic18fregs.h: corrected type error in while
2568         testing and including 18f6720 header file
2569
2570 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
2571
2572         * src/pic16/device.h (pic16_options): removed field use_crt,
2573         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
2574         until an optimization to handle single bits is added,
2575         * (pic16_loadFSR0): moved before genUnpackBits,
2576         * (genAnd): some white lines removed,
2577         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
2578         leave_reset flags in pic16_options when using crt modules,
2579
2580 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
2581
2582         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
2583           for bugs 898889 & 979599. Also used some safer print instructions.
2584
2585 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
2586
2587         * src/pic16/device.h (pic16_options_t): added field use_crt,
2588         crt_name, no_crt,
2589         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
2590         catch a probable future bug,
2591         * src/pic16/gen.c: aopIdx function commented out,
2592         * (genAssign): commented out old code which used aopIdx,
2593         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
2594         code, added if conditionals to take into account the --use-crt
2595         command line options,
2596         * src/pic16/main.c (pic16_optionsTable): added new command line
2597         options, --use-crt= and --no-crt,
2598         * (_pic16_linkEdit): now the proper crt object is added in the
2599         linker command line except than when --no-crt is specified,
2600         * src/pic16/pcode.c,
2601         * src/pic16/pcode.h: added some structures and functions for a new
2602         optimization scheme to compansate for instruction overhead between
2603         same iCodes, this scheme is currently under development and is not
2604         working in any way,
2605         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
2606         to && operator,
2607         * device/lib/pic16/startup/crt0i.c,
2608         * device/lib/pic16/startup/crt0iz.c: added global char variable
2609         __uflags to force the generation of an idata section
2610
2611 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
2612
2613         * doc/Makefile,
2614         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
2615         * doc/sdccman.lyx: updated sdcc version to 2.4.4
2616
2617 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2618
2619         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
2620         Frieder) and clarified the default code optimization mode
2621
2622 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2623
2624         * src/SDCC.lex (doPragma, process_pragma),
2625         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
2626         "opt_code_size", and "opt_code_balanced"
2627         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
2628         regrouped options by category, added support for category headers
2629         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
2630         and "--opt-code-size"
2631         * doc/sdccman.lyx: documented these new options and pragmas
2632         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
2633         preference into account
2634
2635 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2636
2637         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
2638           geniCodePreDec): Fixed bug 904237 by generating a warning
2639         * src/SDCCerr.h,
2640         * src/SDCCerr.c: added warning W_SIZEOF_VOID
2641
2642 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
2643
2644         * src/pic/device.c : When no max ram set validate full memory range.
2645         * src/pic/pcode.c,
2646         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
2647
2648 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2649
2650         * device/lib/_gptrget.c,
2651         * device/lib/_gptrput.c: updated comment
2652         * device/lib/calloc.c,
2653         * device/lib/free.c,
2654         * device/lib/malloc.c,
2655         * device/lib/realloc.c: added LGPL, made them reentrant-safe
2656         * src/SDCCcse.c (cseBBlock),
2657         * src/SDCCicode.c (printOperand, geniCodeArray),
2658         * src/SDCCicode.h (struct operand): fixed bug 868103
2659         * support/regression/tests/bug-868103.c: added
2660         * src/SDCCast.c (searchLitOp),
2661         * src/SDCCcse.h (struct cseDef),
2662         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
2663         * src/SDCCicode.h (struct operand),
2664         * src/SDCCsymt.h (struct sym_link),
2665         * src/avr/gen.c (hasInc),
2666         * src/ds390/gen.c (hasInc),
2667         * src/hc08/gen.c (genPlusIncr, hasInc),
2668         * src/mcs51/gen.c (hasInc),
2669         * src/pic16/glue.c (pic16_printIvalChar),
2670         * src/pic16/ralloc.c (regWithIdx),
2671         * src/xa51/gen.c (hasInc) : removed warnings
2672         * src/SDCCast.c (createBlock): added comment ???
2673         * src/hc08/ralloc.c: updated comments
2674
2675 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2676
2677         * doc/sdccman.lyx: updated section on switch statements, added
2678         section about semaphore locking
2679         * doc/Makefile: added option -info for latex2html
2680         * device/lib/_gptrget.c,
2681         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
2682
2683 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
2684
2685         * src/pic/device.h,
2686         * src/pic/device.c,
2687         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
2688          maxram is less than 0x100.
2689
2690 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
2691
2692         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
2693
2694 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2695
2696         * src/port.h,
2697         * src/mcs51/main.c,
2698         * src/ds390/main.c,
2699         * src/z80/main.c,
2700         * src/hc08/main.c,
2701         * src/pic/main.c,
2702         * src/pic16/main.c,
2703         * src/avr/main.c,
2704         * src/xa51/main.c
2705         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
2706         a jump table is the best form for a switch statement, including
2707         automatic insertion of missing cases to make the case range
2708         continuous. Developed in collaboration with Frieder Ferlemann.
2709
2710 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2711
2712         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
2713         accumulator result if it needs sign extension
2714
2715 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2716
2717         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
2718
2719 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2720
2721         * device/lib/gbz80/printf.c,
2722         * device/lib/z80/printf.c: removed define for NULL
2723
2724 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2725
2726         * as/xa51/xa_link.c,
2727         * device/examples/ds390/ow390/ad26.c,
2728         * device/examples/ds390/ow390/cnt1d.c,
2729         * device/examples/ds390/ow390/counter.c,
2730         * device/examples/ds390/ow390/ds2480.h,
2731         * device/examples/ds390/ow390/ds2480ut.c,
2732         * device/examples/ds390/ow390/findtype.c,
2733         * device/examples/ds390/ow390/gethumd.c,
2734         * device/examples/ds390/ow390/owllu.c,
2735         * device/examples/ds390/ow390/ownetu.c,
2736         * device/examples/ds390/ow390/swt12.c,
2737         * device/examples/ds390/ow390/swtloop.c,
2738         * device/examples/ds390/ow390/temp.c,
2739         * device/examples/ds390/ow390/temp10.c,
2740         * device/examples/ds390/ow390/thermo21.c,
2741         * device/examples/ds390/ow390/tinilnk.c,
2742         * device/examples/ds390/ow390/tstfind.c,
2743         * device/examples/serialcomm/windows/serial.cpp,
2744         * device/examples/serialcomm/windows/test_serialcomm.cpp,
2745         * device/include/reg51.h: fixed line endings for cvs
2746
2747 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2748
2749         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
2750         packRegsForAccUse, packRegisters): new accumulator register
2751         packing algorithm
2752         * support/regression/ports/hc08/support.c (_putchar): suppress
2753         warning of unused variable
2754         * src/SDCCicode.c: added SWAP entry to codeTable
2755
2756 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
2757
2758         * device/lib/sprintf.c: forgot to add this file before previous commit
2759
2760 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
2761
2762         * src/pic16/gen.c (genPackBits): added operand right in function
2763         parameters, load result directly if p_type is POINTER (that is
2764         called by genNearPointerSet)
2765         * (genUnPackBits): added operand left in function parameters,
2766         * (genNearPointerGet, genNearPointerSet): prevent the loading of
2767         FSR0 if accessing bitfields,
2768
2769 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
2770
2771         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
2772           _print_format; updated printf, sprintf, vsprintf
2773         * device/include/asm/default/features.h: corrected comment/define
2774         * device/lib/Makefile.in: added sprintf.c
2775         * device/lib/libsdcc.lib: added sprintf module
2776         * device/lib/printf_large.c,
2777         * device/lib/vprintf.c,
2778         * device/lib/sprintf.c: totally refactored printf_large and vprintf
2779           into these 3 files
2780         * support/regression/Makefile: changed ALL_PORTS into a usefull default
2781         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
2782         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
2783           hc08 test
2784         * support/regression/tests/zeropad.c: define idata as data for hc08
2785
2786 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2787
2788         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
2789         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
2790         labels are referenced at least once (even if a reference is not found)
2791         * src/hc08/gen.c (emitcode): set isComment flag for comments
2792         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
2793         loads), rules 6a..6b (optimize jumps to return)
2794
2795 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2796
2797         * device/lib/acosf.c (acosf),
2798         * device/lib/asinf.c (asinf),
2799         * device/lib/atanf.c (atanf),
2800         * device/lib/ceilf.c (ceilf),
2801         * device/lib/cosf.c (cosf),
2802         * device/lib/coshf.c (coshf),
2803         * device/lib/cotf.c (cotf),
2804         * device/lib/fabsf.c (fabsf),
2805         * device/lib/floorf.c (floorf),
2806         * device/lib/log10f.c (log10f),
2807         * device/lib/logf.c (logf),
2808         * device/lib/sinf.c (sinf),
2809         * device/lib/sinhf.c (sinhf),
2810         * device/lib/sqrtf.c (sqrtf),
2811         * device/lib/tanf.c (tanf),
2812         * device/lib/tanhf.c (tanhf),
2813         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
2814         replaced all instances of "reentrant" in the library functions
2815         defined in math.h with this macro.
2816         * support/regression/tests/float_trans.c: reenabled test for hc08
2817
2818 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
2819
2820         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
2821         erroneously deleted
2822
2823 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2824
2825         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
2826         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
2827         multi-byte volatile operands are used
2828         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
2829         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
2830         initialization to area GSINIT0 so that it would always precede
2831         any static initializers in GSINIT
2832         * support/regression/tests/zeropad.c: fixed idata define for hc08
2833         * support/regression/tests/bug-927659.c,
2834         * support/regression/tests/float_trans.c: disabled tests for hc08
2835         pending missing library routines
2836         * .version: increased version number to 2.4.4 - hc08 port now passes
2837         regression tests
2838
2839
2840 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
2841
2842         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
2843         * Makefile.common.in,
2844         * as/Makefile,
2845         * as/hc08/Makefile.in,
2846         * as/mcs51/Makefile.in,
2847         * as/z80/Makefile.in,
2848         * debugger/mcs51/Makefile.in,
2849         * device/include/Makefile.in,
2850         * device/lib/Makefile.in,
2851         * doc/Makefile,
2852         * link/Makefile,
2853         * link/z80/Makefile.in,
2854         * packihx/Makefile.in,
2855         * sim/ucsim/main_in.mk,
2856         * sim/ucsim/avr.src/Makefile.in,
2857         * sim/ucsim/doc/Makefile.in,
2858         * sim/ucsim/gui.src/serio.src/Makefile.in,
2859         * sim/ucsim/hc08.src/Makefile.in,
2860         * sim/ucsim/s51.src/Makefile.in,
2861         * sim/ucsim/xa.src/Makefile.in,
2862         * sim/ucsim/z80.src/Makefile.in,
2863         * src/Makefile.in,
2864         * support/cpp2/Makefile.in,
2865         * support/librarian/Makefile,
2866         * support/makebin/Makefile: added DESTDIR to the install path proposed
2867         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
2868         * doc/sdccman.lyx: added DESTDIR documentation
2869
2870 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
2871
2872         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
2873         instruction for interrupt handlers, use fast returns when returning
2874         from high priority interrupts
2875
2876 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2877
2878         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
2879         code generation
2880         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
2881         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
2882         bugs, ported much of Bernhard's code from mcs51
2883         * src/mcs51/gen.c (genSend),
2884         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
2885         than one when calling a reentrant function
2886         * device/lib/_mullong.c: defined an alternate struct layout for big
2887         endian ports (hc08)
2888
2889 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2890
2891         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
2892         test
2893
2894 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2895
2896         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
2897         are sane and complete before asking the port its prefered parameter
2898         passing method (fixes bug #1017633)
2899         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
2900         and _ret3
2901
2902 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2903
2904         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
2905         problem in bitfields >= 8 bits.
2906
2907 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
2908
2909         * src/SDCCsymt.c: undid changes that were not meant to be committed
2910
2911 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
2912
2913         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
2914
2915 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
2916
2917         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
2918           copied and wrong bit got inverted
2919
2920 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2921
2922         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
2923         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
2924         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
2925         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
2926         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
2927         assignments to bitfields at known addresses
2928         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
2929         reads from bitfields at known addresses
2930         * src/hc08/ralloc.c (packRegisters),
2931         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
2932         genhc08Code): optimize pointer get values used as conditionals
2933         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
2934         and branch
2935
2936 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2937
2938         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
2939         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
2940         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
2941         as conditionals
2942
2943 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2944
2945         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
2946
2947 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2948
2949         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
2950         related problems
2951
2952 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
2953
2954         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
2955
2956 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2957
2958         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
2959         mcs51 port
2960
2961 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
2962
2963         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
2964
2965 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2966
2967         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
2968         cases use more compact code.
2969
2970 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
2971
2972         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
2973
2974 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2975
2976         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
2977
2978 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2979
2980         * src/SDCCsymt.h,
2981         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
2982         parameter of changePointer() from symbol* to sym_link*
2983         * src/SDCCast.c (decorateType): call changePointer() for CAST op
2984         * src/SDCCsymt.c (compareType): void* type is castable to other
2985         pointers, but not necesarily an exact match.
2986         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
2987         is no longer blindly treated as an exact match.
2988         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
2989
2990 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
2991
2992         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
2993
2994 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
2995
2996         * src/pic/gen.c,
2997         * src/pic/pcode.c,
2998         * src/pic/ralloc.h,
2999         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
3000
3001 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
3002
3003         * src/pic/device.c,
3004         * src/pic/device.h,
3005         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
3006
3007 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3008
3009         * src/mcs51/gen.c (emitcode): fixed bug #992819
3010
3011 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
3012
3013         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
3014           there's no need to make it worse
3015
3016 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3017
3018         * src/mcs51/ralloc.c (deassignLR),
3019         * src/ds390/ralloc.c (deassignLR),
3020         * src/hc08/ralloc.c (deassignLR),
3021         * src/z80/ralloc.c (deassignLR),
3022         * src/pic/ralloc.c (deassignLR),
3023         * src/pic16/ralloc.c (deassignLR),
3024         * src/avr/ralloc.c (deassignLR),
3025         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
3026         rlivePoint): fixed another part of bug #971834
3027
3028 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3029
3030         * src/z80/main.c: enabled "critical" keyword
3031         * src/z80/mappings.i,
3032         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
3033         functions (fixes bug #979646)
3034         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
3035
3036 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3037
3038         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
3039           such as c:\mydir.
3040
3041 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
3042
3043         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
3044           doesn't disable too much optimizations
3045
3046 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3047
3048         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
3049
3050 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
3051
3052         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
3053
3054 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3055
3056         * src/pic/gen.c tidied up tabs
3057         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
3058         * src/pic/main.c tidied up tabs
3059         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
3060         * src/pic/pcoderegs.c tidied up tabs
3061         * src/pic/ralloc.c tidied up tabs
3062
3063 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
3064
3065         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
3066         to S_FIXED for pic16 port and when symbol is not in level 0,
3067         allocate for S_REGISTER storage class and pic16 port, too,
3068         * src/pic16/device.h: prototype for checkSym,
3069         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
3070         * (pic16_assignConfigWordValue): test the value and the mask to
3071         validate that the value is suitable for the configuration word,
3072         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
3073         collect extern declared symbols, don't emit symbol twice, check
3074         first if symbol is in publics set first,
3075         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
3076         * added command line '--fstack' which enables an experimental
3077         feature for stack access, too buggy to be used yet...
3078         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
3079         * (pic16_allocDirReg): when register has storage class S_REGISTER
3080         allocate in pic16_dynAccessRegs,
3081         * device/include/pic16/pic18f????.h: modified configuration word
3082         naming convention, words started as CONFIG0H but should be CONFIG1H
3083
3084 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3085
3086         * device/include/mcs51reg.h: fixed bug 970993
3087
3088 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
3089
3090         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
3091         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
3092         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
3093         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
3094         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
3095         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
3096           error/warning numbers,
3097           added function setWarningDisabled()
3098         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
3099         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
3100           _memcmp.c _memmove.c calloc.c realloc.c free.c
3101         * support/regression/tests/malloc.c: added tests for new functionality
3102         * support/regression/tests/zeropad.c: added tests for truncated initializers
3103           and initialized char arrays starting with '\x0'
3104         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
3105
3106 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
3107
3108         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
3109
3110 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3111
3112         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
3113         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
3114         peephole 177.e. Thanks to anonymous
3115
3116 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
3117
3118         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
3119         function isn't used in the source but referenced as a
3120         variable initializer then declare it as extern in .asm file
3121
3122 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
3123
3124         * .version: increased version number to 2.4.3
3125
3126         Adding version extension according to ChangeLog CVS revision
3127         * src/Makefile.in (target all): added dependency 'version.h'
3128         * (rule version.h): added rule to create version.h from ChangeLog,
3129         * (rule dep): added dependency version.h,
3130         * src/version.awk: AWK script to create version.h
3131         * src/SDCCdwarf2.c (dwWriteModule),
3132         * src/SDCCglue.c (initialComments),
3133         * src/SDCCmain.c (printVersionInfo): modified to write after
3134         version string the version extension number,
3135         * src/SDCCutil.c: included "version.h"
3136         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
3137         number,
3138         * src/SDCCutil.h: added prototype for getBuildNumber
3139
3140         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
3141         includeDirsSet, too,
3142         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
3143         const char [] is found in function prototype...
3144
3145         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
3146         moving to WREG with source is already in WREG,
3147         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
3148         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
3149         * (aopForSym): stack'ed symbols are partially supported, added
3150         if-clause to support symbols in FARSPACE,
3151         * (sameRegs): added test for AOP_ACC to see if registers are same,
3152         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
3153         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
3154         * (pic16_popRegFromString): will not allocate a new register if it
3155         doesn't find one by name, bug may have introduced...
3156         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
3157         * (genIpush): revived to use pic16 port's stack,
3158         * (genAddrOf): added incomplete case for stack'ed operand,
3159         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
3160         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
3161         can handle multibyte operands,
3162         * src/pic16/glue.c (pic16_printIval*): some debug info added,
3163         * (pic16initialComments): added message for MPLAB compatibility
3164         mode enabled,
3165         * src/pic16/main.h: prototype for pic16_mplab_comp,
3166         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
3167         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
3168         * (_pic16_linkEdit): NEW, handles link stage, transferred here
3169         because of increased complexity of procedure,
3170         * (_process_pragma): stack pragma changed to format 'stack pos len',
3171         emit symbol '_stack_end' to conform with gplink,
3172         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
3173         to search for register,
3174         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
3175         PO_GPR_REGISTER,
3176         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
3177         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
3178         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
3179         case for PO_GPR_REGISTER,
3180         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
3181         dies, the new era is ahead !...
3182         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
3183         pic16_dynInternalRegs,
3184         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
3185         * (pic16_allocDirReg): minor optimizations and bug fixes,
3186         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
3187
3188         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
3189         load stack and frame pointer with address of 'stack_end' symbol
3190
3191 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
3192
3193         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
3194         without source code but only variable initializers
3195
3196 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
3197
3198         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
3199         external are not declared as extern to reduce overhead while linking
3200
3201 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
3202
3203         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
3204
3205 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
3206
3207         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
3208           Yee Keat for the patch
3209         * src/SDCCast.c (decorateType): fixed bug #979599
3210         * src/ds390/gen.h: removed local fReturnSizeDS390
3211         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
3212         * src/ds390/gen.c (genAnd, genOr, genXor),
3213         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
3214
3215 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
3216
3217         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
3218         add relFilesSet to $3, manipulate $2 to handle linking of object
3219         files without source files in command line,
3220         * device/include/pic16 (all headers): added ID location macros,
3221         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
3222         entries for ID location bytes,
3223         * (pic16_assignIdByteValue): NEW,
3224         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
3225         added field dumpcalltree to pic16_options_t,
3226         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
3227         is used instead of pic16_Gstack_base_addr, check if (ifx) before
3228         emitting rFalseIfx label after check_carry label,
3229         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
3230         pic16_emitDIRegs), NEW
3231         * (pic16glue): dump .calltree file when option --calltree found,
3232         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
3233         * (_pic16_genAssemblerPreamble): emit ID locations after
3234         configuration registers,
3235         * (pic16_linkCmd): modifications of the link command,
3236         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
3237         * (pic16_pCodeInitRegisters): don't init stack registers,
3238         * (pic16_findPrevInstruction): fixed bug,
3239         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
3240         bug with immediate registers,
3241         * (buildCallTree): traces stack push and pop,
3242         * (pct2): dump also stack usage for each function,
3243         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
3244         * (pic16_allocDirReg): various modifications,
3245         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
3246         fixed to 1,
3247
3248 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
3249
3250         * src/pic16/pcode.c: removed buggy double colon
3251
3252 2004-07-01 Borut Razem <borut.razem AT siol.net>
3253
3254         * support/scripts/sdcc.nsi: added include/pic16 to setup
3255
3256 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
3257
3258         * device/lib/Makefile.in: fixed bug in target objects-pic16,
3259         * device/lib/pic16/Makefile: prefixed with dash (-) command under
3260         target 'clean',
3261         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
3262         specific command line arguments. Also added sample lkr script
3263         for placing a variable at a specific memory bank.
3264         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
3265         at a specific memory bank,
3266         * (pic16_dump_isection): fixed bug which caused string literals to
3267         be omitted when dumping idata section,
3268         * (pic16_groupRegistersInSection): added code to handle registers
3269         in specific memory banks,
3270         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
3271         public, all references are renamed too,
3272         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
3273         AOP_DPTR2,
3274         * (pic16_storeForReturn): added case to handle when dest is WREG,
3275         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
3276         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
3277         pic16_rel_udata, check to see if that register is marked as being
3278         a member of a specific memory bank,
3279         * (pic16_printIvalCharPtr): added code to add string literals either
3280         to code or the idata sections,
3281         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
3282         also accept the 'udata' pragma,
3283         * src/pic16/main.h: new structure types sectName and sectSym
3284         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
3285         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
3286         * (pic16_findPrevInstruction): fixed, it returned nothing,
3287         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
3288         instruction combinations,
3289         * (pic16_FixRegisterBanking): heavily reorganised,
3290         * (pic16_AnalyzeBanking): if generating banksel directives is
3291         disabled, then don't call FixRegisterBanking at all,
3292         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
3293         completely removed,
3294         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
3295
3296 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
3297
3298         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
3299         Phuah Yee Keat <yk.phuah AT nestac.com>
3300
3301 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3302
3303         * src/pic16/glue.c (pic16createInterruptVect): function now emits
3304         correctly the IVT even if it is relocated to some other location
3305
3306 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3307
3308         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
3309         * device/include/pic16/pic18f2220.h: NEW,
3310         * device/lib/pic16/libdev/pic18f2220.c: NEW,
3311         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
3312         * src/pic16/device.c (struct Pics16): added info for 18f2220,
3313         * src/pic16/device.h (struct pic16_options): added ivt_loc and
3314         nodefaultlibs, ivt_loc is the location of the interrupt vector
3315         table, and nodefaultlibs signs that default libraries should not be
3316         linked in link stage,
3317         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
3318         according to --ivt-loc argument,
3319         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
3320         when pragma stack is found,
3321
3322 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3323
3324         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
3325         256 (range check), 257 (do while), 258.a-f (bit banging
3326         f.e. on 3-wire SPI bus)
3327
3328 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3329
3330         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
3331         variables used exclusively within a loop
3332
3333 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
3334
3335         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
3336
3337 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3338
3339         * src/SDCClrange.c (computeClash): fixed bug #971834
3340
3341 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3342
3343         * src/mcs51/gen.c (genCmp): fixed bug #975903
3344         * src/hc08/gen.c (operandsEqu),
3345         * src/ds390/gen.c (operandsEqu),
3346         * src/z80/gen.c (operandsEqu),
3347         * src/pic/gen.c (operandsEqu),
3348         * src/pic16/gen.c (operandsEqu),
3349         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
3350         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
3351
3352 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3353
3354         * src/SDCCcse.c (cseBBlock): fixed bug #966963
3355
3356 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
3357
3358         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
3359         default case in switch statement,
3360         * glue.c (pic16_initPointer): expr is initialised via decoarteType
3361         to eliminate problem with initialisation of pointers, but problem
3362         still exists,
3363         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
3364         * (emitStaticSegment): removed various lines emitting debug info,
3365         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
3366         added processor registers for utilizing EEPROM,
3367         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
3368         configurable and set 8
3369
3370 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
3371
3372         * .version: increased version number to 2.4.2,
3373
3374         Cumulative patch for pic16 port
3375         * src/pic16/device.c: changed scheme to dump initial values for
3376         variables in idata segment, all print_idata* functions were removed,
3377         now the pic16_printIval* will be called,
3378         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
3379         * _pic16_printPointerType, pic16_printPointerType,
3380         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
3381         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
3382         NEW, similar to the respective functions in SDCCglue.c,
3383         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
3384         way, emitting hex bytes,
3385         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
3386
3387 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3388
3389         * src/avr/ralloc.c (serialRegAssign),
3390         * src/xa51/ralloc.c (serialRegAssign),
3391         * src/pic/ralloc.c (serialRegAssign),
3392         * src/pic16/ralloc.c (serialRegAssign),
3393         * src/hc08/ralloc.c (serialRegAssign),
3394         * src/z80/ralloc.c (serialRegAssign),
3395         * src/ds390/ralloc.c (serialRegAssign),
3396         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
3397
3398 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3399
3400         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
3401         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
3402
3403 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
3404
3405         Cumulative patch for pic16 port:
3406         * src/pic16/device.h (typedef PIC16_device) modified fields for
3407         defining microcontrollers,
3408         * src/pic16/device.c: added new info for all devices in Pics16 array,
3409         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
3410         to be optimised out by the pCode optimiser,
3411         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
3412         specially, bug reported by G.M. Gallant,
3413         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
3414         as force'd so that cannot be optimised out by pCode optimiser,
3415         * src/pic16/pcode.c,
3416         * src/pic16/pcodepeeph.c,
3417         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
3418         they are disabled by default, but can be enabled explicit with
3419         command argument --denable-peeps, for testing,
3420         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
3421         --pomit-ivt in COMPILE_FLAGS
3422
3423 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3424
3425         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
3426           compilation on MSVC
3427
3428 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3429
3430         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
3431
3432 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3433
3434         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
3435         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
3436
3437 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
3438
3439         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
3440         would only assign 0x300001 register.
3441
3442 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
3443
3444         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
3445         in COMPILE_FLAGS. Thanks to G. Gallant for report.
3446
3447 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3448
3449         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
3450         for ds80c400
3451         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
3452         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
3453         added peephole 254 (left shift), 255 (jump table)
3454
3455 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
3456
3457         * device/lib/Makefile.in: removed comment line with model-pic16,
3458         * (target port-specific-objects-pic16): the libraries and objects
3459         are copied to the build directory form the device/lib/pic16/bin
3460         directory
3461
3462         Cumulative patch concerning pic16 port:
3463         * library directory has been re-organized,
3464         * added support for PIC18F1220,
3465         * added headers and library sources for chips 18f1220,18f6520,
3466         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
3467
3468         * configuration registers setting has changed, now each supported
3469         device has a complete description of the registers it uses,
3470         * all initialisations are moved to idata sections, these section
3471         can be absolute or relocatable,
3472         * fixed initialisation of codespace variables,
3473         * fixed warning about PCLATU and gpsim,
3474         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
3475         * (genAssign): use table reads when assigning from variables in codespace,
3476         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
3477         char/int variables placed in codespace,
3478         * (pic16_emitConfigRegs): NEW, emits a list with configuration
3479         registers set in .asm file, no need for --pomit-config-words anymore,
3480         * (pic16glue): some 8051 legacy segments are commented out
3481         (to be removed completely),
3482         * added support for alternative assembler and linker with --asm=
3483         and --link= command line arguments,
3484         * peepholes are disabled automatically in the port, no need to
3485         specify on command line,
3486         * port supports natively char/int/long multiplication, but converts
3487         all divisions to support functions,
3488         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
3489         to the file set in variable $2,
3490         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
3491         strings in ASCII format and not in hex,
3492         * ralloc.c (serialRegAssign): added a triplet of conditional calls
3493         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
3494         allocate proper register if iCodes aren't temporary,
3495
3496 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
3497
3498         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
3499
3500 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
3501
3502         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
3503         is commented out
3504
3505 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3506
3507         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
3508         computed address is reused
3509         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
3510         multi-byte bitfields
3511
3512 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3513
3514         * src/z80/gen.c: (genArrayInit): must check for pointers too
3515
3516 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3517
3518         * support/regression/tests/zeropad.c: never meant to commit the
3519           nestedstruct test: removed, added check for GCC version
3520
3521 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
3522
3523         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
3524         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
3525         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
3526           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
3527           bugs 928906 and 954082 half-empty initializers
3528         * src/SDCCsymt.h,
3529         * src/SDCCsymt.c (getAllocSize): added for above fix
3530         * src/z80/gen.c (genArrayInit): fixed bug 741044
3531         * support/regression/tests/zeropad.c: added tests
3532
3533 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
3534
3535         * src/pic16/device.c (pic16_dump_section): corrected bug which
3536         caused some symbols of the libraries to be misplaced
3537
3538 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3539
3540         * src/pic16/glue.c,
3541         * src/pic16/ralloc.h,
3542         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
3543         to fix conflict with pic port
3544
3545 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3546
3547         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
3548         externs configuration variables,
3549         * src/pic16/ralloc.h,
3550         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
3551         prototype in header, commented out some debug messages
3552
3553 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
3554
3555         * src/pic16/glue.c,
3556         * src/pic16/main.c,
3557         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
3558         for gpasm COFF object generation. Thanks to D. Hawkins for
3559         his patch info
3560
3561 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3562
3563         * src/ds390/main.c,
3564         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
3565         Brock for spotting this)
3566         * src/ds390/gen.c (genEndFunction),
3567         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
3568         interrupt handler and critical. Disable push/pop optimizations when
3569         peephole optimizations disabled.
3570
3571 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3572
3573         Updated pic16 library sources and headers.
3574         * device/lib/pic16/pic18f*/ ,
3575         * device/include/pic16/*.h: modified to handle structured SFR
3576         definitions
3577
3578 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3579
3580         * src/port.h (PORT structure): added hook initPaths, now each
3581         port can declare its own default search paths,
3582         which can been seen with the --print-search-dirs option,
3583         see pic16 port for example,
3584         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
3585         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
3586         * (doPrintSearchDirs): NEW, replaces in a central manner the
3587         printing of search dirs which was split in set*Paths functions,
3588         * (main): added call to port->initPaths and doPrintSearchDirs,
3589         * src/avr/main.c,
3590         * src/ds390/main.c,
3591         * src/hc08/main.c,
3592         * src/izt/i186.c,
3593         * src/izt/tlcs900h.c,
3594         * src/mcs51/main.c,
3595         * src/pic/main.c,
3596         * src/pic16/main.c: modified port structures to reflect addition of
3597         initPaths hook,
3598
3599         * src/pic16/device.c (regCompare): registers are finally sorted by name,
3600         * (pic16_dump_section): for registers in same address reserve memory once,
3601         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
3602         to no_banksel,
3603         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
3604         result is greater in size than right or left,
3605         * (pic16_genUMult8X8_8): there are some cases where the result can
3606         be 16 bits size, so handle these,
3607         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
3608         * (pic16_outBitC): modified to emit pcodes,
3609         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
3610         or not,
3611         * (genDivOneByte): implemented algorithm to divide 8-bits,
3612         * (genCmp): uncommented goto, but issues still exist,
3613         * (genAnd): fixed a bug with variables >8bits,
3614         * (genPackBits): optimization added that uses BCF/BSF to change a
3615         single bit,
3616         * (genAssign): fixed bug when assigning floating point literals,
3617         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
3618         __sdcc_gsinit_startup label,
3619         * src/pic16/main.c (_pic16_init): removed search directory
3620         initialisations,
3621         * (_pic16_initPaths): NEW, used to initialise search directories,
3622         * (_hasNativeMulFor): support functions for all except char/int
3623         multiplication, and char division,
3624         * (PIC16_port struct): modified entry for native mul support,
3625         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
3626         no_banksel option,
3627         * (buildCallTree): call to register_usage is ifdef'ed out,
3628
3629 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3630
3631         * device/include/string.h: applied Stas Sergeev's patch to make this
3632         header file compatible with the preprocessor -Wundef option
3633         * src/SDCCmain.c (main): abort compilation if preprocessor reports
3634         failure (fixes bug #941458)
3635
3636 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3637
3638         * src/SDCCopt.c (killDeadCode): fixed bug #907733
3639         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
3640         that the variable, not the function, should be static
3641         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
3642         to be consistent with non-literal case
3643
3644 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3645
3646         * src/SDCCast.c (isConformingBody): fixed bug #949967
3647         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
3648         convilong): fixed bug #952086
3649
3650 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3651
3652         * src/SDCCmem.c (allocVariables): fixed bug #955321
3653
3654 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3655
3656         * src/hc08/main.c (_hc08_genAssemblerEnd),
3657         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
3658         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
3659         completely eliminated the use of a temporary file
3660         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
3661         when more than one file linked
3662         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
3663
3664 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3665
3666         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
3667         which fixes bug #543481
3668         * support/regression/tests/bug-751703.c: fixed comments left from a
3669         cut and paste error
3670         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
3671         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
3672         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
3673         scopes
3674         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
3675         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
3676         are now changed to underscores in moduleName
3677
3678 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3679
3680         * as/mcs51/lkmem.c: better fix for bug #954173
3681
3682 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
3683         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3684
3685         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
3686         * device/include/c8051f000.h,
3687         * device/include/c8051f120.h,
3688         * device/include/c8051f300.h,
3689         * device/include/c8051f310.h,
3690         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
3691         PWM16) and detab'ed
3692
3693 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3694
3695         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
3696         and mailing lists, doc'ed --no-peep-comments, removed reference
3697         to knoppix (newest version has no LyX/LaTeX), other minor changes
3698         * src/SDCCglue.c (glue): save 2 bytes stack space with
3699         option --main-return. The ljmp could probably be avoided too
3700
3701 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3702
3703         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
3704
3705 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3706
3707         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
3708         * src/SDCCopt.c (isLocalWithoutDef),
3709         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
3710         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
3711         (credit to Maarten Brock for patch #949363, on which this is based)
3712         * support/regression/tests/bug-751703.c: some test cases of extern used
3713         within inner scopes.
3714
3715 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3716
3717         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
3718         SPEC_STRUCT
3719         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
3720         struct definitions
3721         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
3722         dwWriteLabel): fix to create valid debugger symbols even when
3723         the module name has non-alphanumeric symbols in it
3724         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
3725         when a variable's allocation has been optimized away
3726
3727
3728 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3729
3730         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
3731         * src/hc08/main.c,
3732         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
3733         * src/mcs51/main.c,
3734         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
3735         * src/ds390/main.c,
3736         * src/z80/gen.c (z80_emitDebuggerSymbol),
3737         * src/z80/main.c,
3738         * src/pic/gen.c (pic14_emitDebuggerSymbol),
3739         * src/pic/main.c,
3740         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
3741         * src/pic16/main.c,
3742         * src/avr/gen.c (avr_emitDebuggerSymbol),
3743         * src/avr/main.c,
3744         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
3745         * src/xa51/main.c,
3746         * src/SDCCdebug.c (emitDebuggerSymbol),
3747         * src/SDCCdebug.h,
3748         * src/port.h: added a debugger struct to the port struct. Added a
3749         callback for defining debugger symbols
3750
3751         * src/SDCCast.c (createLabel),
3752         * src/SDCC.y (labeled_statement): mark all compiler generated labels
3753         with isitmp = 1
3754         * src/SDCCicode.h,
3755         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
3756         iCode back to the ast for the function
3757
3758         * src/hc08/ralloc.c (hc08_assignRegisters),
3759         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
3760         unneeded fields from the regs struct.
3761         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
3762         pushReg() & pullReg() functions instead of emitcode()
3763
3764         * src/hc08/gen.c (genLabel, genhc08Code),
3765         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
3766
3767         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
3768         debugger hooks
3769
3770         * src/hc08/gen.c (genEndFunction, genhc08Code),
3771         * src/hc08/gen.h,
3772         * src/mcs51/gen.c (genEndFunction, gen51Code),
3773         * src/mcs51/gen.h,
3774         * src/ds390/gen.c (genEndFunction, gen390Code),
3775         * src/ds390/gen.h,
3776         * src/z80/gen.c (genEndFunction, genZ80Code),
3777         * src/z80/gen.h,
3778         * src/z80/z80.h,
3779         * src/pic/gen.c (genEndFunction, genpic14Code),
3780         * src/pic/gen.h,
3781         * src/pic16/gen.c (genEndFunction, genpic16Code),
3782         * src/pic16/gen.h,
3783         * src/avr/gen.c (genEndFunction, genAVRCode),
3784         * src/avr/gen.h,
3785         * src/xa51/gen.c (genEndFunction, genXA51Code),
3786         * src/xa51/gen.h,
3787         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
3788         specific code to cdbFile.c and out of the backend code generators
3789
3790         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
3791         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
3792         starting address is now 0
3793
3794         * as/hc08/asm.h,
3795         * as/hc08/m08pst.c,
3796         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
3797         assembler directive for DWARF support
3798         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
3799
3800         * src/src.dsp,
3801         * src/Makefile.in,
3802         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
3803
3804 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3805
3806         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
3807         and inappropriate peephole optimization in jump tables
3808
3809 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3810
3811         * as/hc08/m08pst.c,
3812         * src/SDCCglue.c: sdccopt works for the hc08 port now
3813
3814 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
3815
3816         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
3817
3818 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3819
3820         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
3821
3822 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3823
3824         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
3825         rules
3826         * src/SDCCmain.c,
3827         * src/SDCCglobl.h,
3828         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
3829         comments from the peephole optimizer replacement rules
3830         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
3831         symbols
3832         * src/SDCCcse.c (updateSpillLocation),
3833         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
3834         equivalents
3835         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
3836         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
3837         objects far pointers
3838
3839 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3840
3841         * src/SDCCsymt.h: a missing part of my last change
3842         * src/pic/ralloc.c (regTypeNum),
3843         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
3844
3845 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3846
3847         * src/SDCCicode.h,
3848         * src/SDCCicode.c (aggrToPtrDclType),
3849         * src/SDCCptropt.h,
3850         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
3851         ptrPseudoSymConvert),
3852         * src/pic/ralloc.c (regTypeNum),
3853         * src/pic16/ralloc.c (regTypeNum),
3854         * src/hc08/ralloc.c (regTypeNum),
3855         * src/ds390/ralloc.c (regTypeNum),
3856         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
3857         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
3858
3859 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3860
3861         * link/z80/lkmain.c (afile),
3862         * as/hc08/lkmain.c (afile),
3863         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
3864         prevent a pointer problem when a filename has no directory and
3865         no extension specified.
3866
3867 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3868
3869         * link/z80/lkmain.c (afile): allow periods in directory names
3870         * link/z80/lkmain.c (afile),
3871         * as/mcs51/lkmain.c (afile),
3872         * as/hc08/lkmain.c (afile): allow linker script file to have an
3873         extension other than ".lnk"
3874         * link/z80/lklex.c (getfid),
3875         * link/z80/lkmain.c (parse),
3876         * as/mcs51/lklex.c (getfid),
3877         * as/mcs51/lkmain.c (parse),
3878         * as/hc08/lklex.c (getfid),
3879         * as/hc08/lkmain.c (parse): Support comments in the linker script
3880         file on lines by themselves and after filenames
3881
3882 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3883
3884         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
3885
3886 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3887
3888         * src/z80/peeph-z80.def: removed some peephole rules that don't
3889         work with multibyte arithmetic (fixed bug #937126)
3890         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
3891         to registers and not global variables
3892         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
3893         geniCodePreInc, geniCodePostDec, geniCodePreDec,
3894         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
3895         checking for assignments not internally generated (fixed bug #931895)
3896         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
3897         structure member (fixed bug #930072)
3898
3899 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3900
3901         * src/SDCCmain.c (linkEdit),
3902         * src/hc08/main.c (_hc08_parseOptions),
3903         * as/hc08/Makefile.in,
3904         * as/hc08/aslink.h,
3905         * as/hc08/asm.h,
3906         * as/hc08/m08pst.c,
3907         * as/hc08/lkrloc.c (relr, rele),
3908         * as/hc08/lkarea.c (lnkarea)
3909         * as/hc08/lkmain.c (afile, parse),
3910         * as/hc08/lkelf.c: support for ELF output
3911         * as/hc08/lks19.c (s19),
3912         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
3913
3914 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3915
3916         * as/mcs51/lkihx.c: Fixed bug #899105.
3917
3918 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3919
3920         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
3921         .dsp files from Unix to DOS.
3922
3923 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3924
3925         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
3926         function pointers; we have been compliant for several months now.
3927         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
3928         change that was accidently commented out
3929         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
3930         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
3931         bug #922319
3932
3933 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3934
3935         * src/hc08/gen.c: output of all of the internal debugging information
3936         is now controlled by the D() macro; it is disabled by default
3937
3938 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3939
3940         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
3941         harder to keep the same registers during a CAST iCode
3942         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
3943         long via int can be done in a single cast, if the signedness is
3944         correct.
3945         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
3946         putchar() in tinibios.c in ds390's library
3947
3948 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
3949
3950         * src/SDCCast.c (decorateType): fixed bug #898889,
3951         cast result of a literal complement too
3952         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
3953         fixed check for bitfields
3954
3955 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
3956
3957         * src/SDCCicode.c (geniCodeLogic): made it static,
3958         (geniCodeLogicAndOr): added in order to fix bug #905492,
3959         (ast2iCode): fixed bug #905492
3960         * support/regression/tests/bug-905492.c: added
3961         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
3962         (processParms): fixed bug #927659: don't copy parms, this will clear
3963         decorated flag
3964         * support/regression/tests/bug-927659.c: added
3965
3966 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
3967
3968         * src/SDCCast.c (addCast): don't cast float to char
3969         * device/lib/libsdcc.lib: added _memmove
3970
3971 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
3972
3973         * device/lib/large/Makefile: fixed parallel execution by
3974         replacing `make` by `$(MAKE)`
3975
3976 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3977
3978         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
3979         offsets (fixes bug #923936)
3980
3981 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
3982
3983         * device/lib/small/Makefile: fixed parallel execution by
3984         replacing `make` by `$(MAKE)`
3985
3986 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
3987
3988         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
3989
3990 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
3991
3992         * src/pic/gen.c (genCpl): multi-byte complements were not working.
3993         * src/regression/Makefile: Regression test was not running.
3994
3995 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
3996
3997         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
3998         complement if possible
3999         * src/SDCCval.c (valComplement),
4000         * src/SDCCicode.c (operandOperation): fixed complement of literal
4001         * support/regression/tests/onebyte.c (testComplement): added
4002
4003 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
4004
4005         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
4006         return an optimized tree; actually replace actParm with the new tree
4007         * src/SDCCast.h: added some parantheses to remove side effects
4008         * support/regression/tests/bug-920866.c
4009
4010 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
4011         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
4012         Bit operands were not being handled properly in the pic14 port.
4013         (now src/regression/add.c passes again).
4014
4015 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4016
4017         * src/SDCC.y (labeled_statement): case and default no longer require
4018         a following statement (RFE #893037)
4019
4020 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4021
4022         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
4023         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
4024         disabled (fixes bug #916294)
4025         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
4026         "mov a,acc"; patch provided by Lenny Story
4027         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
4028
4029 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4030
4031         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
4032         functions
4033         * src/ds390/gen.c (genFunction, genEndFunction),
4034         * src/ds390/ralloc.c (ds390_assignRegisters),
4035         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
4036         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
4037         pushed if there are parameters passed on the stack. Also, a cleaner
4038         way to decide if r0/r1 should be pushed/popped. (Together they fix
4039         bug #918693)
4040
4041 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4042
4043         * doc/sdccman.lyx,
4044         * device/lib/mcs51/crtpagesfr.asm,
4045         * device/lib/mcs51/crtxinit.asm,
4046         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
4047         to avoid confusion with Si Lab's SFRPAGE register.
4048
4049 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4050
4051         * src/SDCCglue.c (emitMaps): allow public sfr variables
4052         * src/SDCCglue.c (initialComments): include compiler build date
4053         with compiler version and put the timestamp of the generated
4054         assembly file on a serperate line to be less confusing.
4055         * src/port.h: added genInitStartup hook
4056         * src/avr/main.c,
4057         * src/ds390/main.c,
4058         * src/hc08/main.c,
4059         * src/pic/main.c,
4060         * src/pic16/main.c,
4061         * src/xa51/main.c,
4062         * src/z80/main.c: genInitStartup initialize as NULL (default to
4063         historical behaviour)
4064         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
4065         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
4066         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
4067         library instead of hard coding it into the compiler.
4068         * support/regression/ports/mcs51-stack-auto/spec.mk,
4069         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
4070         * device/lib/mcs51/Makefile,
4071         * device/lib/small/Makefile,
4072         * device/lib/large/Makefile,
4073         * device/lib/mcs51/crtpagesfr.asm,
4074         * device/lib/mcs51/crtstart.asm,
4075         * device/lib/mcs51/crtxclear.asm,
4076         * device/lib/mcs51/crtxinit.asm,
4077         * device/lib/mcs51/crtclear.asm,
4078         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
4079         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
4080         and into user configurable files.
4081         * device/lib/clean.mk: clean mcs51 directory too
4082         * support/regression/tests/longlit.c: added static to T1 declaration
4083         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
4084         accesses in the initialization code
4085
4086 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4087
4088         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
4089         OSCTRIMVAL as noted in bug #916008
4090
4091 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4092
4093         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
4094         in loops with multiple exits (reported as incorrect registers
4095         used by Martin Helmling in Sdcc-user list)
4096
4097 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4098
4099         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
4100         made ds390 register extensions look less like error messages
4101
4102 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4103
4104         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
4105         reported by Adam Wozniak in Sdcc-user list
4106
4107 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
4108
4109         * src/SDCCast.c (decorateType): fixed with bug and promotion in
4110         arithmetic optimizations, added debug output
4111
4112 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
4113
4114         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
4115         * sdcc.spec: updated and split sdcc into 3 rpms
4116         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
4117         needed for literals of LEFT_OP and '+'
4118         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
4119         introduced RESULT_TYPE_NOPROM
4120         (geniCodeMultiply): fixed logic for decision if mul is optimized to
4121         left shift
4122         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
4123         limited promotion to int only for '*'
4124         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
4125
4126 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
4127
4128         * src/pic16/gen.c (genSkip),
4129         (genc16bit2lit), (gencjneshort): commented out
4130         (is_LitOp): new helper function, checks operand type
4131         (genCmpEq): rewritten
4132
4133 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
4134
4135         * support/regression/tests/bug-908454.c: added
4136
4137 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
4138
4139         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
4140         * src/SDCCicode.c (usualBinaryConversions): op needs int type
4141         (geniCodeCast): cosmetic, don't preserve bit storage class
4142         (geniCodeLeftShift): added promotion
4143         (geniCodeLogic): fixed regression
4144         * src/SDCCsymt.c (computeTypeOr): accept bits too
4145         (compareType): 2nd part of fix for bug #908454, needed for bitfields
4146
4147 2004-03-07  Borut Razem <borut.razem AT siol.net>
4148
4149         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
4150
4151 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
4152
4153         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
4154         version of pic16_genPackRegisters which does not check if ic is a
4155         CAST operator,
4156         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
4157         function cause string1.c regression test fails
4158
4159 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
4160
4161         * sim/ucsim/configure.in,
4162         * sim/ucsim/configure,
4163         * sim/ucsim/doc/Makefile.in: use docdir
4164         * src/SDCC.y: fixed sbit atrributes
4165         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
4166         * src/SDCCast.c (decorateType): |^& need special promotion handling
4167         * src/SDCCast.h,
4168         * src/SDCCsymt.h: moved definition of RESULT_TYPE
4169         * src/SDCCsymt.h (computeType),
4170         * src/SDCCicode.c: computeType() needs op
4171         * src/SDCCsymt.c (checkTypeSanity),
4172         * doc/sddman.lyx: "plain" bitfields are unsigned
4173         * src/SDCCsymt.c (computeTypeOr): added
4174         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
4175         |^& ops
4176         * src/SDCCval.c (val*): computeType() needs op
4177         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
4178         * support/regression/tests/onebyte.c: added tests for |^&
4179
4180 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
4181
4182         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
4183         for writing icode into asm output.
4184
4185 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
4186
4187         * src/pic16/device.c: added some debug lines enabled
4188         with macro DEBUG_CHECK,
4189         * src/pic16/genarith.c: more debug in genPlus,
4190         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
4191         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
4192         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
4193         * (aopForSym): onStack symbols are re-placed in data memspace,
4194         and onStack flag is cleared,
4195         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
4196         copy temporary pcodeop,
4197         * (genPcall): added warning for not updating PCLATU,
4198         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
4199         always true for pic16 port,
4200         * (genMultOneWord): NEW, supports integer multiplication,
4201         * (genMult): modified to call genMultOneWord,
4202         * (ifxForOp): added warning when return NULL,
4203         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
4204         flag is set before call to operandFromSymbol for implicit
4205         added structures,
4206         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
4207         options.intlong_rent are set by default,
4208         * (_hasNativeMulFor): modified to allow port generation of integer
4209         multiplication,
4210         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
4211         set regtype to REG_SFR for all registers, restricting seting the
4212         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
4213
4214 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4215
4216         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
4217         more than 500 times in the regression tests
4218
4219 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4220
4221         * support/Util/SDCCerr.h,
4222         * support/Util/SDCCerr.c,
4223         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4224         enumerator_list),
4225         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
4226         for symbol conflicts.
4227         * support/valdiags/tests/enum.c,
4228         * support/valdiags/tests/tentdecl.c,
4229         * support/valdiags/tests/struct.c: expect possible error messages
4230         referring to original symbol definitions.
4231         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
4232         * src/SDCCsymt.h,
4233         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
4234
4235 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
4236
4237         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
4238
4239 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
4240
4241         * src/pic16/ralloc.c (newReg): fixed bug #908929
4242
4243 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4244
4245         * src/ds390/gen.c: added missing #include "main.h"
4246
4247 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
4248
4249         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
4250         checking if symbol is already in set,
4251         * src/pic16/device.h: prototype for checkAddSym,
4252         * src/pic16/gen.c: (_G): added entry interruptvector,
4253         * (assignResultValue): removed some commented out lines,
4254         * (genFunction): check for ISR via sym->type, absolute section for
4255         interrupt code is created via a new pBlock, the goto instruction is
4256         placed now correctly at the interrupt vector position, changed all
4257         references from ivec to _G.interruptvector,
4258         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
4259         is the interrupt is a high priority one, same for return from ISR,
4260         * src/pic16/glue.c: changed all calls of addSetHead for publics and
4261         externs to calls of checkAddSym,
4262         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
4263         pic16_pcode_verbose flag is set,
4264         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
4265         * src/pic16/pcoderegs.c: message about how many registers are saved
4266         will only be emitted if pic16_pcode_verbose flag is set,
4267
4268 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4269
4270         * src/ds390/ralloc.h,
4271         * src/ds390/ralloc.c (ds390_regWithIdx),
4272         * src/ds390/gen.c (emitcode),
4273         * src/ds390/main.h,
4274         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
4275         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4276         ds390operandCompare, getRegsRead, getRegsWritten,
4277         initializeAsmLineNode): customized instruction size calculation for
4278         ds390, started basis for some register optimizations
4279         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
4280         corresponding assembly output
4281         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
4282         missing push/pop of r0/r1. Optimized push/pops
4283
4284 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4285
4286         * src/mcs51/main.c (instructionSize): fixed ACALL size
4287         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
4288
4289 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
4290
4291         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
4292         the sorting of rlist with NULL elements
4293         * (print_idataType, print_idata): NEW to create idata sections
4294         * src/pic16/device.h: idataSymSet new variable
4295         * src/pic16/gen.c (genFunction): fixed some bugs in string
4296         comparing, improved the absolute section creation for ISRs,
4297         added FSR0L/FSR0H in registers that are saved in an ISR,
4298         * (genInline): fixed the processing of inline snippets,
4299         now they undergo no process by the peephole optimizer
4300         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
4301         are placed in idataSymSet,
4302         * (pic16emitStaticSeg): extern symbols are added in externs,
4303         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
4304         switching when aboslute variables are placed in access bank memory
4305         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
4306         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
4307         commented out with #if,
4308         * (pic16_packRegisters): reintroduce the check for CAST because some
4309         symbols are not correctly handled,
4310         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
4311         pCodeInstruction instead of pCode,
4312         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
4313         pCodeAsmDir definition,
4314         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
4315         directive, then the argument directive is emitted without the leading
4316         tab, hack for inline labels which must be in the first column,
4317         * (compareLabel,pic16_findNextInstruction),
4318         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
4319         * (insertBankSwitch): modified for the new pCodeAsmDir,
4320
4321 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4322         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
4323
4324         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
4325         instance,
4326         * (pushSide): commented out with #if,
4327         * (assignResultValue): fixed some typos in saving
4328         registers,
4329         * (genPcall): FIXED and sync'ed with genCall,
4330         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
4331         * (genNearPointerGet): fixed to handle some more cases,
4332         implementation scheme via table reads,
4333         * (genConstPointerGet): modified to access code memory correct,
4334         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
4335         and improved to handle some cases
4336         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
4337         instead of "RETLW" for init data
4338         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
4339         not IN_DIRSPACE, work around to reduce bank switching when aboslute
4340         variables are placed in access bank memory (<0x80 and >=0xf80),
4341         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
4342         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
4343         TBLWT_POSTDEC,TBLWT_PREINC
4344         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
4345         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
4346         directives
4347         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
4348         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
4349         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
4350         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
4351
4352 2004-02-29  Borut Razem <borut.razem AT siol.net>
4353
4354         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
4355         support/Util/findme.h, support/Util/system.h: enhance binary relative
4356         search for lib and include by using findProgramPath()
4357
4358 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4359
4360         * src/SDCCpeeph.h,
4361         * src/SDCCpeeph.c (pcDistance),
4362         * src/port.h,
4363         * src/mcs51/ralloc.h,
4364         * src/mcs51/ralloc.c (mcs51_regWithIdx),
4365         * src/mcs51/main.h,
4366         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
4367         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4368         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
4369         size calculation port specific, started basis for some register
4370         optimizations
4371         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
4372         missing push/pop of r0/r1. Optimized push/pops
4373         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
4374         * device/lib/_modsint.c (_modsint),
4375         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
4376         and stack version so regression tests pass
4377
4378 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
4379
4380         * src/Makefile.in (dep): include SLIBOBJS in dependency check
4381         * src/SDCCast.c (decorateType): catch another small optimization
4382         with '?' operator
4383         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
4384         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
4385         modified to finally use computeType() all over SDCC,
4386         see Feature Request #877103
4387         * src/SDCCval.h: cosmetic
4388         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
4389         valCompare(); regression tested in muldiv.c
4390         * support/regression/tests/muldiv.c (testMod): mod sign follows
4391         dividend only
4392
4393 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
4394
4395         * src/SDCCast.c (decorateType): fixed bug #902362
4396         * doc/INSTALL.txt: fixed install instructions for win32
4397
4398 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
4399
4400         * device/include/Makefile.in (install): fixed by replacing spaces
4401         by tabs
4402         * doc/README.txt,
4403         * doc/INSTALL.txt: updated for release
4404         * doc/sdccman.lyx: added warning for --xstack being buggy
4405
4406 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
4407
4408         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
4409         to eliminate build warnings.
4410         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
4411
4412 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
4413            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4414
4415         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
4416         removed -penable-stack, added comment for stack pragma, added
4417         warning for not initializing the stack/frame registers, removed
4418         comment at interrupts section
4419
4420         Stack is made permanent, there is no ability to disable stack usage.
4421         * src/pic16/device.h,
4422         * src/pic16/device.c: removed all references to USE_STACK macro,
4423         * src/pic16/device.c (pic16_dump_section): when no elements in
4424         rlist, free rlist before return,
4425         * (pic16_dump_int_registers): NEW, internal registers are a new set
4426         of general purpose registers reused by each function,
4427         * (checkAddReg): returns 1 if registers is added to set,
4428         * (pic16_groupRegistersInSection): when a registers is of type
4429         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
4430         * src/pic16/device.h: memRange and Assigned Memory are deleted,
4431         SRCASECMP macro is moved here from device.c
4432         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
4433         PO_PCLATU, PO_PRODL, PO_PRODH,
4434         * (pic16_pCodeOpType, genMinus,
4435         changed compares to "a" register, with AOP_ACC,
4436         * (pic16_genPlus): fixed some bugs and indented properly,
4437         * (pic16_addSign): changed size to size+offset in the MOVWF
4438         instruction,
4439         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
4440         multiply 8-bit operand by literal, result is 8-bit,
4441         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
4442         multiply 2 8-bit operand, result is 8-bit,
4443         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
4444         genUMult8X*_16,
4445         * src/pic16/gen.c: changed accUse to contain WREG only,
4446         * (pic16_emitcomment): renamed to pic16_emitpcomment,
4447         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
4448         true, do not use immediate addressing any more unless sym is a
4449         pointer in codespace,
4450         * (aopForRemat): do not use immediate addressing when symbol not in
4451         codespace and when symbol's address is requested,
4452         * (aopOp): for-loop in if(sym->accUse) is modified for the new
4453         accUse size (= 1),
4454         * (aopGet): added case for AOP_ACC and don't return "accumulator
4455         bug" but WREG instead,
4456         * (popGetTempReg): pushes contents of temporary register in stack,
4457         * (popReleaseTempReg): pops contents of temporary register from
4458         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
4459         * (pic16_popGet): separated case AOP_ACC to return register WREG
4460         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
4461         or PO_IMMEDIATE and initializes their instance/offset appropriately,
4462         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
4463         the use of immediate pointers to certain cases only.
4464
4465         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
4466         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
4467         * (assignResultValue, genCall, genRet): modified to use the new
4468         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
4469         genPcall is still broken,
4470         * (genFunction): added code to create 'A' type pBlocks when
4471         interrupt functions are generated, code not extensively tested yet,
4472         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
4473         * (genEndFunction): modified so ISRs pop stored registers from stack,
4474         * (genMultOneByte): cleanup,
4475         * (AccRsh): added flag andmask, to and result with appropriate mask,
4476         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
4477         * (genDataPointerGet): fixed and reenabled its use,
4478         * (genNearDataPointerGet): bugs fixed,
4479         * (genDataPointerSet): bugs fixed,
4480         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
4481         pic16_DumpSymbol, pic16_DumpOp,
4482         * src/pic16/genutils.h: function prototypes for the above functions,
4483         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
4484         pointers,
4485         * (pic16emitRegularMap): many many many improvements, but needs a
4486         major cleanup,
4487         * src/pic16/main.c: enable_stack in pic16_options is removed,
4488         * (_pic16_parseOptions): removed command line options -penable-stack,
4489         * (_process_pragma): emit stack symbol only when stack pragma is
4490         processed,
4491         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
4492         redirected to FSR0L/FSR0H pair,
4493         * (pic16_get_op, pic16_get_op2): modifications and improvements,
4494         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4495         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
4496         for immediates,
4497         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
4498         * (dumpPicOptype): NEW,
4499         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
4500         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
4501         with movff instruction,
4502         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
4503         added pic16_int_regs, some packRegsFor* functions are commented out,
4504         because produce errors,
4505         * src/pic16/NOTES: minor modifications
4506
4507 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4508
4509         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
4510         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
4511         --pack-iram.
4512         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
4513         * as/mcs51/lkaomf51.c: fixed bug #895763
4514
4515 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
4516
4517         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
4518
4519 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4520
4521         * doc/sdccman.lyx: added details about the HC08 storage classes and
4522         interrupts, fixed the register usage info for z80 & gbz80
4523
4524 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
4525
4526         * doc/sdccman.lyx: added more pic16 port documentation
4527         * device/include/pic16/: added header pic18fregs.h
4528
4529 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
4530
4531         * doc/sdccman.lyx: added Vangelis' contribution
4532
4533 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4534
4535         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
4536         extend to the next CALL or PCALL, not just to the next CALL.
4537
4538 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
4539
4540         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
4541
4542 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4543
4544         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
4545         bug #895752 and a better fix for bug #716790
4546
4547 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4548
4549         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
4550
4551 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4552
4553         * doc/sdccman.lyx: minor changes, minor changed
4554
4555 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
4556
4557         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
4558         which can't handle SDCC_NEWONEBYTEOPS,
4559         (geniCodeMultiply): removed conversion from mult to shift for pic14
4560         and pic16
4561
4562 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4563
4564         * src/hc08/gen.h,
4565         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
4566         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
4567         thus fixing bug #895406
4568
4569 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
4570
4571         * device/lib/_modsint.c,
4572         * device/lib/_modslong.c: sign follows divisor only
4573         * src/hc08/gen.c (genMultOneByte): if result size is 1,
4574         signs or signedness can be ignored
4575         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
4576         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
4577         added optimization for IFX,
4578         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
4579         arguments;
4580         reenabled optimization for IFX, which was removed on 2004-01-11
4581         * src/SDCCast.h: added return type IFX
4582         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
4583         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
4584         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
4585         SDCC_OLDONEBYTEOPS selects the old behaviour
4586         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
4587         changed again and commented promotion rule
4588         * src/SDCCval.c (valDiv): promotion no longer necessary
4589         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
4590         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
4591         rewritten
4592         * support/regression/tests/onebyte.c: added
4593
4594 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
4595
4596         * gen.c (genInline): reverted to old code for assemnling inline
4597         code because of bug reported James Chadd
4598
4599 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
4600
4601         * ralloc.h: missing declarations from previous patch,
4602         seems that patch for ralloc.h was never applied, fixed
4603
4604 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4605            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
4606
4607         * pcode.c,
4608         * pcode.h,
4609         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
4610         indirect addressing. Marked FSR0 as deprecated
4611         * gen.c (pointerCode): commented out, not needed now
4612         (pic16_popGet2p): new MOVFF helper function
4613         (genGenPointerGet),
4614         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
4615         (shiftRLong): removed duplicate debugging info
4616
4617 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4618
4619         * src/ds390/gen.c (genNearPointerGet),
4620         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
4621         optimization with bits, but not bitfields.
4622         * src/ds390/ralloc.c (packRegisters),
4623         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
4624
4625 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
4626
4627         * src/SDCCcse.c (algebraicOpts): copy operands before modification
4628
4629 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4630
4631         * src/SDCCsymt.h,
4632         * src/SDCCicode.c (operandFromSymbol),
4633         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
4634         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
4635         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
4636         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
4637         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
4638         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
4639         bug #892038
4640         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
4641         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
4642         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
4643         * src/SDCCsymt.c (newSymbol),
4644         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4645         enumerator_list),
4646         * src/SDCCval.h,
4647         * src/SDCCval.c (newiList): fixed bug #885705
4648
4649 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4650
4651         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
4652         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
4653
4654 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4655
4656         * device/include/c8051f120.h,
4657         * device/include/c8051f300.h,
4658         * device/include/c8051f310.h: added/updated header files for Silicon
4659         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
4660         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
4661         in new section Submitting patches
4662
4663 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4664
4665         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
4666         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4667         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4668         genGenPointerSet),
4669         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
4670         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4671         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4672         genGenPointerSet),
4673         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
4674         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4675         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4676         genGenPointerSet),
4677         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
4678         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4679         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4680         genGenPointerSet): fixed bug #892400
4681         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
4682         to eliminate build warnings.
4683         * src/SDCCast.c (processParms),
4684         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
4685         fixed bug 751859
4686         * support/valdiag/valdiag.py: added GCC to the list of defines active
4687         when compiling with gcc
4688
4689 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4690
4691         * support/Util/SDCCerr.h,
4692         * support/Util/SDCCerr.c,
4693         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
4694         with an incomplete type (fixed bug #883734)
4695         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
4696
4697 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4698
4699         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
4700
4701 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4702
4703         * src/SDCCast.c (decorateType),
4704         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
4705         function pointer implementation
4706         * support/regression/tests/funptrs.c: added tests to verify both forms
4707         of function pointers work correctly. Added tests to verify parameters
4708         are passed in the correct order.
4709
4710 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
4711
4712         * device.c (regCompare): registers are sorted by ascending
4713         address and increasing size,
4714         * main.c (_pic16_finaliseOptions): removed the declaration
4715         of compiler macro MCU. Now a macro of the format pic18fxxxx
4716         will be defined from the command line
4717
4718 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4719             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
4720
4721         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
4722         PCOP_RLCF was overwritten!
4723         * gen.c (genSkip): commented out calls to pic16_emitcode,
4724         * (genCmpEQ): fixed "long" compares, only high word did get compared,
4725         * (genlshTwo),
4726         * (genRRC): added debugging info,
4727         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
4728         overwritten while shifting,
4729         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
4730         overwritten while shifting,
4731         * (AccLsh),
4732         * (AccRsh),
4733         * (shiftLLeftOrResult),
4734         * (shiftRLeftOrResult),
4735         * (shiftRLong),
4736         * (shiftLLong): Implemented with pic16_emitpcode
4737         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
4738         * (genLeftShift): Fixed bug, operand for shift by variable always
4739         was "and"ed with 0x0f,
4740         * (genLeftShiftLiteral),
4741         * (genrshTwo),
4742         * (genRightShiftLiteral): added debugging info,
4743         * (genrshFour): added comment,
4744         * (genRightShift): determined signedness from operand "left"
4745         instead of "result"
4746
4747 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4748
4749         * src/SDCCicode.c (geniCodeParms),
4750         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
4751         function pointers, fixed function pointer bugs #861242 and #861896
4752
4753 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4754
4755         * device/include/c8051f000.h,
4756         * device/include/c8051f120.h,
4757         * device/include/c8051f300.h: added header files for Silicon
4758         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
4759
4760 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
4761
4762         * src/SDCCast.c (processParams): added new type flow and restructured
4763         (gatherAutoInit): added new type flow
4764         (addCast): cosmetic changes
4765         (getLeftResultType): added new type flow for array indices, patch
4766         provided by Stas, see FR #877103
4767         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
4768         array index patch by Stas
4769         * src/SDCCast.h: added prototype getResultTypeFromType()
4770         * src/SDCCval.h,
4771         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
4772         * src/pic/glue.c (pic14emitStaticSeg),
4773         * src/pic16/glue.c (pic16emitStaticSeg),
4774         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
4775         for initialization of symbols
4776         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
4777         * support/Util/SDCCerr.h:
4778         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
4779         * .version: bumped version number to 2.3.8
4780         * device/include/Makefile.in (install),
4781         * doc/Makefile (install): changed to 'rm `find ...`' construct to
4782         avoid warnings
4783
4784 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
4785
4786         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
4787         Slade Rich fixed an optimization bug
4788         * src/pic/pcodepeep.c,
4789         * src/pic/pcoderegs.c
4790         * doc/Makefile (install): added test for directory
4791
4792 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4793
4794         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
4795         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
4796         * src/pic/ralloc.c (getRegPtr, getRegGpr),
4797         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
4798         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
4799         * as/mcs51/asexpr.c (term),
4800         * as/hc08/asexpr.c (term): fixed bug #887146
4801
4802 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4803
4804         * src/z80/gen.c (genMult): handle single byte result product
4805         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
4806         DUMMY_READ_VOLATILE (fixed bug #886367)
4807
4808 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
4809
4810         * support/regression/tests/libmullong.c: fixed logic, on little endian
4811         hosts we ended without a mullong_wrapper()
4812
4813 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4814
4815         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
4816         virus/worm forged address usage.
4817
4818 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
4819
4820         Fixed promotion, it should be done on AST level:
4821         * src/SDCCast.c (addCast): added promotion to int
4822         (decorateType): updated call to upCast()
4823         * src/SDCCicode.c (geniCodeLeftShift): removed call to
4824         usualUnaryConversions()
4825
4826 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
4827
4828         * support/regression/tests/literalop.c (mulWrapper): Added a
4829         wrapper to remove integer overflow warnings.
4830
4831         * support/regression/tests/float_trans.c: Made work on host.
4832
4833         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
4834         location of sz80.
4835
4836         * support/regression/generate-cases.py (main): Changed from inline
4837         to a main method.
4838
4839         * doc/Makefile (install): Changed to depth first to get rid of
4840         missing directory install warning.
4841
4842         * as/Makefile (install-doc): Made work on Mac.
4843
4844 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
4845
4846         * src/SDCCast.c: added an additional type flow in decorateType() of
4847         opposite direction, see feature request #860006; it's enabled at runtime
4848         by setting the environment variable SDCC_NEWTYPEFLOW
4849         * src/SDCCast.h: changed prototype of decorateType()
4850         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
4851         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
4852         'char' to 'int' can be omitted, if both operands are 'unsigned char';
4853         see feature request #877103
4854         * src/SDCCval.c: updated call of decorateType()
4855         (valBitwise): fixed bug #882876
4856         (valMinus): added promotion
4857         (valLogicAndOr): result is unsigned
4858         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
4859         * src/SDCCsymt.c (computeType),
4860         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
4861         must not cause an unsigned operation
4862         * src/pic/glue (pic14emitRegularMap),
4863         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
4864
4865 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
4866
4867         * src/pic/pcode.c (PCodeID): commented out left over debug code
4868
4869 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
4870
4871         * support/valdiag/tests/overflow.c: added shift tests
4872         * src/pic/device.c,
4873         * src/pic/gen.c,
4874         * src/pic/gen.h,
4875         * src/pic/glue.c,
4876         * src/pic/main.c,
4877         * src/pic/pcode.c,
4878         * src/pic/pcode.h,
4879         * src/pic/pcodepeep.c,
4880         * src/pic/pcoderegs.c,
4881         * src/pic/ralloc.c,
4882         * src/pic/ralloc.h: applied patch from Slade Rich;
4883         added support for multiple code pages and multiple RAM banks on the
4884         PIC 14 port. The ASM files now no longer simply assume all the
4885         code / RAM are in the same page / bank. This means the linker can
4886         safely allocate code/RAM of separate ASM files to different pages/banks.
4887         * doc/sdccman.lyx: added Slade's tips
4888         * src/mcs51/peeph.def: fixed bug #880768
4889
4890 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4891
4892         * src/hc08/ralloc.c (rematStr): fixed bug #879282
4893         * src/SDCCast.c (decorateType): fixed bug #880197
4894
4895 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
4896
4897         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
4898         getopt.h.
4899
4900         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
4901         strtof is not part of C89 and isn't included with Mac OS X.
4902
4903 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4904
4905         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
4906         shiftL2Left2Result): fixed bug #879326
4907         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
4908         (genMultOneByte): fixed bug in signed vs unsigned multiplication
4909         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
4910         address fetch for clr instruction
4911         * device/lib/hc08/_mulint.c: created optimized assembly version
4912         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
4913
4914 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
4915
4916         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
4917         proposed in FR #877103
4918
4919 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
4920
4921         * src/SDCCval.c (cheapestVal): added missing checks
4922         * src/SDCCicode.c (usualBinaryConversions): fixed condition
4923         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
4924
4925 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
4926
4927         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
4928         equal operands
4929
4930 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
4931
4932         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
4933         loaded with the linker search paths (-L arguments) and the libraries
4934         to be linked with the current source (-l arguments). Changes
4935         currently will affect only the pic16 port.
4936         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
4937         include path the port specific paths and port specific libraries,
4938         * gplink command now contains the $3 argument,
4939         * src/pic16/device.h,
4940         * src/pic16/device.c,: structure PIC_device is made public and
4941         renamed to PIC16_device, the same for variable Pics which is renamed
4942         to Pics16. Updated all references to them.
4943         * src/pic16/glue.c (pic16glue): corrected bug with code
4944         initialization which bypassed the variable initializations block.
4945
4946         * device/lib/pic16/Makefile.rules: removed --penable-stack from
4947         COMPILE_FLAGS and added the --nostdinc option
4948
4949 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4950
4951         * device/include/mc68hc908jb8.h: Register defs for another member
4952         of the hc08 family. Contributed by Bjorn Bringert - thanks!
4953
4954 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
4955
4956         Documenting changes from previous commits.
4957         * configure.in (version 1.56),
4958         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
4959         when generating output files to configure the pic16 library,
4960         but now I've commented it out, since gputils aren't installed in the
4961         SF compile farm, so library won't compile
4962
4963         * device/lib/Makefile.in (version 1.56): initially I've added in
4964         target 'all' the prerequestive 'model-pic16' so it compiled the
4965         pic16 library, but now I've commented it out for the same reasons
4966         above,
4967         * added targets 'model-pic16' and 'objects-pic16' to compile the
4968         library
4969         * added target 'port-specific-objects-pic16' to handle the
4970         generated libraries and copy them into the build/ directory
4971         * added target 'clean-intermediate-pic16' to clean intermediate
4972         files into pic16 directory
4973         * in target 'installdirs' added line to create directory pic16 in
4974         the installation path
4975
4976         * device/include/Makefile.in (version 1.11): in target 'install'
4977         added lines to copy all header files to installation path,
4978         * in target 'installdirs' added line create directory for pic16
4979         headers in the installation path
4980
4981 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
4982
4983         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
4984          a function call
4985
4986 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
4987
4988         * configure,
4989         * device/lib/configure.in,
4990         * device/lib/configure: fixed for autoconf 2.57
4991
4992 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4993
4994         * src/z80/main.c (_parseOptions): fixed the portmode= command line
4995         option so that it actually works. Made it specific to the z80, since
4996         the gbz80 doesn't have these kinds of I/O ports.
4997
4998 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4999
5000         * device/include/z180.h,
5001         * device/lib/_memcpy.c,
5002         * device/lib/_memmove.c,
5003         * device/lib/_mulint.c,
5004         * device/lib/ser_ir.c,
5005         * device/lib/ser_ir_cts_rts.c,
5006         * device/lib/_strcmp.c,
5007         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
5008         * src/z80/main.c (_process_pragma): add support for pragmas bank and
5009         portmode; added deprecation warning for bank= and protmode= forms.
5010         Also, guard against buffer overflow.
5011         * src/z80/gen.c (aopGet): generate better code for sfr banked read
5012
5013 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5014
5015         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
5016         changed interrupt vector table generation to only emit declared vectors.
5017         * device/include/Makefile.in: added missing backslash
5018         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
5019
5020 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5021
5022         Mainly changes to support compilation of the device libraries
5023         * src/pic16/device.c: stack is allocated via symbol and not
5024         via literal number. The symbol is placed in the corresponding
5025         position of the data ram
5026         * (pic16_dump_section): relocatable and absolute uninitialized
5027         data are now emitted in sorted order to reduce section naming,
5028         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
5029         weren't marked as being in the access bank,
5030
5031 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5032
5033         Added portion of GNU PIC Library under the directory
5034         device/include/pic16 and device/lib/pic16. These files
5035         contain the declarations of SFRs for the PIC18Fxx2 devices.
5036         The directory is initialized via configure from toplevel.
5037
5038 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
5039
5040         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
5041         the spilllocations to be compared correctly
5042
5043 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5044
5045         * src/SDCCast.c (decorateType): fixed bug introduced today
5046
5047 2004-01-12  Borut Razem <borut.razem AT siol.net>
5048
5049         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
5050         doc/sdccman.lyx: upper case pragmas are deprecated
5051
5052 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5053
5054         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
5055         in simpler and even better code
5056
5057 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
5058
5059         * src/SDCCicode.c (operandOperation): fixed bug #874819
5060         * src/SDCCast.c (decorateType): fixed
5061         char foo (unsigned long ul) { return ul > 0; }
5062
5063 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5064
5065         * doc/sdccman.lyx: Moved and added some sections, small changes
5066         all over. Telling LaTeX to be less strict with word spacing
5067         to better keep the right margin. Changed some notes about
5068         maintainance of the ports in section 3.2.1 - is it OK like this?
5069
5070 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
5071
5072         SDCC source changes:
5073         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
5074         convilong): modified to inform the pic16 port that builtin functions
5075         are external
5076
5077         PIC16 PORT specific changes:
5078         * src/pic16/device.c pic16_dump_equates() added,
5079         processor registers declared internally by the port are emitted in
5080         the translation as equates,
5081         * src/pic16/gen.c: inline code is passed unprocessed to the
5082         translation,
5083         * (pic16_popGetLit2): fnuction modified to take second operand as
5084         pCodeOp pointer and not as literal,
5085         * (popRegFromIdx): prefixed with pic16_,
5086         * (pic16_popCombine2): modified to receive already allocated pCode
5087         operands,
5088         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
5089         * (genFunction): initializes local stack frame and pushes on stack
5090         all the registers used by this function,
5091         * (genEndFunction): restores all registers from stack and restores
5092         stack frame,
5093         * src/pic16/glue.c (pic16emitRegularMap): various changes and
5094         improvements,
5095         * (pic16glue): changed the program startup sequence,
5096         * added new dbName code 'A' for functions placed in absolute section
5097         * src/pic16/main.c: added function attribute _naked,
5098         * added pragma 'code' to place a fnuction at an absolute address,
5099         * added command line arguments --debug-ralloc and --pcode-verbose,
5100         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
5101         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
5102         * (pic16_newpCodeOpLit2): modified to take the second operand as
5103         pCodeOp pointer,
5104         * (pic16_printpBlock): modified to emit each function in a separate
5105         section,
5106         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
5107         UPPER for immediate operands,
5108         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
5109         instruction,
5110         * src/pic16/peeph.def: all peepholes with movff are commented out,
5111         because there is a problem in the pcode peep optimizer,
5112         * src/pic16/ralloc.c: the register allocator can now reuse local
5113         function symbols for another function. This saves register usage.
5114         * src/pic16/ralloc.h: added flag isLocal in structure regs,
5115
5116         Added file src/pic16/NOTES with information about program writing on
5117         the current port version.
5118
5119 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5120
5121         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
5122         and peephole 252 (array access)
5123
5124 2004-01-09  Borut Razem <borut.razem AT siol.net>
5125
5126         * src/SDCCmain.c : fixed #872250: -l command line defined library
5127           files are scanned before standard library files
5128
5129 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5130
5131         * src/SDCCast.c (decorateType): fixed bug #874046
5132
5133 2004-01-09  Borut Razem <borut.razem AT siol.net>
5134
5135         * support/scripts/sdcc.nsi: remove previous installation
5136
5137 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5138
5139         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
5140         bytes for last interrupt vector (mcs51)
5141         * sdcc.spec: fixed typo
5142
5143 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5144
5145         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
5146         gen51Code): more efficient parameter receive for --model-large
5147         ("bug" #845294)
5148
5149 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5150
5151         * src/ds390/main.c,
5152         * src/z80/main.c: added missed needLinkerScript flags (more than
5153         one port structure defined in these file)
5154         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
5155         bug #795325
5156
5157 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
5158
5159         * src/SDCCmain.c: removed various references to DEFAULT_PORT
5160         * src/port.h: added flag needLinkerScript in port->linker
5161         structure to inform whether to create a .lnk file or not,
5162         * src/avr/main.c,
5163         * src/ds390/main.c,
5164         * src/hc08/main.c,
5165         * src/mcs51/main.c,
5166         * src/pic/main.c,
5167         * src/pic16/main.c,
5168         * src/xa51/main.c,
5169         * src/z80/main.c: changed appropriately to configure
5170         needLinkerScript flag
5171         * src/pic/gen.c,
5172         * src/pic16/gen.c (genAddrOf): fixed bug #863624
5173         * src/pic/glue.c: added variable udata_section_name to
5174         override default uninitialized data segment definition for
5175         devices only with SHAREBANK memory (reported from Erik Epetrich)
5176         * (pic14emitOverlay): modified to emit a commented overlay segment
5177         directive when no overlay data exist
5178         * (picglue): modified to emit uninitialized data segment
5179         according to udata_section_name
5180         * src/pic/main.c (_pic14_parseOptions): added command line
5181         options --udata-section-name=[name] to override default
5182         udata definition name
5183         * modified _linkCmd and _asmCmd to include compiler passed
5184         arguments via -W option
5185         * src/pic16/main.c: added $l in _asmCmd, changed extension for
5186         object file from '.rel' to '.o' in port->linker structure,
5187         changed size of fptr from 2 to 3 in port structure
5188
5189 2004-01-07  Borut Razem <borut.razem AT siol.net>
5190
5191         * support/scripts/sdcc.nsi: update PATH
5192         * support/scripts/sdcc.ico: craeted
5193
5194 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
5195
5196         * device/include/Makefile.in: fix install
5197         * doc/Makefile: fix install
5198
5199 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5200
5201         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
5202         in bug #860505
5203         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
5204         how the function variable allocation summary is displayed; also
5205         include information about variables allocated to the overlay
5206         segment
5207
5208 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5209
5210         * as/mcs51/lkmain.c: Help about -Y option
5211         * as/mcs51/lkarea.c: Fixed gcc warnings
5212
5213 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5214
5215         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
5216         fixed warning
5217         * support/valdiag/tests/overflow.c: added
5218         * src/SDCCast.c (decorateType),
5219         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
5220         LEFT_OP (left shift)
5221
5222 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5223
5224         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
5225         (default behaviour).
5226
5227 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5228
5229         A python script to validate compiler diagnostic messages. It can be
5230         used to verify that sdcc complains about bad c source code and
5231         gives a good location of the error.
5232         * support/valdiag/Makefile,
5233         * support/valdiag/valdiag.py,
5234         * support/valdiag/tests/*
5235
5236 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5237
5238         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
5239         * src/SDCCsymt.c (newEnumType),
5240         * src/SDCCsymt.h
5241         * support/Util/SDCCerr.c,
5242         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
5243         enum related bugs.
5244         * support/regression/tests/enum.c: added test for enum values that
5245         require at least 2 bytes of storage.
5246
5247 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5248
5249         * src/common.h: added ifndef/define/endif macros
5250         around the header file.
5251         Bug reported from Jesus Calvino-Fraga
5252
5253 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5254
5255         * sdcc.spec: updated
5256         * device/include/Makefile.in: don't install CVS directories
5257         * device/lib/Makefile.in: added removal of CVS directories after install
5258         * doc/Makefile: fixed install, added local_icons
5259         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
5260         * src/mcs51/gen.c (genRightShift): fixed bug #870788
5261         * src/ds390/gen.c (genRightShift): fixed bug #870788
5262         * src/SDCCast.c (decorateType): fixed bug #870781
5263
5264 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5265
5266         PIC16 port related changes:
5267         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
5268         added variable stackPos,
5269
5270         * gen.c: genCall, assignResultValue: added support for
5271         pushing/retrieving function parameters to/from stack,
5272         genFunction,genEndFunction: setup stack frame for the
5273         generated function,
5274         genAddrOf: will be changed according to bug 863624
5275
5276         * added files genutils.c and genutils.h which contain gen*
5277         debugged and optimised functions extracted from gen.c
5278
5279         * glue.c: added variable 'externs' which holds extern symbols,
5280         pic16emitRegularMap: is modified to properly handle relocatable
5281          symbols under the new scheme,
5282         pic16createInterruptVect: is modified
5283         pic16printPublics: is modified to emit 'global' assembler directives,
5284         added pic16_printExterns to print extern symbols,
5285         pic16glue: initializes stack/frame pointer in the beginning of
5286         the assembly output. Temporary hack, will be corrected later,
5287         because gplink yet does not support stack and SDCC does not
5288         yet support a type of crt0.o object to create the final binary.
5289
5290         * Removed many lines that contain 8051 legacy code.
5291         * The code is finally placed under a 'code' directive.
5292         * Added port specific options.
5293
5294         * _process_pragma: simplified since now we do not need *special*
5295         include file to define SFR registers. But a separate header
5296         will be needed. This will be developed later.
5297         * _pic16_parseOptions: added, parses port specific options:
5298         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
5299         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
5300         --preplace-udata-with=
5301
5302         * _pic16_setDefaultOptions: modified to initialize section names,
5303         but hack is temporarly out of order since it needs improvement.
5304         * _pic16_genAssemblerPreamble: configuration words are emitted by
5305         their address instead of their name. This part is incomplete and
5306         supports only the 18Fxx2 devices. Other devices will emit an error
5307         during assembly since they do not contain the same set of config
5308         registers
5309         * _pic16_genIVT: is modified,
5310
5311         * pcode.c: added definitions for some hardware registers that are needed
5312         for stack support
5313         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
5314         All PCI entries are updated. Now LFSR is supported.
5315         * Removed pic16_pciTRIS is mentioned by mdubuc in source
5316         * added pic16_newpCodeOpLit2 to support instructions with
5317         two literal arguments
5318         * pic16_pCode2str: corrected code that emits assembler instructions
5319         with two literal operands and those that have an access bit modifier
5320         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
5321         this fixes a bug which caused some labels to be lost, when an
5322         assembler directive was added, i.e. banksel,
5323         * pic16_FixRegisterBanking: improved logic that causes the insertion
5324         of bank switching,
5325         * InlineFunction: functions that are called once, are not any more
5326         inlined. This can be a port option in the future,
5327
5328         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
5329
5330         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
5331         hold the corresponding uninitialized symbols,
5332         * pic16_allocProcessorRegister: registers have explicit marked the
5333         accessBank field,
5334         * pic16_allocInternalRegister: registers are explicit marked as
5335         not used,
5336         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
5337         processing list, so bit registers were lost,
5338         *
5339
5340         * ralloc.h: added field 'accessBank' and original symbol operand
5341         in register definition,
5342         * removed the field isMapped from register definition,
5343
5344         ** Several functions have been removed from various sources:
5345         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
5346         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
5347         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
5348         pic16_assignRelocatableRegisters
5349
5350         ** others have been introduced:
5351         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
5352         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
5353
5354 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
5355
5356         * support/scripts/inc2h.pl: changed definition of BIT_AT
5357         to emit 'sbit at' instead of 'bit at'. This was a request.
5358
5359         PIC16 port related preliminary changes:
5360         * gen.c: prefixed function popRegFromString with
5361         pic16_ and all references to it corrected
5362         * pcode.c: all pic16_pc_* hardware registers prefixed
5363         with underscore (_),
5364         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
5365         * ralloc.c: newReg(): when register is REG_SFR then
5366         set address to rIdx,
5367         pic16_allocProcessorRegister(): marks register wasUsed=0
5368         pic16_writeUsedRegs(): added a call to assign processor
5369         registers via pic16_assignFixedRegisters
5370
5371 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5372
5373         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
5374         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
5375         variables in unused register banks.  Also the SSEG is placed
5376         wherever there is enough space for it, and IDATA can be anywhere
5377         in internal RAM.  For now compile using -Wl-Y[stack_size].
5378         The mem file is different for this option as well, since it
5379         makes no sense of talking about DSEG lenght.
5380
5381 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
5382
5383         * src/SDCClrange.c: fixed bug 869095 that caused segfault
5384         in certain cases, e.g. when ROM assignment, patch provided
5385         from Albert den Haan.
5386
5387 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
5388
5389         Many signedness and type propagation fixes:
5390         * src/SDCCicode.c: made geniCodeCast() static
5391         replaced SPEC_ by IS_ (cosmetic)
5392         (operandOperation): fixed div and mod operation
5393         (usualBinaryConversions): added support for promotion of char
5394         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
5395         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
5396         (geniCodeAdd): an array index will stay unsigned, even if promoted
5397         from char to int
5398         (geniCodeArray): ditto
5399         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
5400         * src/SDCCsymt.c (computeType): added more support for char;
5401         promotion of char is selectable by promoteCharToInt, fixed signedness
5402         for all cases
5403         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5404         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5405         * src/SDCCval (val*): replaced signedness calculation by
5406         computeType()
5407         rearranged if-branches (cosmetic)
5408         (valShift): added warning W_SHIFT_CHANGED
5409         (valCompare): fixed problem with different types
5410         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
5411         * support/regression/tests/literalop.c: added many cases
5412         * support/regression/tests/ast_constant_folding.c: changed finally to
5413         'unsigned int'
5414         * .version: new year, new version: 2.3.7
5415         * src/SDCCmain.c (main): applied patch #866468
5416         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
5417         provided by Scott Bronson
5418         * doc/sdccman.lyx: updated documentation for sdcdb
5419         updated and added chapter tips
5420
5421 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5422
5423         * src/SDCCsymt.h: missing from yesterday's commits
5424
5425 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5426
5427         * src/SDCC.y (struct_or_union_specifier),
5428         * support/Util/SDCCerr.c,
5429         * support/Util/SDCCerr.h: verify that struct & union tags are used
5430         as declared.
5431
5432 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5433
5434         * src/SDCCglobl.h: missing from yesterday's commits
5435
5436 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5437
5438         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
5439         sft_attributes, struct_declaration, parameter_declaration,
5440         type_name, start_block, declaration_list),
5441         * src/SDCC.lex (check_type): support redefinition of typedef names
5442
5443 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5444
5445         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
5446         aligned xdata arrays. Erik helped me with the if clause.
5447
5448 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5449
5450         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
5451         warning
5452
5453 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5454
5455         * src/SDCCast.h,
5456         * src/SDCCast.c (newAst_),
5457         * src/SDCCicode.h,
5458         * src/SDCCicode.c (ast2iCode, newiCode),
5459         * src/SDCCglobl.h,
5460         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
5461         expr, statement, expression_statement, selection_statement,
5462         iteration_statement, expr_opt, jump_statement): foundation for tracking
5463         sequence points
5464         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
5465         point code too)
5466
5467 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5468
5469         * support/Util/SDCCerr.c,
5470         * src/SDCCast.h,
5471         * src/SDCCast.c (createCase, createDefault, decorateType),
5472         * src/SDCClabel.c (labelUnreach),
5473         * src/SDCC.y (labeled_statement, jump_statement): More improvements
5474         to error messages.
5475         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
5476         (with thanks to Stas Sergeev)
5477         * device/include/time.h,
5478         * device/lib/time.c (CheckTime): suppress unreachable code warning
5479
5480 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5481
5482         * src/SDCCast.c (createIvalCharPtr),
5483         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
5484         bug #753752)
5485         * support/regression/tests/nullstring.c: tests for these two bugs
5486
5487 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5488
5489         * support/Util/SDCCerr.h,
5490         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
5491         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
5492         about storage class and 'at' used inside struct or union
5493         * src/SDCCBBlock.c (iCodeFromeBBlock),
5494         * src/SDCCcse.c (ifxOptimize),
5495         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
5496         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
5497         printIval, emitStaticSeg, emitOverlay),
5498         * src/SDCClabel.c (deleteIfx),
5499         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
5500         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
5501         gatherAutoInit, processParms),
5502         * support/Util/SDCCerr.h,
5503         * support/Util/SDCCerr.c (werrorfl): Support for better error location
5504         reporting for post-parse errors.
5505
5506 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5507
5508         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
5509         implicit casts via union; they don't work on big endian systems
5510         (possible fix for bug #861138)
5511
5512 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5513
5514         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
5515         * src/mcs51/main.c: fixed the fix for bug #737001
5516
5517 2003-12-15  Borut Razem <borut.razem AT siol.net>
5518
5519         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
5520
5521 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5522
5523         * support/makebin/makebin.c: put output in binary mode
5524
5525 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5526
5527         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
5528         xdata and data memory on startup. Set the environment variable
5529         SDCC_NOGENRAMCLEAR to disable this.
5530         * src/mcs51/peephole.def,
5531         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
5532         (allows non-interrupt and interrupt code to safely compete for a resource
5533         without the non-interrupt code having to disable interrupts)
5534
5535 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5536
5537         * src/SDCCicode.c (geniCodeAdd),
5538         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
5539         with valFromType if type might be a pointer and host is big endian).
5540         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
5541         types, not just integer types.
5542         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
5543         multiply defined with mismatching "at" address.
5544
5545 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5546
5547         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
5548         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
5549         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
5550         with embedded nulls (fixed bug #753752)
5551
5552 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5553
5554         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
5555         Apparently this did not see much testing (endless loop)
5556
5557 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5558
5559         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
5560
5561 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5562
5563         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
5564         gracefully handle NULL memmap pointers
5565
5566 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5567
5568         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
5569         instead of deleting the iCode when an operand is volatile
5570         * src/z80/gen.c (genDummyRead),
5571         * src/mcs51/gen.c (genDummyRead),
5572         * src/ds390/gen.c (genDummyRead),
5573         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
5574         not just IC_RIGHT
5575         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
5576         * src/SDCC.y: fixed bug #850420
5577
5578 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5579
5580         Applied z80 i/o port patch from Peter Townson and fixed some operators
5581         to better handle operands in A register.
5582         * device/include/z180.h
5583         * src/SDCC.y
5584         * src/SDCCglue.c
5585         * src/z80/gen.c
5586         * src/z80/gen.h
5587         * src/z80/main.c
5588         * src/z80/peeph-z80.def
5589         * src/z80/peeph.def
5590         * src/z80/z80.h
5591
5592 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5593
5594         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
5595
5596 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5597
5598         * device/lib/hc08/_mullong.c: Removed extra #endif
5599
5600 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5601
5602         * sim/ucsim/hc08.src/inst.cc,
5603         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
5604         carries from x to h
5605         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
5606         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
5607         * device/include/stdarg.h: fixed varargs for hc08
5608         * device/lib/Makefile.in,
5609         * device/lib/hc08/Makefile,
5610         * device/lib/hc08/_mulint.c,
5611         * device/lib/hc08/_mullong.c: fixed some endian problems
5612
5613 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5614
5615         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
5616         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
5617         * device/lib/_gptrget.c,
5618         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
5619
5620 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5621
5622         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
5623         * src/SDCCast.c (astErrors): fixed bug #846007
5624         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
5625
5626 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5627
5628         * src/SDCCast.c (decorateType): disabled a transformation I added in
5629         revision 1.188 (access to fields of a structure at an absolute address);
5630         it breaks with bitfields, extern declarations, and gcse analysis.
5631         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
5632         could be assigned through a pointer, so don't complain.
5633         * src/SDCCast.c (astErrors),
5634         * src/SDCCast.h,
5635         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
5636
5637 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
5638
5639         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
5640         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
5641         output of __config directives, since gpasm now supports them
5642         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
5643         pre-processor macro, i.e. -DMCU=p18f452
5644         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
5645         and modified to handle 'cast' icode similarly to '=' icode
5646         * src/pic16/device.h (typedef struct PIC_device): added field
5647         'extMIface' to indicate that chip has external memory interface
5648         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
5649         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
5650         18F8720
5651
5652 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5653
5654         * src/SDCC.y (pointer): fixed bug #846006
5655         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
5656         * src/SDCCast.c (decorateType): fixed bug #846009
5657         * src/ds390/peeph.def,
5658         * src/ds390/gen.c (genAnd, genOr),
5659         * src/mcs51/peeph.def,
5660         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
5661
5662 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5663
5664         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
5665         * src/SDCCdflow.c
5666         * src/SDCCcse.c
5667         * src/SDCCcse.h
5668         * src/SDCCBBlock.h
5669         * src/SDCCBBlock.c
5670
5671 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
5672
5673         fixed bug #845089
5674         * src/SDCCbitv.h,
5675         * src/SDCCbitv.c: added function to free a bitvector
5676         * src/SDCClrange.h,
5677         * src/SDCClrange.c: added function to recompute the liveranges
5678         * src/avr/ralloc.c,
5679         * src/ds390/ralloc.c,
5680         * src/hc08/ralloc.c,
5681         * src/mcs51/ralloc.c,
5682         * src/pic/ralloc.c,
5683         * src/pic16/ralloc.c,
5684         * src/xa51/ralloc.c,
5685         * src/z80/ralloc.c: recompute the liveranges after register packing
5686
5687 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
5688
5689         * src/SDCCloop.c (newInduction): fixed bug #845630
5690
5691 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5692
5693         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
5694         inadvertantly left behind from my 2003-11-12 change
5695
5696 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5697
5698         Updated headers I neglected to commit yesterday.
5699         * src/SDCClrange.h,
5700         * src/SDCCicode.h
5701
5702 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5703
5704         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
5705         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
5706         * src/SDCCopt.c (eBBlockFromiCode),
5707         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
5708         the creation of the key hash table from the sequencing so it can be used
5709         earlier (for some GCSE bug fixes still pending)
5710
5711 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5712
5713         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
5714         * support/regression/tests/addsub.c: testing genPlus shortcut
5715
5716 2003-11-15  Borut Razem <borut.razem AT siol.net>
5717
5718         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
5719
5720 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5721
5722         * src/SDCCcse.c (cseBBlock): fixed bug #527779
5723         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
5724         ordering is immaterial.
5725         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
5726
5727 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5728
5729         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
5730         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
5731         (SIGSEV) of bug #840381
5732         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
5733         unlink new file before rename if new and old filenames are the same)
5734
5735 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5736
5737         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
5738         uninitialized variables) for the mcs51. Set environment variable
5739         SDCC_GENRAMCLEAR to test.
5740         xdata initialization slightly shorter
5741
5742 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5743
5744         * src/SDCCsymt.h,
5745         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
5746         #838241 & 780691 (basicly the same bug)
5747         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
5748         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
5749
5750 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
5751
5752         * src/SDCCmain.c (linkEdit): "fix" #834252
5753
5754 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5755
5756         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
5757         * src/SDCCast.h,
5758         * src/SDCC.y: fixed bug #819403
5759
5760 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5761
5762         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
5763         the reentrant attribute.
5764         * src/hc08/gen.c (genPackBits): added missing stack readjustment
5765         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
5766         simulation
5767         * src/SDCCast.c (decorateType): fixed bug with storage class not being
5768         updated during pointer dereference; f.e. ~(((char *)1)*) was being
5769         erroneously reduced to a literal.
5770         * src/hc08/ralloc.c (packRegisters, rematStr),
5771         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
5772         some cases
5773
5774 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5775
5776         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
5777         * doc/sdccman.lyx: changed from 'article' to 'book'
5778         * doc/Makefile: readded test_suite_spec and cdbfileformat
5779
5780 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
5781
5782         * device/include/stdlib.h: include malloc.h to comply with ANSI
5783         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
5784
5785 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5786
5787         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
5788         * doc/clean.mk: also remove *.out files
5789         * doc/sdccman.lyx: some additions, larger top/bottom margins
5790
5791 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5792
5793         * src/SDCC.y: fixed bug #837365
5794         * support/regression/tests/bitopcse.c
5795         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
5796         a symbol (might be valop instead)
5797         * device/lib/Makefile.in: added errno.c to HC08SOURCES
5798         * device/lib/clean.mk: added hc08 to the cleaning list
5799
5800 2003-11-04  Borut Razem <borut.razem AT siol.net>
5801
5802         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
5803           made 2003-11-04
5804         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
5805           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
5806           malloc is declared in standard stdlib.h
5807
5808 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5809
5810         * device/lib/hc08/Makefile: need to clean .rel not .o files
5811         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
5812
5813 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5814
5815         * src/port.h,
5816         * src/hc08/main.c,
5817         * src/mcs51/main.c,
5818         * src/ds390/main.c,
5819         * src/z80/main.c,
5820         * src/avr/main.c,
5821         * src/pic/main.c,
5822         * src/pic16/main.c,
5823         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
5824         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
5825         tests (which uses the port's oclsExpense function)
5826         * src/SDCC.y,
5827         * src/SDCCast.c,
5828         * src/SDCCicode.c,
5829         * src/hc08/gen.c,
5830         * src/ds390/gen.c,
5831         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
5832
5833 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5834
5835         * src/SDCCcse.c (ifxOptimize),
5836         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
5837         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
5838         deleting the IFX iCode.
5839         * src/hc08/ralloc.c: reduced unneeded slocs
5840         * src/hc08/gen.c: fixed bug in asmopToBoolean
5841
5842 2003-11-04  Borut Razem <borut.razem AT siol.net>
5843
5844         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
5845           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
5846           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
5847           transferred to configure
5848
5849 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
5850
5851         Use headers defined in the C[++] standards:
5852         * sim/ucsim/gui.src/serio.src/fileio.cc
5853         * sim/ucsim/gui.src/serio.src/frontend.cc
5854         * sim/ucsim/gui.src/serio.src/main.cc
5855         * sim/ucsim/gui.src/serio.src/posix_signal.cc
5856         * support/Util/NewAlloc.c
5857         * as/hc08/lklibr.c
5858         * as/mcs51/lklibr.c
5859         * as/z80/aslist.c
5860         * as/z80/assym.c
5861
5862 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5863
5864         * Added MSVC projects for hc08 assembler and linker:
5865         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
5866         /as/hc08/link_hc08.dsp
5867
5868 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
5869
5870         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
5871
5872 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
5873
5874         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
5875
5876 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5877
5878         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
5879
5880 2003-10-31  Borut Razem <borut.razem AT siol.net>
5881
5882         * support/cpp2/cpplib.h,
5883           support/cpp2/cpplib.c,
5884           support/cpp2/cpplex.c,
5885           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
5886           to switch _asm block preprocessing on / off. Default is
5887           #pragma preproc_asm +
5888
5889 2003-10-31  Borut Razem <borut.razem AT siol.net>
5890
5891         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
5892           when outputting comment blocks (when executed with -C option) and
5893           _asm (SDCPP specific) blocks
5894
5895 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5896
5897         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
5898
5899 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
5900
5901         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
5902
5903 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
5904
5905         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
5906         * src/SDCCast.c (decorateType): fixed bug #832664
5907
5908 2003-10-31  Borut Razem <borut.razem AT siol.net>
5909
5910         * support\cpp2\cpplex.c: fixed for SDCPP:
5911           comments(when executed with -C option) and _asm blocks
5912           were included even if they where in skipped #if block.
5913           Applied solution from GCC cpp 3.3.2
5914
5915 2003-10-31  Borut Razem <borut.razem AT siol.net>
5916
5917         * src/SDCC.lex: sdcc now understands both formats:
5918           '# <line_number> <file_name>' and
5919           '#line <line_number> <file_name>'
5920         * support/cpp2/cppmain.c: sdcpp now generates the standard
5921           '# <line_number> <file_name>' instead of former
5922           '#line <line_number> <file_name>'
5923
5924 2003-10-30  Borut Razem <borut.razem AT siol.net>
5925
5926         * support/cpp2/cpphash.h,
5927         * support/cpp2/cpplib.h
5928         * support/cpp2/cpplex.c,
5929         * support/cpp2/cppmain.c,
5930         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
5931
5932 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5933
5934         Fixed a number of problems revealed by bug #827883.
5935         * src/SDCCloop.c (loopInvariants): Spill location of the
5936         result operand should be recomputed if extracted from
5937         a loop. Also, don't extract assignments of an iTemp
5938         from a literal.
5939         * src/SDCCast.c (isConformingBody): loop reversal should
5940         not occur if the control variable is involved with a
5941         relational operator.
5942
5943 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
5944
5945         * .version: bumped to 2.3.6 to reflect the big improvements
5946         made by Erik and Klaus. Thanks!
5947
5948 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
5949
5950         Replaced the livrange code.
5951         * src/SDCClrange.c: added new LR code
5952         * src/SDCCloop.c,
5953         * src/SDCCBBlock.h: removed remainig parts from old LR code
5954         * src/ds390/ralloc.c,
5955         * src/ds390/gen.c: minor fixes to make it work with new code
5956
5957 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5958
5959         * as/hc08/asm.h,
5960         * as/hc08/lkrloc.c,
5961         * src/hc08/gen.c,
5962         * src/hc08/ralloc.c: Fix various warnings related to the hc08
5963         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
5964         (tweaked fix for bug #818696)
5965
5966 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5967
5968         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
5969
5970 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5971
5972         * src/SDCCmain.c,
5973         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
5974         * src/mcs51/gen.c (gencjneshort),
5975         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
5976         more efficient (per Scott Bronson's suggestion)
5977
5978 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5979
5980         Extended the semantics of the critical keyword to include
5981         individual statements. See RFE #827755 and #799831
5982         * src/SDCC.y
5983         * src/SDCCicode.c
5984         * src/SDCCopt.c
5985         * src/SDCCast.c
5986         * support/Util/SDCCerr.c
5987         * support/Util/SDCCerr.h
5988         * src/mcs51/gen.c
5989         * src/ds390/gen.c
5990         * src/hc08/gen.c
5991
5992 2003-10-19  Borut Razem <borut.razem AT siol.net>
5993
5994         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
5995
5996 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5997
5998         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
5999         Fixed bug #818696
6000         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
6001         and predecrement operand is displayed
6002
6003 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6004
6005         * src/SDCCval.c (valMinus): fixed bug #826041
6006
6007 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6008
6009         Some hc08 related updates that I missed earlier
6010         * sim/ucsim/stypes.h
6011         * support/regression/ports/hc08/spec.mk
6012
6013 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6014
6015         New target "hc08" for the Motorola 68hc08 family of micros
6016
6017         * configure
6018         * configure.in
6019         * Makefile
6020         * src/hc08/*
6021         * src/SDCCmain.c
6022         * src/port.h
6023         * sim/ucsim/hc08.src/*
6024         * sim/ucsim/configure.in
6025         * src/ucsim/configure
6026         * sim/ucsim/packages_in.mk
6027         * as/hc08/*
6028         * as/Makefile
6029         * device/include/mc68hc908qy.h
6030         * device/lib/hc08/*
6031         * device/lib/Makefile.in
6032         * support/regression/ports/hc08/*
6033         * support/regression/Makefile
6034
6035 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6036
6037         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
6038         regression test
6039         * src/ds390/gen.c (genCast): fixed bug #821957
6040
6041 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6042
6043         * device/lib/logf.c: "fixed" overlay bug
6044         * support/regression/ports/host/spec.mk: added m library
6045         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
6046         * support/regression/tests/float_trans: added (for Eric)
6047
6048 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
6049
6050         * src/mcs51/gen.c (genCpl): fixed bug
6051         http://sf.net/mailarchive/message.php?msg_id=6263915
6052
6053 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
6054
6055         * src/SDCCast.c (decorateType): added extended constant folding
6056         * src/SDCCsymt.c (computeType): cleanup
6057         * src/SDCCval.c (valShift): minor optimization
6058         * support/regression/tests/ast_constant_folding.c: added
6059
6060 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6061
6062         * src/SDCCmain.c: removed some unintended changes
6063
6064 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6065
6066         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
6067         * src/z80/gen.c: fixed part of bug #817589
6068         * src/SDCCsymt.c (checkFunction): fixed bug #817895
6069
6070 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
6071
6072         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
6073         * src/SDCCcflow.c
6074         * src/SDCCcse.c
6075         * src/SDCCdflow.c
6076         * src/SDCClabel.c
6077         * src/SDCClrange.c
6078         * src/SDCCmem.c
6079         * src/SDCCopt.c
6080         * src/SDCCpeeph.c
6081         * src/SDCCset.c
6082         * src/avr/ralloc.c
6083         * src/ds390/ralloc.c
6084         * src/izt/ralloc.c
6085         * src/mcs51/ralloc.c
6086         * src/pic/ralloc.c
6087         * src/pic16/ralloc.c
6088         * src/xa51/ralloc.c
6089         * src/z80/ralloc.c
6090         * src/z80/gen.c: removed unused label "release:"
6091
6092 2003-10-06  Borut Razem <borut.razem AT siol.net>
6093
6094         * src/SDCC.lex: removed definition of unused variables
6095           save_optimize and save_options
6096
6097 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
6098
6099         * clean.mk: removed '=' in "-maxdepth=1"
6100         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
6101         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
6102
6103 2003-10-06  Borut Razem <borut.razem AT siol.net>
6104
6105         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
6106           my_unput() replaced by unput()
6107
6108 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
6109
6110         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
6111         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
6112         type-punned pointer will break strict-aliasing rules"
6113         Old LR behaviour is again default; Klaus' LR can be choosen by
6114         defining the environment variable LRKLAUS
6115         * src/SDCCBBlock.h
6116         * src/SDCCloop.c
6117         * src/SDCClrange.c
6118         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
6119         * clean.mk: fixed removal of files in bin/CVS/
6120         * device/lib/clean.mk: fixed removal of directories small and large
6121         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
6122         * src/SDCCicode.c,
6123         * src/SDCCval.c: removed superflous test for pedantic
6124
6125 2003-10-05  Borut Razem <borut.razem AT siol.net>
6126
6127         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
6128           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
6129           message "unmatched #pragma SAVE and #pragma RESTORE"
6130
6131 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6132
6133         * doc/sdccman.lyx: various additions and updates (interrupts, inline
6134           assembly, critical functions, atomic, nojtbound)
6135
6136 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
6137
6138         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
6139         * src/SDCCBBlock.h
6140         * src/SDCCloop.c
6141         * src/SDCCloop.h
6142         * src/SDCClrange.c
6143
6144 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6145
6146         * src/z80/gen.h,
6147         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6148         * src/mcs51/gen.h
6149         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6150         * src/ds390/gen.h
6151         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6152         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
6153         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
6154
6155 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6156
6157         * src/z80/gen.c (genRet): fixed bug #524753
6158         * src/z80/gen.c (genCast): fixed internal error on cast from
6159         pointer to long
6160         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
6161         fix for bug #477835 to the z80
6162         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
6163         for tracking iCodes in the peephole optimizer for z80
6164
6165 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6166
6167         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
6168         the other part of bug #814548
6169         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
6170
6171 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
6172
6173         * src/SDCCcse.c: fixed part of bug #814548
6174
6175 2003-09-28  Borut Razem <borut.razem AT siol.net>
6176
6177         * src/asm.c: rewrite of printILine() to use temporary file instead
6178           a pipe
6179         * src/xa51/main.c: commented out declaration of int rewinds
6180
6181 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6182
6183         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
6184
6185 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6186
6187         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
6188         * src/asm.c (printILine): Fixed bug #811015
6189
6190 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6191
6192         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
6193         freeing.
6194
6195 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6196
6197         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
6198         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
6199         to correctly handle general case of AOP_PAIRPTR
6200         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
6201
6202 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6203
6204         * src/mcs51/ralloc.c (fillGaps),
6205         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
6206         register positioning bug)
6207
6208 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
6209
6210         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
6211
6212 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6213
6214         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
6215         genCodePointerGet, genGenPointerGet, genFarPointerSet,
6216         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
6217         (ralloc doesn't intentionally do this now, but perhaps later)
6218         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
6219         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
6220         register positioning bugs (Fixed bug #762602 and #795325)
6221         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
6222         (Fixed bug #808779)
6223         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
6224         lines that --i-code-in-asm generates
6225
6226 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6227
6228         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
6229         trying to fclose a FILE* that was already closed.
6230
6231 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6232
6233         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
6234         of const struct should be treated as if const themselves)
6235
6236 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
6237
6238         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
6239
6240 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6241
6242         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
6243         Unix (/n) and DOS (/r/n) line terminations.
6244
6245 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6246
6247         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
6248         bug #613775
6249
6250 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6251
6252         * src/mcs51/gen.c (genFunction, genEndFunction),
6253         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
6254         and restore of EA so that stack offsets to parameters are
6255         correct when using both critical and reentrant/stack-auto.
6256         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
6257         size (can be triggered in error if sloc is shared between
6258         different sized objects)
6259         * device/include/float.h: fixed macros to explicitly use
6260         unsigned long where needed
6261
6262 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
6263
6264         Feature req. 799831: added code to allow nesting of critical functions
6265         * src/mcs51/gen.c (genFunction, genEndFunction)
6266         * src/ds390/gen.c (genFunction, genEndFunction)
6267
6268 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6269
6270         * src/SDCCsymt.c (sclsFromPtr),
6271         * src/SDCCsymt.h,
6272         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
6273         support for standard C idiom of memory mapped variables; for
6274         example, *((xdata int*)0x1234) = 1 is now internally equivalent
6275         to xdata int at 0x1234 tempvar = 1.
6276         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
6277         provided by Akiya ISHIDA
6278
6279 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
6280
6281         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
6282         * src/SDCCval.c (constVal): added reduction from int to char
6283         * src/SDCCval.c (valMult, valDiv): fixed sign handling
6284         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
6285         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
6286         to ignore the sign
6287         * support/regression/tests/shifts.c: fixed
6288
6289 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6290
6291         * src/z80/gen.c (genXor): Fixed bug #805445
6292
6293 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6294
6295         Fixed bug #621531 (const & volatile confusion in the type chain).
6296         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
6297         refer to the const or volatile state of the pointer itself.
6298
6299         * src/SDCCast.c
6300         * src/SDCCglue.c
6301         * src/SDCCicode.c
6302         * src/SDCCsymt.c
6303         * src/SDCCval.c
6304         * src/SDCC.y
6305         * src/SDCCsymt.h
6306         * src/pic/gen.c
6307         * src/pic/ralloc.c
6308         * src/pic16/gen.c
6309         * src/pic16/ralloc.c
6310         * support/regression/tests/const.c
6311
6312 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6313
6314         When checking for duplicated modules, use absolute paths
6315         instead of relative paths.  Files changed:
6316
6317         * as/mcs51/lklib.c
6318         * link/z80/lklib.c
6319
6320 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6321
6322         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
6323
6324 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6325
6326         * device/include/string.h: added size_t typedef, changed
6327         prototypes to use size_t, eliminated separate reentrant and
6328         non-reentrant declarations, added _memmove declaration
6329         * device/lib/_memcpy.c: changed to use size_t instead of int,
6330         changed /4 to >>2 to avoid division library call
6331         * device/lib/_memcmp.c,
6332         * device/lib/_memset.c,
6333         * device/lib/_strncat.c,
6334         * device/lib/_strncpy.c,
6335         * device/lib/_strncmp.c: changed to use size_t instead of int
6336         * device/lib/_memmove.c: new file (fixed bug #772294)
6337         * device/lib/Makefile.in: added _memmove.c
6338         * device/lib/z80/asm_strings.s: fixed bug #772290
6339         * support/regression/tests/bitfields.c: attempt to fix host assertion
6340         failure on amd64-unknown-linux2.2
6341
6342 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6343
6344         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
6345         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
6346         * as/z80/asmain.c (main): fixed bug #801766
6347
6348 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
6349
6350         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
6351         compilers
6352
6353 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6354
6355         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
6356         reported in bug #800609
6357
6358 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
6359
6360         * Top header beautifications in src/pic16 directory:
6361           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
6362           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
6363           pcoderegs.h, ralloc.c, ralloc.h
6364         * main.c: added top header and GPL license notice
6365         * pcode.c: fixed the if-conditional warning
6366
6367 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
6368
6369         * device/lib/_mullong.c: replaced int by short for gcc
6370
6371 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6372
6373         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
6374         and JUMPTABLE iCodes properly now (worked by accident before)
6375         * src/mcs51/gen.c (leftRightUseAcc),
6376         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
6377         iCode properly now. Use getSize instead of nRegs since a & b
6378         aren't part of the nRegs tally.
6379
6380 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
6381
6382         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
6383         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
6384           before instructions that use the _STATUS register
6385
6386 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
6387
6388         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
6389         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
6390         fetching of the pointer
6391         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
6392         copied from genNearPointerSet()
6393         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
6394         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
6395         If they pop r0/r1 they must be called in the opposite order than aopOp().
6396         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
6397         (resp. --stack-auto), prepared for --xstack
6398
6399 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6400
6401         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
6402
6403 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
6404
6405         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
6406         these ports have their own __sdcc_external_start()
6407
6408 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
6409
6410         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6411         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
6412         type for bits was changed. It resulted in bit variables becoming
6413         global, which is not permitted in PIC 14 assembly output.
6414
6415 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6416
6417         * doc/sdccman.lyx: various additions and updates. Rearranged sections
6418
6419 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6420
6421         Z80 and MCS51 linkers complaint if a public symbol is defined
6422         in more than one library module:
6423
6424         * as/mcs51/lklib.c
6425         * link/z80/lklib.c
6426         * as/mcs51/Makefile.in
6427
6428 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6429
6430         A few small changes that speed up the peephole optimizer.
6431
6432         * src/SDCCpeeph.c
6433
6434 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6435
6436         Try to make the peephole optimizer smarter by maintaining
6437         an association between the assembly source code and the
6438         iCodes that originated them. Put this information to use
6439         with a new peephole rule condition "notVolatile" so that
6440         the rules can be aggressive yet still safe.
6441
6442         * src/SDCCpeeph.c
6443         * src/SDCCpeeph.h
6444         * src/mcs51/gen.c
6445         * src/mcs51/peeph.def
6446
6447 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6448
6449         Fixed bug #741761
6450
6451         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
6452         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
6453         if the left or right operand symbols have the accuse flag set.
6454
6455 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6456
6457         Changed the type of the result of the ! (NOT) operator to char;
6458         previously it returned the same type as the source. This allows
6459         us to eliminate all the genFloatNot functions (all of its target
6460         implementations were very buggy) since !float can use the same
6461         code as !long now.
6462
6463         * src/SDCCicode.c (ast2iCode): ! returns char
6464         * src/mcs51/gen.c (genNot, genNotFloat),
6465         * src/ds390/gen.c (genNot, genNotFloat),
6466         * src/z80/gen.c (genNot, genNotFloat),
6467         * src/pic/gen.c (genNot, genNotFloat),
6468         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
6469
6470 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
6471
6472         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6473         1. Interrupt would not compile properly. Ensure PCLATH register is saved
6474            during interrupts. Ensure WSAVE is located at a shared bank address.
6475         2. Fixed page selection in some places
6476         3. Fixed BTFSS/C to where necessary use registers directly and not simply
6477            the registers name strings.
6478         4. Fixed "signed / unsigned compare" compiler warnings.
6479         5. The PIC port manages its own allocation of the general purpose
6480            registers, but makes no attempt to reuse them. As a result when
6481            compiling it soon runs out of general purpose registers. Some
6482            additional code was added to the files pcode.c and device.c to walk
6483            through the function call tree and rename the registers so that they
6484            get reused.
6485
6486         * src/pic/device.c
6487         * src/pic/gen.c
6488         * src/pic/glue.c
6489         * src/pic/pcode.c
6490         * src/pic/pcode.h
6491         * src/pic/ralloc.c
6492         * src/pic/ralloc.h
6493         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
6494         genPlus() & genMinus() when the result is the same as left or right
6495
6496 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6497
6498         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
6499
6500 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6501
6502         Made bitfield a distinct type from bit so that bitfields
6503         convert as per ANSI C and bits retain their traditional
6504         boolean style behaviour. Implemented bitfield support in
6505         the z80 port.
6506
6507         * src/SDCCsymt.h,
6508         * src/SDCCsymt.c,
6509         * src/SDCCast.c,
6510         * src/cdbFile.c,
6511         * src/mcs51/gen.c,
6512         * src/ds390/gen.c: bit v bitfield split
6513         * src/z80/gen.c: New support for bitfields
6514         * support/regression/tests/bitfields.c: reenabled z80,
6515         added more tests
6516
6517 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6518
6519         Rules 246.x, 247.x relate to bitfields, the others speed up
6520         access to xdata mapped I/O devices.
6521
6522         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
6523
6524 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6525
6526         Cleaned up genPackBits and genUnpackBits and added two helper
6527         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
6528         for literal assignments in genPackBits (thanks to Frieder for
6529         reminding me).
6530
6531         * src/mcs51/gen.c
6532         * src/ds390/gen.c
6533
6534 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6535
6536         Fixed bug #748310 (pointer to function type mishandled when the
6537         function name is omitted). Also fixed a SIGSEGV when a function
6538         attribute (reentrant, etc) is used on a non-function or on a
6539         function but misplaced before the parameter list.
6540
6541         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
6542         bug #748310
6543         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
6544         * support/Util/SDCCerr.h,
6545         * support/Util/SDCCerr.c: Added func attr misuse error msg
6546
6547 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6548
6549         Fixed bug #787649 by anonymous
6550         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
6551         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
6552
6553 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6554
6555         Fixed numerous bitfield problems.
6556
6557         * src/SDCC.y: More bitfield related error checking
6558         * src/SDCCsymt.h,
6559         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
6560         * support/Util/SDCCerr.h,
6561         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
6562         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6563         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6564         * support/regression/tests/bitfields.c: tests added
6565
6566 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6567
6568         Made the constant following the "interrupt" keyword optional. If
6569         omitted, the function will not automatically be given an entry
6570         in the interrupt vector table (similar to #pragma NOIV, but
6571         less syntacticly kludgy). The interrupt number is also now
6572         range checked. Also fixed a bug in the high order bit example
6573         in the manual.
6574
6575         * src/SDCC.y
6576         * src/SDCCmem.c
6577         * src/SDCCglue.c
6578         * src/SDCCsymt.h
6579         * support/Util/SDCCerr.c
6580         * support/Util/SDCCerr.h
6581         * doc/sdccman.lyx
6582
6583 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6584
6585         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
6586         * src/SDCCicode.c (operandOperation): rewritten some ops
6587         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
6588         * src/SDCCsymt.c (computeType): literals are handled the same way as any
6589         other type
6590         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
6591         be re-activated by defining REDUCE_LITERALS)
6592         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
6593         unsigned, but are signed by default
6594         * src/SDCCval.c (constVal): rearranged
6595         * src/SDCCval.c (valMod): preliminary fix
6596         * src/SDCCval.c (valCastLiteral): use TYPE_* types
6597         * support/regression/literalop.c: added, work in progress
6598
6599 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6600
6601         Generate warnings for useless declarations like "char data;"
6602         that don't do what new users expect.
6603
6604         * src/SDCC.y
6605         * support/Util/SDCCerr.h
6606         * support/Util/SDCCerr.c
6607
6608 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
6609
6610         * src/SDCCval.c (valMult): fix overflow detection of negative int
6611
6612 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6613
6614         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
6615
6616         Changes to support big endian targets:
6617
6618         * src/ports.h
6619         * src/SDCCglue.c
6620         * src/avr/main.c
6621         * src/ds390/main.c
6622         * src/izt/i186.c
6623         * src/mcs51/main.c
6624         * src/pic/main.c
6625         * src/pic16/main.c
6626         * src/xa51/main.c
6627         * src/z80/main.c
6628
6629 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
6630
6631         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
6632         * device/lib/time.c: fixed warning "integer overflow in expression"
6633
6634 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
6635
6636         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
6637         * src/SDCCval.c (constVal): changed default to signed; hex and octal
6638         constants are unsigned; added recognition of "u" flag for unsigned
6639         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
6640         * src/SDCCval.c (valDiv, valMod): fixed signdness
6641         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
6642         signedness of modulo, left and right shift
6643         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
6644         * support/Util/SDCCerr.h: added warning W_INT_OVL
6645         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
6646         * src/SDCCast.c (ast_print): improved output of constants
6647
6648 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6649
6650         Fixed some warnings when building with MSVC:
6651
6652         * as\mcs51\asdata.c
6653         * as\z80\asdata.c
6654         * as\mcs51\asm.h
6655         * as\z80\asm.h
6656         * link\z80\aslink.h
6657         * link\z80\lkdata.c
6658         * link\z80\lkeval.c
6659         * link\z80\lkgb.c
6660         * link\z80\lkihx.c
6661         * link\z80\lks19.c
6662         * link\z80\lksym.c
6663         * support\cpp2\cpplib.c
6664         * src\ds390\gen.c
6665         * src\mcs51\gen.c
6666
6667 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
6668
6669         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
6670
6671 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6672
6673         * support\librarian\clean.mk: Do not remove Makefile.
6674         * support\librarian\Makefile: added.
6675
6676 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6677
6678         Added librarian to MSVC build:
6679         * all.dsp
6680         * sdcc.dsw
6681         * support\librarian\librarian.dsp
6682
6683         'configure' not needed for librarian, removed:
6684         * support\librarian\configure
6685         * support\librarian\configure.in
6686         * support\librarian\config_in.h
6687         * support\librarian\Makefile.in
6688
6689         Hopefully these ones built the librarian and the rest of sdcc properly:
6690         * Makefile
6691         * Makefile.common.in
6692
6693         Messed up 'configure', so revert to previous version:
6694         * configure
6695         * configure.in
6696
6697 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
6698
6699         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
6700         there, while the mantissa of a double is "only" 53 bits wide.
6701
6702 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6703
6704         Adding sdcclib to the build.  MSVC project coming soon.
6705         Files added/changed:
6706
6707         * support\librarian\clean.mk
6708         * support\librarian\configure
6709         * support\librarian\configure.in
6710         * support\librarian\config_in.h
6711         * support\librarian\Makefile.bcc
6712         * support\librarian\Makefile.in
6713         * support\librarian\sdcclib.c
6714         * Makefile.bcc
6715         * Makefile
6716         * Makefile.common.in
6717         * configure
6718         * configure.in
6719
6720 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6721
6722         Linker now complaints if linked modules have conflicting options, for
6723         example, one compiled using --model-large and another one compiled with
6724         --model-small.  The following files were modified:
6725
6726         * as\mcs51\asdata.c
6727         * as\mcs51\aslink.h
6728         * as\mcs51\asm.h
6729         * as\mcs51\asmain.c
6730         * as\mcs51\asout.c
6731         * as\mcs51\i51pst.c
6732         * as\mcs51\lkdata.c
6733         * as\mcs51\lklibr.c
6734         * as\mcs51\lkmain.c
6735         * as\z80\asdata.c
6736         * as\z80\asm.h
6737         * as\z80\asmain.c
6738         * as\z80\asout.c
6739         * as\z80\z80pst.c
6740         * link\z80\aslink.h
6741         * link\z80\lkdata.c
6742         * link\z80\lklibr.c
6743         * link\z80\lkmain.c
6744         * src\SDCCglue.c
6745
6746 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6747
6748         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
6749         as/mcs51/lklibr.c: Generate a warning when a library is not found.
6750
6751 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
6752
6753         * src/z80/mappings.i: fix _mul[us][int,long] entries
6754
6755 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6756
6757         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
6758
6759 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
6760
6761         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
6762         * support/regression/tests/bitopcse.c: added
6763         fixed warning:
6764         * src/avr/gen.c:
6765         * src/pic/gen.c:
6766         * src/pic16/gen.c:
6767         * src/z80/gen.c:
6768         * src/xa51/gen.c:
6769
6770 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6771
6772         added support for new library format to z80, gbz80 linkers:
6773         *link/z80/aslink.h
6774         *link/z80/lklex.c
6775         *link/z80/lklib.c
6776         *link/z80/lklist.c
6777
6778 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
6779
6780         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
6781         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
6782
6783 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
6784
6785         added DUMMY_READ_VOLATILE:
6786         * src/SDCC.y:
6787         * src/avr/gen.c:
6788         * src/xa51/gen.c:
6789         * src/z80/gen.c:
6790         * src/pic/gen.c:
6791         * src/pic16/gen.c:
6792         * src/mcs51/gen.c:
6793         * src/ds390/gen.c:
6794         * src/SDCCcse.c (algebraicOpts): many improvements
6795         * src/SDCCcse.h: removed algebraicOpts()
6796         * src/SDCCicode.c (picDummyRead): added
6797
6798 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6799
6800         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
6801         "Insufficient space in data memory".
6802
6803 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6804
6805         * src/mcs51/gen.c: fixed bug #771358
6806         * src/z80/gen.c: fixed bug #759087
6807
6808 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
6809
6810         * src/pic16/glue.c: minor cleanup by Vangelis
6811
6812 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6813
6814         * device/include/regc515c.h: fixed #758477
6815         * device/lib/_gptrget.c: saving some cycles in generic pointer get
6816         * device/lib/_gptrput.c: saved a few bytes
6817         * my tab spacing is 8, yours too?)
6818         * device/lib/_ser.c: process RX bytes earlier than TX bytes
6819         * device/lib/serial.c: process RX bytes earlier than TX bytes
6820         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
6821
6822 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6823
6824         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
6825
6826 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6827
6828     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
6829
6830 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
6831
6832         * device/lib/Makefile.in: bad fix, reverted to 1.43
6833
6834 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
6835
6836         * device/lib/Makefile.in: added missing z80 object files
6837
6838 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
6839
6840         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
6841         pic16 progress by Vangelis:
6842         * src/SDCCglobl.h:
6843         * src/SDCCmain.c:
6844         * src/pic/Makefile:
6845         * src/pic:
6846         * pic/Makefile:
6847         * pic16/device.c:
6848         * pic16/device.h:
6849         * pic16/gen.c:
6850         * pic16/gen.h:
6851         * pic16/genarith.c:
6852         * pic16/glue.c:
6853         * pic16/main.c:
6854         * pic16/pcode.c:
6855         * pic16/pcode.h:
6856         * pic16/pcodepeep.c:
6857         * pic16/peeph.def:
6858
6859 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6860
6861     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
6862
6863 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6864
6865     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
6866     added gbz80 build to MSVC project.
6867     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
6868     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
6869     from 8051 stuff and setup so it links using a .lnk file.
6870
6871 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6872
6873     * support/librarian/sdcclib.c: sdcc librarian.
6874     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
6875     with sdcclib.
6876
6877 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6878
6879     * as/mcs51/lkmain.c: properly handle extensions in function afile.
6880
6881 2003-07-02  Borut Razem <borut.razem AT siol.net>
6882
6883         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
6884         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
6885         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
6886         src/xa51/main.c, src/z80/main.c:
6887         virtualization of glue() function: each port has it's own glue function,
6888         which is accessed by do_glue function pointer in PORT.general structure
6889
6890 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
6891
6892         * DS800C400 fun, improved ROM interface and tinibios.
6893
6894 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
6895
6896         * More support for DS80C400. Now includes beginning of interface to ROM.
6897
6898 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
6899
6900         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
6901
6902 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6903
6904         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
6905
6906 2003-06-19  Borut Razem <borut.razem AT siol.net>
6907
6908         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
6909
6910 2003-06-19  Borut Razem <borut.razem AT siol.net>
6911
6912         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
6913         fixed Z80 port - crt0.o: cannot open.
6914
6915 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
6916
6917         * support/Util/MySystem.c (merge_command): revert bad fix
6918
6919 2003-06-18  Borut Razem <borut.razem AT siol.net>
6920
6921         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
6922
6923 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6924
6925         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
6926         option --use-stdout sends errors to stdout instead of stderr.
6927
6928 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
6929
6930         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
6931
6932 2003-06-15  Borut Razem <borut.razem AT siol.net>
6933
6934         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
6935         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
6936         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
6937         fixed width array of pointers replaced with sets;
6938         multiple include and lib paths ared transferred to preprocessor and linker
6939         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
6940         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
6941         fixed width array of pointers
6942         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
6943         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
6944         fixupPath(), getPathDifference()
6945         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
6946         fixed width array of pointers
6947
6948 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
6949
6950         * src/pic16/ralloc.c: fix warnings
6951         * src/pic16/pcode.c: fix warning
6952
6953 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
6954
6955          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
6956         know all the details, but essentially this set of changes enable
6957         the pic16 port to generate movff instructions and generate assembler
6958         directives,
6959         * src/SDCCmain.c:
6960         * src/pic16/gen.c:
6961         * src/pic16/glue.c:
6962         * src/pic16/pcode.c:
6963         * src/pic16/device.c:
6964         * src/pic16/main.c:
6965         * src/pic16/pcode.h:
6966         * src/pic16/pcoderegs.c:
6967         * src/pic16/ralloc.c:
6968         * src/pic16/ralloc.h:
6969
6970 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6971
6972         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
6973         added option --vc, so sdcc errors and warnings are compatible with
6974         Microsoft Visual Studio.
6975
6976 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6977
6978         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
6979           device/lib/libfloat.lib: added atof function.
6980
6981 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
6982
6983         * doc/sdccman.lyx: updated to Lyx 1.3
6984         * doc/cdbfileformat.lyx: updated to Lyx 1.3
6985         * doc/test_suite_spec.lyx: updated to Lyx 1.3
6986         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
6987
6988 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
6989
6990         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
6991
6992 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6993
6994         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
6995           additions to the "related tools/documentation" section
6996
6997 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
6998
6999         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
7000
7001 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
7002
7003         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
7004         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
7005
7006 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
7007
7008         * doc/sdccman.lyx: fix double dash and other minor things
7009         * doc/Makefile: fix double dash
7010
7011 2003-05-28  Karl Bongers(patches from Martin Helmling)
7012         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
7013           condition and ignore commands.
7014
7015 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7016
7017         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
7018           is in parts still quite out of date, I did changes as far as I felt makes sense
7019           for a non-native english speaker.
7020           Please feel free to add to the manual or to correct my changes.
7021         * doc/Makefile: undid touching the date of intermediate tex files.
7022
7023 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7024
7025         * doc/sdccman.lyx: Manual has an index now
7026
7027 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
7028
7029         Finalize muluint/mulsint and mululong/mulslong merging:
7030         * device/lib/_mulint.c
7031         * device/lib/_mullong.c
7032         * device/lib/gbz80/mul.s
7033         * device/lib/gbz80/stubs.s
7034         * device/lib/z80/mul.s
7035         * device/lib/z80/stubs.s
7036         * src/SDCCsymt.c (initCSupport)
7037
7038 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7039
7040         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
7041         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
7042           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
7043           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
7044           instead of /Zm500.
7045
7046 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7047
7048         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
7049           the regression tests I'm not brave enough to enable 245.b, 245.c
7050         * doc/sdccman.lyx: added latex preamble for hyperref package.
7051           Using pdflatex this will give you a hyperlinked pdf file with
7052           bookmarks. (prepend '%' before /usepackage if this breaks something)
7053
7054 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7055
7056          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
7057
7058 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
7059
7060         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
7061
7062 2003-05-21    <johan AT balder>
7063
7064         * src/SDCCglue.c (printIval): fixed bug #739934
7065
7066 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7067
7068         Applied patch from bug 737905 (renamed yylineo to mylineno):
7069         * src/altlex.c
7070         * src/SDCCast.c
7071         * src/SDCglobl.h
7072         * src/SDCC.lex
7073         * src/SDCCsymt.c
7074         * src/SDCCval.c
7075         * src/pic16/pcode.c: Cleaned warnings
7076         * src/pic16/pcodeflow.c: Cleaned warnings
7077         * src/pic16/pcoderegs.c: Cleaned warnings
7078
7079 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
7080
7081         * src/pic16/pcode.c: Cleaned warnings
7082         * src/pic16/pcodepeep.c: Cleaned warnings
7083         * src/pic16/ralloc.c: Cleaned warnings
7084
7085 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7086
7087         * doc/sdccman.lyx: fixed bug 739745
7088         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
7089
7090 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
7091
7092         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
7093         it can be defined with CFLAGS when running configure
7094         * src/SDCCmain.c: fixed compiling + linking with object files
7095
7096 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
7097
7098         * configure.in: configure for pic16 port,
7099             added --disable-pic16-port
7100         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
7101         * src/SDCCmain.c: linkOptions is changed to set *,
7102             added if/endif conditional macros to remove options help
7103             messages from optionsTable when a port is not configured, added
7104             support for the PIc16 port in the ports table, when executing
7105             the compiler with no port specified on command line, a default
7106             port is selected with the new macro DEFAULT_PORT which is
7107             defined in port.h, in setDefaultOptions() linkOptions is removed
7108             from initialization assignment, since now it is a set,
7109             parseCmdLine uses setParseWithComma for linkOptions, in
7110             linkEdit() linkOptions are accessed with new function indexSet()
7111             which returns the i'th item of a set variable. See SDCCset.c, in
7112             linkEdit() when calling buildCmdLine(), added linkOptions as
7113             last argument. Now users can pass arguments to gplink via the
7114             -Wl option, main() uses pic16glue() to glue up pic16 programs
7115         * src/SDCCpeeph.c: various changes to support pic16
7116         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
7117             return the i'th item of the set
7118         * src/SDCCset.h: added function prototype for indexSet()
7119         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
7120         * src/clean.mk: added pic16 in CLEANALLPORTS variable
7121         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
7122             added macro DEFAULT_PORT
7123         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
7124         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
7125             generated
7126         * src/pic16/glue.c: commented out some error producing lines
7127         * src/pic16/main.c: __config directives are commented out to stop
7128             gpasm complaining and test the linkage with gplink, _linkCmd and
7129             _asmCmd changed to be more gplink and gpasm friendly
7130         * src/pic16/peeph.def: peep rule 3 is commented out, since it
7131             produced an error when parsed, peep rule 12 is added to utilize
7132             movff, but it is commented out since the pCode does not support
7133             yet a command with 2 address arguments
7134
7135 2003-05-18    <johan AT balder>
7136
7137         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7138         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7139 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
7140
7141         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
7142   Added feature to script commands from file.
7143
7144 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
7145
7146         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
7147         * src/SDCCutil.c: include ctype.h for win32
7148
7149 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
7150
7151         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
7152
7153 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
7154
7155         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
7156   Fixed so you can set breakpoints prior to run, run does not stop
7157   on entry now.  Add tbreak.  Other enhancements and fixes for use
7158   with ddd.
7159
7160 2003-05-12  Borut Razem <borut.razem AT siol.net>
7161
7162         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
7163
7164 2003-05-11  Borut Razem <borut.razem AT siol.net>
7165
7166         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
7167         the path of bin directory, so that PATH is the only env. variable, which has to be set
7168         in case of standard installation.
7169         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
7170         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
7171         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
7172
7173 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7174
7175         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
7176         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
7177         temp files are in the port dir; clean the gen/test directory when
7178         generating new test.c
7179         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
7180         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
7181         * support/regression/tests/zeropad.c: added
7182
7183 2003-05-09    <johan AT balder>
7184
7185         * src/SDCCglue.c: fixed bug #597940
7186
7187 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
7188
7189         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7190   cache sfr, optimize next,step, fix off by one sourceline,
7191   support ddd list function.
7192         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
7193
7194 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7195
7196         * support/regression/HTMLgen.py: added compare_s2f()
7197         * support/regression/Makefile: redo 1.27
7198         * support/regression/generate-cases.py: redo 1.5
7199
7200 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
7201
7202         * support/regression/tests/float.c: workaround 33 bit hex constant
7203         * support/regression/tests/simplefloat.c: fix division for host
7204
7205 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
7206
7207         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
7208         that tame's the PIC's over-aggressive optimizer.
7209
7210 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7211
7212          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
7213          support for MSVC.
7214
7215 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
7216
7217         Initial support for DS80C400. "Hello world" runs on TINIm400
7218         (with polled I/O).
7219
7220 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
7221
7222          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7223          * Some notes on ddd usage added in debugger/README
7224          Martin Helmling adding more features and fixes for ddd GUI debugger.
7225          Code added for nexti, stepi, up, down, and other adjustments.
7226
7227 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
7228
7229         * src/pic/pCodepeep.c non-wildcard asmops are now handled
7230         * src/pic/peeph.def Added two rules to optimize carry manipulation
7231         * src/pic/* removed debug printfs
7232
7233 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
7234
7235         * debugger/mcs51/cmd.c: added header newalloc.h
7236
7237 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
7238
7239         * as/Makefile: new EXEEXT
7240         * as/z80/Makefile: remove trailing slash of BUILDIR
7241         * as/z80/clean.mk: new EXEEXT
7242         * Makefile.common.in: add to CFLAGS (and others), don't replace it
7243         * support/cpp2/Makefile.in: new EXEEXT
7244         * src/pic/glue.c (pic14emitRegularMap): fixed warning
7245
7246 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
7247
7248         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
7249         EXEEXT was introduced to fix all related problems with targets
7250         "clean", "install" and "uninstall"; a couple of further flaws
7251         especially with "clean" have been fixed too
7252         * as/mcs51/Makefile.in
7253         * as/mcs51/clean.mk
7254         * as/z80/Makefile
7255         * Makefile
7256         * clean.mk
7257         * debugger/mcs51/Makefile.in
7258         * debugger/mcs51/clean.mk
7259         * link/z80/Makefile
7260         * link/z80/Makefile.in
7261         * link/z80/clean.mk
7262         * link/Makefile
7263         * packihx/Makefile.in
7264         * packihx/clean.mk
7265         * sim/ucsim/Makefile
7266         * sim/ucsim/clean.mk
7267         * sim/ucsim/avr.src/Makefile.in
7268         * sim/ucsim/avr.src/clean.mk
7269         * sim/ucsim/s51.src/Makefile.in
7270         * sim/ucsim/s51.src/clean.mk
7271         * sim/ucsim/xa.src/Makefile.in
7272         * sim/ucsim/xa.src/clean.mk
7273         * sim/ucsim/z80.src/Makefile.in
7274         * sim/ucsim/z80.src/clean.mk
7275         * sim/ucsim/main_in.mk
7276         * sim/ucsim/packages_in.mk
7277         * sim/ucsim/gui.src/Makefile.in
7278         * sim/ucsim/gui.src/serio.src/Makefile.in
7279         * sim/ucsim/gui.src/serio.src/clean.mk
7280         * src/Makefile.in
7281         * src/clean.mk
7282         * support/cpp2/Makefile.in
7283         * support/cpp2/clean.mk
7284         * support/makebin/Makefile
7285         * support/makebin/clean.mk
7286         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
7287         * doc/sdccman.lyx: --program-suffix no longer needed
7288
7289 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
7290
7291          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
7292          Martin Helmling added support for ddd GUI debugger.
7293          Code added to display assembly, set variables, and other commands
7294          to interface to ddd.
7295
7296 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
7297
7298         * as/Makefile: fix target clean
7299         * as/clean.mk: fix target clean
7300         * as/z80/clean.mk: fix target clean
7301
7302 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
7303
7304         * Makefile.common.in: added  AT EXEEXT AT
7305         * configure.in: removed all mingw32 stuff
7306         * configure: rebuilt from configure.in
7307         * doc/sdccman.lyx: updated section "installation"
7308         * support/scripts/sdcc_mingw32: adapted to configure
7309         * support/scripts/sdcc_cygwin_mingw32: added
7310
7311 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
7312
7313         * src/pic Added object file support for the PIC port
7314         * src/pic Applied patch from Craig Franklin (this started the object file support)
7315         * src/regression Updated the PIC regression tests for object files
7316
7317 2003-04-20  Borut Razem <borut.razem AT siol.net>
7318
7319         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
7320           lklex.c: In function `getfid':
7321           lklex.c:203: warning: array subscript has type `char'
7322         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
7323           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
7324         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
7325           stack handling macros
7326
7327 2003-04-19  Borut Razem <borut.razem AT siol.net>
7328
7329         * "handling space characters in file path" task:
7330         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
7331         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
7332         * support/Util/MySystem.h: make it self-sufficient
7333         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
7334           src/z80/main.c, sdcc/as/mcs51/lklex.c:
7335           handling space characters in file path
7336         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
7337           (it will be used by assemblers, which have their own includes, e.g. gpasm)
7338         * support/Util/MySystem.c: handling space characters in executable's path
7339
7340 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
7341
7342         * as/z80/Makefile: fix permanent rebuild of z80
7343         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
7344         * support/regression/tests/bitfields.c: added Johan's bitfields.c
7345
7346 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
7347
7348         * src/SDCCopt.c: add special case optimization to replace modulo by
7349           a power of two with a bitwise AND.
7350
7351 2003-04-18    <johan AT balder>
7352
7353         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
7354
7355 2003-04-17    <johan AT balder>
7356
7357         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
7358         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
7359
7360 2003-04-13  Borut Razem <borut.razem AT siol.net>
7361
7362         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
7363         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
7364           fixed mingw problem in adl_NORMALIZE_PATH
7365
7366 2003-04-12  Borut Razem <borut.razem AT siol.net>
7367
7368         * fixed "#pragma SAVE/RESTORE can not be nested":
7369         * src/SDCC.lex: reworked pragma handling functions
7370         * sdcc/src/SDCCglobl.h: reworked stack handling macros
7371         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
7372
7373 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7374
7375         * src/SDCCutil.c (pathEquivalent): defined but not used
7376         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
7377         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
7378         * configure: rebuilt from configure.in
7379         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7380         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7381         * device/include/Makefile.in: replace sdcc_datadir
7382         * device/lib/Makefile.in: replace sdcc_datadir
7383         * Makefile.common.in: add LDFLAGS from configure
7384         * packihx/Makefile.in: use LDFLAGS
7385         * src/Makefile.in: use LDFLAGS
7386         * support/cpp2/Makefile.in: add LDFLAGS from configure
7387         * support/makebin/Makefile: use LDFLAGS
7388         * .version: bumped version number to 2.3.5
7389
7390 2003-04-12  Borut Razem <borut.razem AT siol.net>
7391
7392         * completed "different paths" task:
7393         * src/SDCCmacro.c: fixed bug in handling quotes
7394         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
7395         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
7396
7397 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7398
7399         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
7400
7401 2003-04-11 kevin Vigor <kevin AT vigor.nu>
7402
7403         * ds390/gen.c ds390/peeph.def: fix bug 706781
7404
7405 2003-04-11  Borut Razem <borut.razem AT siol.net>
7406
7407         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
7408
7409 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
7410
7411         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
7412         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
7413          set - this bit used to not be set...).
7414         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
7415           bad code in PIC Port
7416         * src/regression/and2.c added to test bug 609268
7417         * src/regression/Makefile added and2.c to regression test
7418
7419
7420 2003-04-08    <johan AT CP255758-A>
7421
7422         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
7423         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
7424         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
7425
7426 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
7427
7428         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
7429         fix bug #487815
7430         * support/cpp2/Makefile.in: fix bug #487815
7431         * configure: rebuilt from configure.in
7432         * Makefile.common.in: docdir changed, new path suffixes
7433         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7434         * sdcc_vc_in.h: reflect changes from sdccconf.h
7435         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
7436         * src/SDCCutil.h: remove BINDIR hack
7437         * doc/sdccman.lyx: update new path hierarchy
7438
7439 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7440
7441         * src/SDCCpeeph.c: added okToRemoveSLOC test
7442
7443 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7444
7445         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
7446
7447 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7448
7449         * src/SDCCpeeph.c: added labelIsReturnOnly test
7450         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
7451
7452 2003-04-05    <johan AT balder>
7453
7454         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
7455         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
7456         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
7457         * src/SDCCast.c: fixed a warning
7458         * src/SDCCast.h: fixed a warning
7459         * src/SDCCicode.c (operandFromAst): fixed a warning
7460
7461 2003-04-04    <johan AT balder>
7462
7463         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
7464         * src/SDCCast.c (decorateType): fixed bug #715076
7465         * src/SDCC.y: fixed bug #702907
7466
7467 2003-04-03    <johan AT balder>
7468
7469         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
7470         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
7471         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
7472         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
7473         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
7474
7475 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
7476
7477         * _decdptr.c: fix return values
7478         * _gptrget.c: fix return values
7479         * _gptrgetc.c: fix return values
7480         * _gptrput.c: fix return values
7481         * _mulint.c: fix return values
7482         * as/z80/Makefile: fix 'make -j' problem
7483
7484 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
7485
7486         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
7487         * configure.in: big cleanup, updated to autoconf 2.5x
7488         * configure: rebuilt from configure.in
7489         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7490         * sdcc_vc_in.h: reflect changes from sdccconf.h
7491         * doc/Makefile: fixed a flaw in "make install"
7492
7493 2003-04-02    <johan AT balder>
7494
7495         * src/ds390/gen.c (genCmp): no comments
7496         * src/mcs51/gen.c (genCmp): no comments
7497         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
7498         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
7499
7500 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
7501
7502         * support/regression/generate-cases.py: place generated file in given sub directory
7503         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
7504         * support/regression/Makefile: improvements for 'make -j';
7505         side effect: it's simpler and faster now
7506
7507 2003-03-31  Borut Razem <borut.razem AT siol.net>
7508
7509         * src/z80/main.c: link-{port} and as-{port} defined without path
7510         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
7511
7512 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
7513
7514         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
7515
7516 2003-03-30  Borut Razem <borut.razem AT siol.net>
7517
7518         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
7519           changed type of list parameter to set
7520         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
7521         * src/port.h: changed type of do_assemble() parameter to set
7522         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
7523           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
7524           definition of "cppoutfilename" macro with NULL value in preProcess()
7525         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
7526         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
7527         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
7528           replaced with set *binPathSet
7529         * shash_add() deallocates the item, if allready exsists, before adding the new one
7530         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
7531
7532 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
7533
7534         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
7535           a nested for loop bug in the PIC port
7536         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
7537           for loops
7538
7539 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
7540
7541         * support/Util/dbuf.h: remove C++ stuff to make it portable
7542
7543 2003-03-28  Borut Razem <borut.razem AT siol.net>
7544
7545         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
7546           literal strings in stringLiteral()
7547         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
7548         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
7549           to the project
7550
7551 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
7552
7553         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
7554
7555 2003-03-26    <johan AT balder>
7556
7557         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
7558         * src/ds390/gen.c (saveRegisters): catched symbol abuse
7559         * src/SDCCast.c (decorateType): fixed " -v < 3"
7560
7561 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
7562
7563         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
7564         Added Lenny Story's debug infrastructure changes:
7565         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
7566         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
7567         * src/cdbFile.c: added
7568         * src/SDCCdebug.c: added
7569         * src/SDCCdebug.h: added
7570         * src/SDCCast.c (createFunction)
7571         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
7572         * src/SDCCmain.c (parseCmdLine, main)
7573         * src/SDCCmem.c (redoStackOffsets)
7574         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
7575         * src/SDCCsymt.h
7576         * src/common.h
7577         * src/avr/gen.c (genAVRCode)
7578         * src/ds390/gen.c (gen390Code)
7579         * src/mcs51/gen.c (gen51Code)
7580         * src/pic/gen.c (genpic14Code)
7581         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
7582         * src/xa51/gen.c (genXA51Code)
7583         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
7584
7585 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7586
7587         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
7588         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
7589
7590 2003-03-22    <johan AT balder>
7591
7592         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
7593
7594 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
7595
7596         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
7597         * doc/cdbfileformat.lyx: added, written by Lenny Story
7598         * doc/Makefile: added cdbfileformat.lyx
7599         * doc/clean.mk: added cdbfileformat.lyx
7600
7601 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
7602
7603         * src/mcs51/peeph.def: fix bug #705773
7604
7605 2003-03-20    <johan AT balder>
7606
7607         An sfr/sbit can have an "at #" AND an initializer
7608         * src/SDCCsymt.c (checkSClass):
7609         * src/SDCCmem.c (allocGlobal):
7610         * src/SDCCmem.c (allocLocal):
7611         * src/SDCCast.c (createBlock):
7612
7613 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
7614
7615         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
7616
7617 2003-03-16    <johan AT balder>
7618
7619         Undid the hackup of const and volatile, the problem is much bigger
7620         * src/SDCC.y:1.65
7621         * src/SDCCast.c:1.171
7622         * src/SDCCglue.c:1.138
7623         * src/SDCCicode.c:1.146
7624         * src/SDCCsymt.c:1.150
7625         * src/SDCCval.c:1.65
7626
7627 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
7628
7629         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
7630         * src/ds390/gen.c (genAddrOf): fixed bug #704087
7631
7632 2003-03-13    <johan AT balder>
7633
7634         Hackup const and volatile modifiers in type chains a bit:
7635         * src/SDCC.y:1.63
7636         * src/SDCCast.c:1.169
7637         * src/SDCCglue.c:1.136
7638         * src/SDCCicode.c:1.143
7639         * src/SDCCsymt.c1.146
7640         * src/SDCCsymt.h1.59
7641         * src/SDCCval.c:1.63
7642
7643 2003-03-12    <johan AT balder>
7644
7645         * src/SDCCBBlock.h: more LRH debugging junk
7646         * src/SDCCcflow.h: more LRH debugging junk
7647         * src/SDCCloop.c: more LRH debugging junk
7648         * src/SDCC.y (struct_declaration): fixed bug #697590
7649         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
7650         * src/ds390/gen.c (aopForRemat): fixed bug #700031
7651         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
7652
7653 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7654         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
7655         test function names must now match exactly).
7656         * src/SDCCcse.c: added special case in findCheaperOp to allow
7657         extending a short integer. Makes less awful code for bug 700121 test case.
7658
7659 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7660
7661         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
7662         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
7663
7664 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7665
7666         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
7667         actually called (operandsNotEqual() was called for all
7668         operandsNotEqualX tests).
7669
7670 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7671
7672         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
7673         with shorter literals. Fixes bug 700121.
7674
7675 2003-03-11    <johan AT balder>
7676
7677         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
7678
7679 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
7680
7681         * src/SDCCloop.c (mergeRegions): an evil beast is dead
7682         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
7683
7684 2003-03-10  Borut Razem <borut.razem AT siol.net>
7685
7686         * src/SDCCmain.c: pipe preprocessor's output
7687         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
7688         * sdcc_vc_in.h: define pclose as _pclose for WIN32
7689         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
7690         which closes all pipes in pipeSet set
7691         * src/SDCCset.c: free deleted item in function deleteSetItem()
7692         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
7693         moved from z80 to src subproject
7694         * .version: increased version number to 2.3.4
7695
7696 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
7697
7698         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
7699         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
7700         * support/regression/ports/xa51/spec.mk: fix typo
7701
7702 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
7703
7704         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
7705
7706 2003-03-09  Borut Razem <borut.razem AT siol.net>
7707
7708         * src/SDCCmain.c: pipe preprocessor's output
7709         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
7710         * sdcc_vc_in.h: define pclose as _pclose for WIN32
7711         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
7712         which closes all pipes in pipeSet set
7713         * src/SDCCset.c: free deleted item in function deleteSetItem()
7714         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
7715         moved from z80 to src subproject
7716
7717 2003-03-09  Borut Razem <borut.razem AT siol.net>
7718
7719         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
7720         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
7721         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
7722         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
7723         * src/SDCCglobl.h: unification of WIN32 native definitions
7724
7725 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7726
7727         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
7728
7729 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
7730
7731         * src/configure.in:   check for endianess (even while cross-compiling)
7732         * src/configure:      check for endianess (even while cross-compiling)
7733         * src/configure_in.h: check for endianess (even while cross-compiling)
7734         * src/avr/gen.c:        remove old endianess stuff
7735         * src/mcs51/gen.c:      remove old endianess stuff
7736         * src/ds390/gen.c:      remove old endianess stuff
7737         * src/pic/gen.c:        remove old endianess stuff
7738         * src/pic/genarith.c:   remove old endianess stuff
7739         * src/pic/glue.c:       fix endianess check
7740         * src/pic16/gen.c:      remove old endianess stuff
7741         * src/pic16/genarith.c: remove old endianess stuff
7742         * src/pic16/glue.c:     fix endianess check
7743         * src/xa51/gen.c:       remove old endianess stuff
7744         * src/z80/gen.c:        fix endianess check
7745         * src/SDCCglue.c:       fix endianess check
7746         * src/ds390/peeph.def: fix bug 700036
7747
7748 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
7749
7750         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
7751         * src/configure: find appropriate data-types on host for SDCC's int and long
7752         * src/configure.in: find appropriate data-types on host for SDCC's int and long
7753         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
7754         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
7755
7756 2003-03-07    <johan AT balder>
7757
7758         Just a big NOOP:
7759                 some minor cleanups before the big shot
7760                 OP_DEFS and OP_USES now use Kevin's protection
7761                 new option --nolabelopt
7762
7763         * src/SDCCBBlock.c:
7764         * src/SDCCast.c,:
7765         * src/SDCCcflow.c:
7766         * src/SDCCcse.c:
7767         * src/SDCCicode.c:
7768         * src/SDCCicode.h:
7769         * src/SDCClabel.c:
7770         * src/SDCCloop.c:
7771         * src/SDCCmain.c:
7772         * src/ds390/ralloc.c:
7773         * src/mcs51/ralloc.c:
7774         * src/pic/ralloc.c:
7775         * src/xa51/ralloc.c:
7776         * src/z80/ralloc.c:
7777
7778 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
7779
7780         * src/pic/pcode.c (get_op): fix 64 bit warnings
7781         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
7782         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
7783         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
7784         * support/regression/tests/malloc.c: fix 64 bit warnings
7785
7786 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
7787
7788         * src/mcs51/gen.c (genMinus): fixed bug 696436
7789
7790 2003-03-02  Borut Razem <borut.razem AT siol.net>
7791
7792         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
7793
7794 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
7795
7796         * configure.in: test for mkstemp
7797         * sdccconf_in.h: add HAVE_MKSTEMP
7798
7799 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
7800
7801         * device/include/ctype.h: removed warning while using --stack-auto
7802         * device/include/malloc.h: removed warning while using --stack-auto
7803         * device/include/string.h: removed warning while using --stack-auto
7804
7805 2003-02-23  Borut Razem <borut.razem AT siol.net>
7806
7807         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
7808         because NDEBUG is defined (see man assert)
7809         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
7810
7811 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7812
7813         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
7814         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
7815
7816 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7817
7818         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
7819         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
7820
7821 2003-02-18    <johan AT balder>
7822
7823         * as/mcs51/asmain.c (asmbl): module can start with a digit
7824         * as/z80/asmain.c (asmbl): module can start with a digit
7825
7826 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
7827
7828         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
7829         * src/asm.c: fix pipe() for Mingw32
7830
7831 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
7832
7833         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
7834         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
7835         make -V work again; --c1mode reads now from stdin
7836         * doc/sdccman.lyx: added --c1mode
7837         * support/Util/SDCCerr.c: new messages for c1 mode
7838         * support/Util/SDCCerr.h: new messages for c1 mode
7839         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
7840
7841 2003-02-15    <johan AT balder>
7842
7843         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
7844
7845 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
7846
7847         * doc/sdccman.lyx: Environment variables, -o and other minor things
7848
7849 2003-02-14    <johan AT balder>
7850
7851         * src/xa51/main.c: before anyone really tries to use it :)
7852
7853         * Install doc's in share/sdcc/doc
7854         * removed some obsolete files
7855         * Do a proper make distclean and uninstall
7856         M Makefile.common.in
7857         R sdccbuild.sh
7858         M as/Makefile
7859         M device/include/Makefile.in
7860         M device/lib/Makefile.in
7861         M doc/sdccman.lyx
7862         M link/Makefile
7863         M sim/ucsim/doc/Makefile.in
7864         M src/clean.mk
7865         R src/avr/peeph.rul
7866         R src/xa51/peeph.rul
7867         M support/cpp2/Makefile.in
7868         M support/makebin/Makefile
7869
7870
7871 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
7872
7873         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
7874
7875 2003-02-10  Borut Razem <borut.razem AT siol.net>
7876
7877         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
7878         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
7879         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
7880         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
7881         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
7882         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
7883         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
7884         src/z80/Makefile.bcc: Borland Makefile cleanup
7885         * as/z80/Makefile.bcc: Added Borland Makefile
7886         * support/cpp2/borland.h: Removed
7887
7888 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
7889
7890         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
7891         * src/SDCC.lex: new pragma NOIV
7892         * src/SDCCglobl.h: new pragma NOIV
7893         * src/SDCCmem.c: new pragma NOIV
7894
7895 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
7896
7897         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
7898
7899 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
7900
7901         * src/SDCCmain.c: signal handling is switched off by --debug
7902         * doc/Makefile: small fix for install; use clean.mk again
7903         * doc/clean.mk: clean *.pdf and *.html too
7904
7905 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
7906
7907         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
7908         * device/lib/printfl.c: fix a ds390 bug by making it portable
7909         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
7910         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
7911         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
7912         * debugger/mcs51/cmd.c: converted multi-line string literals
7913         * sim/ucsim/globals.cc: converted multi-line string literals
7914         * src/SDCCmain.c: introduced signal handler to remove temp files
7915         * doc/Makefile: small tweaks, implement clean
7916         * doc: removed generated files
7917
7918 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7919
7920         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
7921         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
7922         Address Record is not correctly generated for DS390."
7923
7924 2003-02-02  Borut Razem <borut.razem AT siol.net>
7925
7926         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
7927         * as/mcs51/asm.h: fixed compilation with Borland C
7928         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
7929         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
7930         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
7931         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
7932         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
7933         src/z80/Makefile.bcc: delete $(LIB) only if exist
7934         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
7935
7936 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
7937
7938         * device/include/malloc.h: introduced NULL
7939         * device/include/string.h: introduced NULL
7940         * device/include/stdlib.h: introduced NULL
7941         * device/lib/_memcpy.c: removed NULL
7942         * device/lib/_strcat.c: removed NULL
7943         * device/lib/_strchr.c: removed NULL
7944         * device/lib/_strcmp.c: removed NULL
7945         * device/lib/_strcpy.c: removed NULL
7946         * device/lib/_strcspn.c: removed NULL
7947         * device/lib/_strlen.c: removed NULL
7948         * device/lib/_strncat.c: removed NULL
7949         * device/lib/_strncmp.c: removed NULL
7950         * device/lib/_strncpy.c: removed NULL
7951         * device/lib/_strpbrk.c: removed NULL
7952         * device/lib/_strrchr.c: removed NULL
7953         * device/lib/_strspn.c: removed NULL
7954         * device/lib/_strstr.c: removed NULL
7955         * device/lib/_strtok.c: removed NULL
7956         * device/lib/malloc.c: removed NULL, include own header
7957
7958 2003-02-02    <johan AT balder>
7959
7960         * 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
7961         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
7962         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
7963         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
7964         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
7965         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
7966
7967 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7968
7969         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
7970         area 'DATA'"
7971
7972 2003-02-01    <johan AT balder>
7973
7974         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
7975
7976 2003-01-31    <johan AT CP255758-A>
7977
7978         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
7979
7980 2003-01-30    <johan AT balder>
7981
7982         * src/SDCCBBlock.c: automatic bug detection
7983         * src/SDCCicode.c: automatic bug detection
7984
7985 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7986
7987         * src/SDCCglobl.h:   now --xram-size 0 works
7988         * src/SDCCmain.c:    now --xram-size 0 works
7989
7990 2003-01-29    <johan AT balder>
7991
7992         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
7993
7994 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7995
7996         * as/mcs51/aslink.h: Added options --xram-size and --code-size
7997         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
7998         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
7999         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
8000         * src/SDCCglobl.h:   Added options --xram-size and --code-size
8001         * src/SDCCmain.c:    Added options --xram-size and --code-size
8002
8003 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
8004
8005         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
8006         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
8007
8008 2003-01-27    <johan AT balder>
8009
8010         * src/SDCC.y: fixed bug #613764
8011
8012 2003-01-26    <johan AT balder>
8013
8014         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
8015         * src/SDCCsymt.h: fixed bug #673374
8016         * src/SDCCglue.c: fixed bug #661910
8017         * src/SDCCast.c: fixed bug #458099 and 673374
8018
8019 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
8020
8021         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
8022         * as/mcs51/strcmpi.h: added
8023         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
8024         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
8025         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
8026         * as/mcs51/assym.c: strcmpi -> as_strcmpi
8027         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
8028         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
8029         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
8030         * as/mcs51/Makefile.aslink: new module strcmpi
8031         * as/mcs51/Makefile.asx8051: new module strcmpi
8032         * as/mcs51/Makefil.bcc: new module strcmpi
8033         * as/mcs51/Makefile.in: new module strcmpi
8034         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
8035
8036 2003-01-26    <johan AT balder>
8037
8038         * src/SDCCglue.c: reverted back to 1.124
8039         * src/SDCCast.c: reverted back to 1.156
8040         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
8041
8042 2003-01-25    <johan AT balder>
8043
8044         * src/SDCCglue.c: A better fix for bug #661910
8045         * src/SDCCast.c: A better fix for bug #661910
8046         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
8047
8048 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8049
8050         * src/Makefile.in: remove spawn.o
8051         * src/SDCCmain.c: remove spawn.h
8052         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
8053         * src/spawn.c: removed
8054         * src/spawn.h: removed
8055         * support/regression/ports/ds390/spec.mk: link with -r
8056
8057 2003-01-24    <johan AT CP255758-A>
8058
8059         * src/ds390/gen.c (aopOp): fixed bug #667458
8060         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
8061         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
8062         (createIvalCharPtr): an ival doesn't always have a storage class anymore
8063
8064 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8065
8066         * src/mcs51/peeph.def: better assembler identation by Frieder
8067         * src/mcs51/gen.c: better assembler identation by Frieder
8068
8069 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
8070
8071         * as/z80/string.h: removed for gcc 3.2
8072         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
8073         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
8074
8075 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8076
8077         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
8078         * src/SDCCpeeph.c (replaceRule): fix bug #663503
8079         * support/regression/Makefile: separate temp files for ports
8080         * support/regression/generate-cases.py: separate temp files for ports
8081         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8082         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8083
8084 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8085
8086         * moved tinitalk to device/examples/ds390
8087
8088 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
8089
8090         * as/mcs51/lkmem.c: rflag is for DS390
8091         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
8092         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
8093                          (linkEdit): move mem- and map-files the same way as ihx-files
8094         * src/z80/main.c (_setDefaultOptions): removed --generic
8095         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
8096         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
8097         * src/pic/glue.c (picglue): --c1mode works again
8098         * src/pic16/glue.c (pic16glue): --c1mode works again
8099         * src/asm.c (printCLine): fix #660034
8100
8101 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
8102
8103         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
8104         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
8105         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
8106         * as/mcs51/lkmem (summary): better fix for sp problem
8107         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
8108         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
8109         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
8110                                               remove --stack-after-data
8111
8112 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
8113
8114         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
8115         * src/SDCCutil.c (join): ugly bug: missing '\0'
8116         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
8117
8118 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8119
8120         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
8121         * src/port.h: typo
8122         * src/pic/main.c (_asmCmd): gpasm supports -o
8123         * src/z80/main.c: more general macros
8124         * device/lib/Makefile.in: remove intermediate files
8125
8126 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8127
8128         * .version: Bumped version number to 2.3.3
8129         * src/SDCCBBlock.c: new option -o
8130         * src/SDCCglobl.h: new option -o
8131         * src/SDCCglue.c: new option -o
8132         * src/SDCCmain.c: new option -o
8133         * src/asm.c: new option -o
8134         * src/ds390/main.c: new option -o
8135         * src/pic/glue.c: new option -o
8136         * src/pic/pcode.c: new option -o
8137         * src/pic/ralloc.c: new option -o
8138         * src/pic16/glue.c: new option -o
8139         * src/pic16/pcode.c: new option -o
8140         * src/pic16/ralloc.c: new option -o
8141         * src/z80/main.c: new option -o
8142         * device/lib/Makefile.in: use -o
8143         * support/regression/ports/ds390/spec.mk: use -o
8144         * support/regression/ports/gbz80/spec.mk: use -o
8145         * support/regression/ports/mcs51/spec.mk: use -o
8146         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
8147         * support/regression/ports/z80/spec.mk: use -o
8148         * support/regression/ports/ucz80/spec.mk: use -o
8149         * support/regression/ports/xa51/spec.mk: use -o
8150         * support/regression/fwk/lib/timeout.c: fix usage string
8151
8152 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
8153         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
8154
8155 2003-01-07    <johan AT balder>
8156
8157         * src/SDCCast.c (decorateType): fixed bug #600035
8158
8159 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
8160         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
8161         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
8162         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
8163         * src/pic/pcode.c: outcommented unused variable to remove warnings
8164         * src/pic/ralloc.c: outcommented unused variable to remove warnings
8165
8166 2003-01-06    <karl AT turbobit.com>
8167         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
8168    regression tests.
8169
8170 2003-01-06    <johan AT balder>
8171
8172         * src/SDCCicode.c: fixed array add
8173
8174 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
8175         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
8176         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
8177
8178 2003-01-04    <johan AT balder>
8179
8180         * src/SDCCval.c (getNelements): fixed the initialized array of structures
8181
8182 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8183         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
8184
8185 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8186         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
8187         * support/regression/tests/bug-524697.c: fit mem usage into 8032
8188
8189 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8190         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
8191
8192 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
8193         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
8194
8195 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
8196         * src/mcs51/main.c: removed {bindir}{sep} from aslink
8197
8198 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8199
8200     * in \sdcc\as\mcs51\ changed these files in order to create an
8201     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
8202     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
8203     following files to include the previous two files: aslink.dsp,
8204     Makefile.aslink, Makefile.bcc, and Makefile.in.
8205
8206     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
8207     .adb instead of .cdb
8208
8209 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8210
8211         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
8212         value from option --iram-size.
8213
8214 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8215
8216         * \sdcc\as\mcs51\lklist.c: added boundary check before using
8217         dram[] array.
8218
8219 2002-09-18    <wiml AT hhhh.org>
8220
8221         * SDCClrange.h: exposed setFromRange() and setToRange()
8222         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
8223           packRegsForAccUse() (bug 542397)
8224         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
8225           multiple times and emitting the fetch operations more than once
8226           added aopGetUsesAcc() function to allow binary operators to
8227           fetch their operands in the correct order; made genMinus() emit
8228           compact code for X = LITERAL - Y
8229
8230 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8231         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
8232         sprintf() in line 1267.
8233
8234 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8235         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
8236         like ports.
8237
8238 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8239         Changes to aslink (All the changes are marked with 'JCF'):
8240
8241         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
8242         summary().
8243
8244         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
8245         area BSEG.  Also moves, if possible, the DATA area down into the internal
8246         ram so more space is available.
8247
8248         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
8249         sflag.
8250
8251         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
8252         not bytes.  Function summary() which creates a memory usage summary
8253         file with extension .mem.  Reports of overlaping stack and small stack
8254         size.  If the space for the stack is less than 16 bytes aslink trows a
8255         warning.
8256
8257         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
8258         the 8051.  Option 'y' for memory summary output file.
8259
8260         Changes to sdcc (All the changes are marked with 'JCF'):
8261
8262         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
8263
8264         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
8265         overlaying area for it (uses RegBankUsed[4]).
8266
8267         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
8268         bank zero as used by default.  By default aslink locates the stack
8269         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
8270         the creation of the .mem file.  Delegates the allocation of data area
8271         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
8272         the begining of the stack area to aslink.
8273
8274         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
8275         glue() in SDCCglue.c creates an area for it.
8276
8277 2002-09-03  Borut Razem <borut.razem AT siol.net>
8278         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
8279         sdcc/src/pic/glue.c:
8280         introduced atexit() handler for teporay files removal in case of
8281         errors, assertions, ...
8282
8283 2002-08-29  Borut Razem <borut.razem AT siol.net>
8284         * sdcc/support/cpp2/auto-host_vc_in.h:
8285         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
8286         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
8287         Maybe there is a similar problem with BORLANDC? It should be checked!
8288
8289         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
8290         corrected improper use of assert: the assignment to clr variable was done inside the assert.
8291         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
8292         was not executed, and the compiler (cl) launched a warning:
8293         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
8294
8295 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8296         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
8297
8298 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
8299         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
8300
8301         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8302           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
8303           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
8304           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8305           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
8306           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
8307           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
8308         - added Release configuration in VS projects
8309         - review of compiler an linker options
8310         - VC .exe files are generated in bin_vc directory, not to interfere
8311           with binaries generated from other projects (cygwin, mingw, bcc ...)
8312
8313         * sdcc/src/yacc.dsp: added
8314
8315         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
8316         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
8317         and insert the version number definitions from .version
8318
8319         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
8320
8321         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
8322         added - genarate auto-host.h using auto-host_vc_in.h as template
8323
8324         * sdcc/sdcc_vc.h,
8325         removed from CVS, generated automatically
8326
8327 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
8328         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
8329
8330 2002-08-11  Borut Razem <borut.razem AT siol.net>
8331         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
8332
8333 2002-08-10  Borut Razem <borut.razem AT siol.net>
8334         * src/SDCCmain.c (main):
8335         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
8336         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
8337         The consequence was that some temporary files were not removed.
8338
8339         * src/SDCCglue.c:
8340         unification of code in functions tempfilename() and tempfile():
8341         function tempnam() is defined in Visual Studio 6.0 and .NET
8342
8343         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
8344
8345         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8346           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
8347         - removed compiler command line option /WX: Treats all warnings as errors
8348         - update a list of source files, included into the project
8349
8350         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8351           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
8352         changed project type to Generic Project so that can be correcly converted to VS.NET project
8353
8354         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
8355
8356         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
8357
8358         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
8359
8360         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
8361         added return 0 statements after assert() to make compiler happy
8362
8363         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
8364         added newline in the def file to keep MSC compiler satisfied
8365
8366         * sdcc/src/z80/gen.c:
8367         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
8368           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
8369         - solved MSC error in function aopDump()
8370
8371         * sdcc_vc.h: define PREFIX as "\\sdcc"
8372
8373 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
8374         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
8375
8376 2002-06-22  Scott Dattalo <scott AT dattalo.com>
8377         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
8378         - Rewrote the register banking algorithm.
8379         - Added pCode live-range analysis to registers (for now, only non-used and
8380         singly-used registers optimized away)
8381
8382         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
8383
8384         * 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.
8385
8386 2002-05-10  Scott Dattalo <scott AT dattalo.com>
8387         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
8388
8389 2002-04-22  Michael Hope  <michaelh AT vroom>
8390
8391         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
8392
8393         * configure.in (DD_COPT): Added include support required for gbdk.
8394
8395         * .version: Bumped version number just to increase it.
8396
8397         * src/SDCCmain.c: Added -nostdinc to the default options.
8398
8399 2002-04-15  Michael Hope  <michaelh AT vroom>
8400
8401         * device/lib/z80/printf.c (sprintf): Added.
8402
8403         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
8404
8405         * src/z80/peeph.def: Added transpose redundent load rule.
8406
8407         * src/z80/main.c: Added force callee saves for jaune.
8408
8409         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
8410
8411         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
8412
8413 2002-03-28  Johan Knol  <johan AT balder>
8414
8415         * src/SDCCval.c: fixed bug #532436
8416
8417 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8418         * /src/port.h:
8419         Added "char *Processor" field to the port structure.
8420
8421         * /src/SDCCmain.c:
8422         Added -p option. Allows port dependent processor to be specified.
8423
8424         * all ports:
8425         Initialized the new field char *Processor field to NULL in all ports
8426
8427         * /src/pic/*:
8428         Compiler generated registers for interrupt context saving
8429         were not getting allocated.
8430
8431 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
8432
8433         * /src/SDCCast.c:
8434         Fixed left shift. Will promote the left side of a left shift
8435         if a) left shifting more than size of operand or b) when assigned
8436         to something size > size of left side
8437
8438 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8439         * src/pic/*
8440         tons of changes. Register allocation has been
8441         rewritten. Added customization for the various PICs. Flow
8442         analysis is restructured. ...
8443
8444         * src/pic/device.h:
8445         Added
8446
8447         * src/pic/device.c:
8448         Added. device.c is a PIC port hack to accomodate variations
8449         in PIC devices.
8450
8451 2002-03-13  Michael Hope  <michaelh AT vroom>
8452
8453         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
8454
8455 2002-03-04  johanknol  <johanknol AT manik>
8456
8457         * /src/SDCCval.c: fixed
8458
8459         const unsigned char arr[][2] = { { 0, 1 } };
8460         t18.c:1: error: Initializer element is not constant
8461
8462 2002-03-04  bela  <bela AT manik>
8463
8464         * /device/include/mcs51reg.h:
8465         ds89c420 register definition update
8466
8467 2002-03-03    <johan AT FRIJA>
8468
8469         * support/Util/SDCCerr.c: did something, but don't no why anymore
8470
8471         * support/regression/tests/bug-524691.c: made it a little less shy
8472
8473         * src/SDCCast.c (decorateType): fixed bug #524697
8474
8475         * src/SDCCast.c: made some lineno improvements
8476
8477         * src/SDCCval.c (getNelements): changed warning to error
8478
8479         * src/SDCCglue.c (printIvalArray): changed warning to error
8480
8481         * src/SDCCicode.c: fixed a warning for mingw
8482
8483         * src/SDCCast.c (decorateType): fixed the << promotion for ops
8484
8485         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
8486
8487 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
8488
8489         * src/ds390/peeph.def:
8490         Added some more peephole rules
8491
8492         * src/ds390/gen.c: Various fixes & enhancements
8493
8494         * src/SDCClrange.c, src/SDCClrange.h:
8495         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
8496
8497         * src/ds390/ralloc.c:
8498         various fixes & enhancements (ds390) specific
8499
8500         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
8501         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
8502         from rallocs.
8503
8504         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
8505
8506 2002-03-02    <johan AT FRIJA>
8507
8508         * src/SDCCast.c (decorateType): fixed bug #524708
8509
8510         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
8511
8512         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
8513
8514 2002-03-01  Michael Hope  <michaelh AT vroom>
8515
8516         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
8517
8518         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
8519
8520 2002-03-01    <johan AT FRIJA>
8521
8522         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
8523
8524         * src/SDCCast.c (decorateType): fixed bug #524209
8525
8526         * src/SDCCval.c (valNot): fixed bug #524195
8527
8528 2002-02-26    <johan AT balder>
8529
8530         * src/xa51/gen.c: fixed a warning
8531
8532         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
8533
8534         * src/SDCCast.c (decorateType): fixed bug #522534
8535
8536 2002-02-23    <johan AT balder>
8537
8538         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
8539
8540 2002-02-22    <johan AT balder>
8541
8542         * src/SDCCast.c: fixed bug #514865
8543
8544         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
8545
8546 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
8547
8548         * sdcc/src/SDCCloop.c:
8549         Previous fix was not good. basic blocks that have "break" or "return" are
8550         not really partof a loop , but live ranges used in these blocks should
8551         be live thru the entire loop, so set partOfLoop but don't add them to
8552         loop region
8553
8554 2002-02-21    <johan AT FRIJA>
8555
8556         * src/SDCCcse.c: fixed bug #514308
8557
8558 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
8559
8560         * src/SDCCloop.c:
8561         Fixed BUG #519583. If a conditional block ended in a return/break
8562         statement inside a loop, it was not being considered part of the loop.
8563
8564         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
8565
8566 2002-02-10  Karl Bongers <karl AT turbobit.com>
8567
8568         * debugger/*:
8569         Fixed up SDCDB debugger somewhat.  Updated debugger/README
8570         with lots of comments and notes.
8571
8572         * device/examples/test2.c:
8573         Fix bug, "red" variable not being initialized(compiler complained).
8574
8575         * device/examples/Makefile, examples/test3.c:
8576         Add Makefile in device/examples folder, compiles test3.c
8577         for use as a multiple module SDCDB test case.
8578
8579         * sim/ucsim/cmd.src/cmdset.cc:
8580         Took out debug printfs in ucsim "next" command.
8581
8582         * sim/ucsim/xa.src:
8583         Karl and Johan start ucsim XA support.  Most dissassembly working,
8584         about 75% emulation done(plenty of work remaining).
8585
8586         * sim/ucsim/z80.src:
8587         Add Z80 support to ucsim, add test-ucz80 regression test,
8588         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
8589         Notice z80 compiler fails on examples/test3.c/crc code.
8590
8591 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
8592
8593         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
8594         Added support for --parms-in-bank1
8595
8596         * src/ds390/peeph.def:
8597         added a few more peephole optimzations
8598
8599         * src/ds390/main.c:
8600         1) added __builtin_inp & __builtin_outp used to read in data of given length
8601            from a memory mapped port
8602         2) added __builtin_memcmp
8603         3) added __builtin_swapw swap bytes of a short
8604
8605         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
8606         1) handle multiple send & receives from register bank1
8607         2) ralloc can now allocate DPTR1 to some liveRanges
8608
8609         * src/SDCCsymt.c, src/SDCCsymt.h:
8610         changes to handle multiple sends & receives
8611
8612         * src/SDCCptropt.h:
8613         added some pointer arithmetic optimization
8614
8615         * src/SDCCptropt.c:
8616         added some pointer arithmetic optimizations but not stable yet so not
8617         called from anywhere (will get this working shortly)
8618
8619         * src/SDCCopt.c: fixed for multiple sends & receives
8620
8621         * src/SDCCmain.c:
8622         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
8623         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
8624            set preprocessor defines (depending on options)
8625
8626         * src/SDCCicode.c, src/SDCCicode.h:
8627         changes made to handle multiple sends & receives
8628
8629         * src/SDCCglobl.h:
8630         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
8631
8632         * src/SDCCcse.c, src/SDCCcse.h:
8633         added function findbackward def (to be used in upcoming optimization)
8634
8635         * src/SDCCcflow.c, src/SDCCcflow.h:
8636         added function returnAtEnd - to determine if a basic block terminates with
8637         a RETURN iCode
8638
8639         * src/SDCCast.c, src/SDCCast.h:
8640         added option parms-in-bank1
8641
8642         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
8643         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
8644         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
8645         adjusted for --parms-in-bank1 option
8646
8647         * device/include/string.h:
8648         donot redefine "reentrant" keyword
8649
8650         * device/include/ds80c390.h: Added some more SFRs
8651
8652 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
8653
8654         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
8655
8656 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
8657
8658         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
8659
8660 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
8661
8662         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
8663
8664 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
8665
8666         * Added --xram-movc option
8667
8668 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
8669
8670         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
8671
8672 2002-01-11  Johan Knol
8673
8674         * Added math lib of Jesus Calvino-Fraga
8675
8676 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
8677
8678         * src/SDCCmain.c (processFile): fix processing of ../../src.c
8679         * support/regression/Makefile: new target test-mcs51-stack-auto
8680         * support/regression/ports/mcs51-stack-auto/spec.mk: added
8681
8682 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
8683
8684         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
8685
8686 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
8687
8688         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
8689
8690 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
8691
8692         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
8693
8694         * src/SDCCglue.h: add definition for printIvalChar()
8695
8696 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
8697
8698         * src/SDCCast.c: fix #498138 by Johan
8699
8700         * src/SDCCglue.c: fix #498138 by Johan
8701
8702 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
8703
8704         * support/regression/Makefile: fix clean
8705
8706         * support/regression/ports/ds390/support.c: fix transmission of last character
8707
8708 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
8709
8710         * /sdcc/src/ds390/gen.c:
8711         a) improved computing address of stack variable
8712         b) took out some #if 0 code
8713         c) improved parmBytes adjustment
8714         d) improved genPlusIncr & genMinusIncr
8715         e) genCmp could generate bad code (when left assigned to DPTR)
8716         f) Fixed bug in hasInc
8717
8718         * /sdcc/src/ds390/ralloc.c:
8719         a) packRegsForSupport could mess up live information (Fixed)
8720         b) packRegsDPTRuse could be incorrect for left & right shift
8721
8722         * /sdcc/src/mcs51/ralloc.c:
8723         packRegsForSupport could mess up the live information (Fixed)
8724
8725         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
8726
8727         * /sdcc/src/SDCCast.c:
8728         can reverse a loop even if function call is present as long
8729         as the loop control variable is local & is not passed as parameter
8730
8731 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8732
8733         * /sdcc/ChangeLog: *** empty log message ***
8734
8735         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
8736         More builtin function additions for TININative
8737
8738         * /sdcc/src/ds390/ralloc.c:
8739         Had broken the regression testsuite
8740
8741         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
8742
8743         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
8744         Added funcattr hasStackParms will be set for reentrant functions when there
8745         are paramteres on the stack, this helps in minimizing frame pointer generation
8746         typeFromStr can handle function pointers now
8747
8748         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
8749         *** empty log message ***
8750
8751 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8752
8753         * /src/ds390/gen.c, /src/ds390/main.c:
8754         More builtin function additions for TININative
8755
8756         * /src/ds390/ralloc.c:
8757         Had broken the regression testsuite
8758
8759         * /src/SDCCast.c: Fixed a bug in dumptree
8760
8761         * /src/SDCCsymt.c, /src/SDCCsymt.h:
8762         Added funcattr hasStackParms will be set for reentrant functions when there
8763         are paramteres on the stack, this helps in minimizing frame pointer generation
8764         typeFromStr can handle function pointers now
8765
8766         * /doc/builtins.txt, /doc/TININative.txt:
8767         *** empty log message ***
8768
8769
8770 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8771
8772         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
8773         ALPHA version for -mTININative
8774
8775         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
8776         updated to reflect changes in the port structure
8777
8778         * /src/port.h:
8779         added function do_assemble (similar to do_link) if non-null this function
8780         will be called to do assembly (-mTININative) requires a multi command
8781         assembly
8782         added function genAssemblerEnd will be called to generate assembler Epilogue
8783
8784         * /src/SDCCsymt.c:
8785         added _JavaNative to debug info printing
8786
8787         * /src/SDCCmain.c: added option --tini-libid
8788         added port->do_assemble function (-mTININative) has a multi command assemble
8789
8790         * /src/SDCCglue.c: Disabled "constExpr" check
8791         added port->genAssemblerEnd function
8792
8793         * /src/SDCCglobl.h: Added option --tini-libid value
8794
8795         * /src/SDCCast.h:
8796         tookout optimizeCompare from the header (has no external references)
8797
8798         * /src/SDCCast.c: made one more function "static"
8799
8800 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
8801
8802         * src/z80/mappings.i: Added z80asm support.
8803
8804         * src/z80/main.c: Added z80asm support on --asm=z80asm
8805
8806         * src/z80/gen.c: Fixed asm portability issues.
8807
8808         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
8809
8810         * src/SDCCglue.c (printExterns): Added global/extern split.
8811
8812 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
8813
8814         * support/regression/Makefile: added test for mcs51 model large
8815
8816         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
8817
8818         * support/regression/ports/gbz80/spec.mk: added -mgbz80
8819
8820 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
8821
8822         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
8823
8824 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
8825
8826         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
8827
8828         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
8829
8830 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
8831
8832         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
8833
8834         * support/regression/tests/simplefloat.c: Port to mcs51.
8835
8836 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
8837         * support/regression/tests/bug-485362.c: Added.
8838
8839         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
8840
8841         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
8842
8843         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
8844
8845         * src/z80/gen.c (aopDump): Added a dump function.
8846
8847 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
8848         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
8849
8850         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
8851
8852         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
8853
8854         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
8855
8856         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
8857
8858         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
8859
8860         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
8861
8862         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
8863
8864         * support/regression/ports/ds390/support.c: Use tinibios.
8865
8866         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
8867
8868 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
8869
8870         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
8871         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
8872
8873         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
8874
8875         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
8876
8877 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
8878
8879         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
8880
8881         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
8882         (packRegsForIYUse): Created and optimised.
8883
8884 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
8885
8886         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
8887 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
8888
8889         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
8890
8891         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
8892
8893         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
8894
8895 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
8896
8897         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
8898
8899         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
8900
8901 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
8902
8903         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
8904
8905         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
8906
8907         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
8908
8909 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
8910
8911         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
8912         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
8913         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
8914
8915         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
8916
8917         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
8918         (genNotFloat): Added.
8919         (genUminusFloat): Added.
8920
8921         * device/lib/z80/Makefile: Added floating pt stubs.
8922
8923         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
8924
8925         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
8926
8927         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
8928
8929 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
8930
8931         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
8932
8933         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
8934
8935         * sdcc/support/regression/Makefile: Add port ds390.
8936
8937         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
8938
8939         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
8940
8941         * sdcc/support/regression/ports/ds390/spec.mk: Added.
8942
8943         * sdcc/support/regression/ports/ds390/support.c: Added.
8944
8945         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
8946
8947         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
8948
8949         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
8950
8951 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
8952
8953         * device/include/malloc.h: Added z80 and gbz80 support.
8954
8955         * device/lib/gbz80/heap.s: Added.
8956
8957         * device/lib/z80/heap.s: Added.
8958
8959         * device/lib/malloc.c: Added z80 and gbz80 support.
8960
8961         * support/regression/tests/malloc.c (testMalloc): Added.
8962
8963         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
8964
8965         * support/regression/tests/bug-478094.c: Added.
8966
8967         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
8968
8969 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
8970
8971         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
8972
8973         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
8974
8975         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
8976
8977         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
8978
8979         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
8980
8981 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
8982
8983         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
8984
8985 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
8986
8987         * support/regression/tests/bug-477927.c: Added.
8988
8989         * src/z80/peeph.def: Added minor rules.
8990
8991         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
8992
8993         * src/z80/peeph.def: Added jump optimisation modification.
8994
8995 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
8996
8997         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
8998
8999 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
9000
9001         * support/regression/tests/funptrs.c: Added.
9002
9003 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
9004
9005         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
9006
9007 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
9008
9009         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
9010
9011         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
9012
9013         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
9014         (movLeft2ResultLong): Created.
9015
9016         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
9017         (joinPushes): Added.  Joins two char pushes into a word push.
9018
9019 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
9020
9021         * support/cpp2/Makefile.in (install): Added creation of dest dir.
9022
9023         * support/makebin/Makefile (install): Added creation of dest dir.
9024
9025 2001-10-24 Karl Bongers <karl AT turbobit.com>
9026
9027         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
9028
9029 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
9030
9031         * src/z80/ralloc.c: Turned off faulty pack for one use.
9032
9033         * src/z80/peeph-gbz80.def: Removed redundent restart options.
9034
9035         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
9036
9037 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
9038
9039         * support/regression/Makefile: Improved clean
9040
9041         * support/regression/ports/gbz80/spec.mk: Added clean
9042
9043         * support/regression/ports/host/spec.mk: Added clean
9044
9045         * support/regression/ports/z80/spec.mk: Added clean
9046
9047         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
9048
9049         * support/regression/ports/mcs51/timeout.c: little improvements
9050
9051 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
9052
9053         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
9054
9055         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
9056
9057         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
9058
9059 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
9060
9061         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
9062
9063         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
9064
9065 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
9066         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
9067
9068         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
9069
9070         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
9071
9072         * src/mcs51/main.c (_linkCmd): Added bin path to command.
9073
9074         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
9075
9076         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
9077
9078         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
9079
9080         * support/regression/tests/longor.c: Added.
9081
9082 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
9083
9084         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
9085
9086         * as/mcs51/aslink.h: define PATH_MAX
9087
9088         * as/mcs51/asm.h: define PATH_MAX
9089
9090         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
9091
9092         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
9093
9094         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
9095
9096         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
9097
9098         * src/SDCCglobl.h: define PATH_MAX
9099
9100         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
9101
9102         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
9103
9104 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
9105
9106         * src/z80/gen.c (gencjneshort): Fixed
9107
9108         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
9109
9110 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
9111
9112         * support/regression/tests/bug-469671.c: Added.
9113
9114         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
9115
9116 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
9117
9118         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
9119
9120         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
9121
9122 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
9123
9124         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
9125
9126         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
9127
9128         * src/device/lib/_mullong.c : removed hint: nooverlay bug
9129
9130         * src/device/lib/_divuint.c : removed hint: nooverlay bug
9131
9132         * src/device/lib/_divulong.c: removed hint: nooverlay bug
9133
9134         * src/device/lib/_moduint.c : removed hint: nooverlay bug
9135
9136         * src/device/lib/_modulong.c: removed hint: nooverlay bug
9137
9138 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
9139
9140         * 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.
9141
9142         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
9143
9144         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
9145
9146 2001-10-07    <johan AT FRIJA>
9147
9148         * device/lib/gets.c (gets): fixed the return value.
9149
9150 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
9151         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
9152
9153         * 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.
9154
9155         * 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.
9156
9157         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
9158
9159         * src/pic/gen.c: Removed Safe_strdup.
9160
9161         * configure.in: Added option to enable libgc support.
9162
9163         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
9164         (bitVectUnion): Optimised.
9165         (bitVectIntersect): Optimised.
9166         (bitVectBitsInCommon): Optimised.
9167         (bitVectCplAnd): Optimised.
9168
9169         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
9170
9171 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9172
9173         * src/SDCCmain.c: distinguish between assembler debug and plain options
9174
9175         * src/avr/main.c:   remove standard assembler options
9176
9177         * src/ds390/main.c: remove standard assembler options
9178
9179         * src/mcs51/main.c: remove standard assembler options
9180
9181         * src/port.h: removed "PENDING" comment
9182
9183 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9184
9185         * src/device/lib/_mulint.c  : new, with assember functions
9186
9187         * src/device/lib/_mullong.c : new, with assember functions
9188
9189         * src/device/lib/_divuint.c : with assember functions
9190
9191         * src/device/lib/_divsint.c : with assember functions
9192
9193         * src/device/lib/_divulong.c: with assember functions
9194
9195         * src/device/lib/_divslong.c: with assember functions
9196
9197         * src/device/lib/_moduint.c : with assember functions
9198
9199         * src/device/lib/_modsint.c : with assember functions
9200
9201         * src/device/lib/_modulong.c: with assember functions
9202
9203         * src/device/lib/_modslong.c: with assember functions
9204
9205         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
9206
9207         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
9208
9209         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
9210                                       replaced _mululong.c and _mulslong.c by _mullong.c
9211
9212 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9213
9214         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
9215
9216 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9217
9218         * src/SDCCglue.c: test, if win32api is available for MINGW
9219
9220 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9221
9222         * src/SDCCsymt.c: no more _modifier in printTypeChain()
9223         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
9224         * support/regression/ports/gbz80/spec.mk: removed GENERIC
9225         * support/regression/ports/host/spec.mk: removed GENERIC
9226         * support/regression/ports/mcs51/spec.mk: removed GENERIC
9227         * support/regression/ports/z80/spec.mk: removed GENERIC
9228
9229 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
9230
9231         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
9232
9233         * support/regression/tests/bug-467035.c: Created.
9234
9235 2001-10-01    <johan AT FRIJA>
9236
9237         * src/SDCC.y: fixed bug #466586 part 1
9238
9239 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
9240
9241         * SDCCicode.c: z80 has no generic pointers
9242         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
9243
9244 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
9245
9246         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
9247
9248 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
9249
9250         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
9251
9252         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
9253
9254 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
9255
9256         * configure.in: Fixed up so that ucsim is only configured once.
9257
9258         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
9259
9260         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
9261         (getPathDifference): As above.
9262
9263         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
9264
9265         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
9266
9267 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
9268         * .version: Updated to 2.3.1
9269
9270         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
9271         Added copyright header.
9272
9273         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
9274         (assemble): Added support for macro based assembler commands.
9275         (linkEdit): Added support for macro based linker commands.
9276         (preProcess): Changed the pre-processor to use macros.
9277         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
9278         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
9279
9280         * device/lib/z80/crt0.s: Added module name for debugging.
9281
9282 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
9283
9284         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9285
9286         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
9287
9288         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
9289
9290         * src/Makefile.in: Added SDCCmacro and SDCCutil
9291
9292 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
9293
9294         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9295
9296 2001-09-16    <johan AT FRIJA>
9297
9298         * 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.
9299
9300 2001-09-15    <johan AT FRIJA>
9301
9302         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
9303         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
9304
9305 2001-09-11    <johan AT FRIJA>
9306
9307         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
9308
9309 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
9310
9311         * support/regression/tests/bug-460444.c: Added test case.
9312
9313         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
9314         (genCast): Added justification for all of the asserts.
9315
9316 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
9317
9318         * support/regression/support.c: _xdata replaced by xdata
9319
9320         * support/regression/spec.mk: removed _generic
9321
9322 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
9323
9324         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
9325
9326         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
9327         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
9328
9329         * src/z80/peeph.def: Added a rule to optimise shift then compare.
9330
9331         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
9332
9333         * support/regression/tests/bug-460010.c: Added test case.
9334
9335         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
9336
9337 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
9338
9339         * support/regression/Makefile: inter-port-clean adjusted for mcs51
9340
9341         * support/regression/testfwk.c: removed workaround for bug #436344
9342
9343         * support/regression/tests/bp.c: use less memory with mcs51
9344
9345         * support/regression/tests/bug-441448.c: use less memory
9346
9347         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
9348
9349         * support/regression/collate-results.py: typo
9350
9351 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
9352
9353         * support/regression/tests/fetchoverlap.c: Added new test case.
9354
9355         * support/regression/tests/bp.c: Added new test case.
9356
9357         * support/regression/tests/bug-448984.c: Added new test case.
9358
9359         * support/regression/tests/pow2shifts.c: Added new test case.
9360
9361         * src/z80/gen.c: Turned off the noise it normally generates for the release.
9362         (genlshTwo): Fixed right shift for count > 8.
9363
9364         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
9365
9366 2001-09-08    <johan AT FRIJA>
9367
9368         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
9369
9370 2001-09-07    <johan AT FRIJA>
9371
9372         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
9373
9374         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
9375
9376 2001-09-06    <johan AT FRIJA>
9377
9378         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
9379         * bernhard noted me at this: "() equals to (void)" (1.38)
9380
9381 2001-09-05    <johan AT FRIJA>
9382
9383         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
9384
9385 2001-09-04    <johan AT FRIJA>
9386
9387         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
9388
9389
9390 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
9391
9392         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
9393
9394 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
9395
9396         * link/z80/aslink.h: Fixed path for PATH_MAX
9397
9398 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
9399
9400         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
9401
9402         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
9403
9404         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
9405
9406         * 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.
9407
9408 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
9409
9410         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
9411         (genCmp): Fixed up genCmp for the GB with longs.
9412
9413         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
9414
9415         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
9416
9417         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
9418
9419         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
9420
9421 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
9422
9423         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
9424
9425 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
9426
9427         * 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.
9428
9429         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
9430
9431 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
9432
9433         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
9434
9435         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
9436
9437 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
9438
9439   * sim/ucsim/configure:    little improvement of Cygwin-detection
9440   * sim/ucsim/configure.in: little improvement of Cygwin-detection
9441   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
9442   * support/regression/tests/bug-221100.c: small changes for mcs51
9443   * support/regression/tests/bug-221168.c: small changes for mcs51
9444   * support/regression/tests/bug-227710.c: small changes for mcs51
9445   * support/regression/tests/staticinit.c: small changes for mcs51
9446   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
9447   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9448   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9449
9450 $Revision$