slightly shorter
[fw/sdcc] / ChangeLog
1 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
2
3         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
4           David Saxton with quotes around file name.
5
6 2005-08-15 Borut Razem <borut.razem AT siol.net>
7
8         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
9           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
10           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
11           make tests run on x86_64 platform
12
13 2005-08-13 Raphael Neider <rneider AT web.de>
14
15         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
16           as it might be executed DURING a build (parallel make is wonderful)
17
18 2005-08-13 Raphael Neider <rneider AT web.de>
19
20         * device/lib/Makefile.in (port-specific-objects-pic16):
21           revert to cp $(PORT)/bin/*.* $(PORTDIR)
22         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
23           dependency
24         * device/lib/pic16/Makefile.rules: build subdirs before creating
25           the library, removed builddir rule, create $(builddir) early in
26           recurse rule, use empty recurse rule for leaf directories
27         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
28           mkdir errors (race condition), removed duplicate suffix "hex"
29           from clean rules
30         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
31         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
32           prevents mkdir -p from aborting on Alpha
33         
34 2005-08-12 Raphael Neider <rneider AT web.de>
35
36         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
37           db-statements in order to allow for arrays of pointers in code
38           sections to be placed without interspersed 0-padding, fixes
39           bug #1256215
40         * (emitStatistics): fixed division by zero for pic18f1220
41         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
42           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
43         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
44         * (pic16_pCodeConstString): keep track of already emitted string
45           literals to prevent "duplicate definitions of symbol _str_NR"
46         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
47           debug message
48         * device/lib/Makefile.in: ignore failing PIC16 library builds
49         * device/lib/pic16/Makefile: do not build if gputils are missing
50         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
51
52 2005-08-10 Raphael Neider <rneider AT web.de>
53
54         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
55           my last commit)
56
57 2005-08-10 Raphael Neider <rneider AT web.de>
58
59         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
60           Rokas' patch to add the new fixed point type "__fixed16x16"
61         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
62           functions for __fixed16x16 arithmetics
63         * device/lib/pic16: reimplemented the build system to support
64           a separate build directory, better handling of libio (create
65           the library in a separate subdir for each architecture) and
66           easier configuration (centralized in Makefile.common)
67
68 2005-08-07 Raphael Neider <rneider AT web.de>
69
70         * src/pic16/gen.c (genrshTwo): fixed sign extension
71         * src/pic16/device.c: added pic18f2320, 4220 and 4320
72         * device/include/pic16/pic18f2220.h: changed some bit definitions,
73           added T0CONbits
74         * device/include/pic16/pic18f4220.h: NEW, header for
75           pic18f4220 and pic18f4320
76         * device/include/pic16/pic18fregs.h: added new devices,
77           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
78         * device/include/pic16/signal.h: resolved name clashes
79           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
80           to also allow testing for interrupt enable bits, added
81           comments on how to use the macros
82         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
83         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
84           register definitions for the devices
85         * device/lib/pic16/pics.all: added new devices
86         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
87           allocated memory
88         * device/lib/pic16/libc/stdlib/memfree: do not count
89           the block header as free memory
90         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
91           simplified and added missing end-of-blocklist-marker
92           (reported by Peter Onion, fixes #1252814)
93         * (_mergeHeapBlock): fixed loop condition
94         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
95           len==0, restructured code
96         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
97           up a bit, reduced bitfield accesses, prevent endless loops
98           in case of heap corruption
99         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
100           "unreferenced arguments/must return a value" warnings
101         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
102           replaced BAUDREG with SPBRG
103         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
104           device/lib/pic16/debug/gstack/gstack.c: replaced
105           _naked, _asm, _endasm with __naked, __asm, __endasm
106
107 2005-08-05 Raphael Neider <rneider AT web.de>
108
109         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
110           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
111
112 2005-08-05 Borut Razem <borut.razem AT siol.net>
113
114         * device/lib/Makefile.in: added missing ';'
115         * configure: removed ^M characters
116
117 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
118
119         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
120           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
121           License
122
123 2005-08-04 Borut Razem <borut.razem AT siol.net>
124
125         * configure.in: pic16 libraries build 2nd try - enable running
126           configure in device/lib/pic16
127         * configure: regenerated from configure.in
128         * device/lib/Makefile.in: create $(PORT)/bin directory
129
130 2005-08-03 Raphael Neider <rneider AT web.de>
131
132         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
133           to get/set values via pointers
134         * (genUnpackBits,genPackBits): changed detection of
135           ptr->bitfield vs. sym.bitfield, fixed access via generic
136           pointers, removed dead (wrong) code for multibyte bitfields
137         * (genNearPointerGet, genGenPointerGet): removed useless code,
138           fixed bitfield detection, fixes #1250594
139         * (genNearPointerSet): removed useless code
140         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
141           and introduced macro pic16_emitpcode that conditionally emits
142           the origin of the following pCode (useful for debugging SDCC)
143         * src/pic16/pcode.c: changed (and disabled) some debug outputs
144         * (createDefmap): fixed handling of LFSR for --optimize-df
145
146 2005-08-02 Borut Razem <borut.razem AT siol.net>
147
148         * device/lib/Makefile.in: pic16 libraries build enabled since
149           gputils-0.13.2 are now localy installed at sourceforge's compile farm
150
151 2005-08-02 Raphael Neider <rneider AT web.de>
152
153         * src/pic16/gen.c (genPackBits): removed deprecated warning
154         * (genGenPointerSet): fixed bitfield detection
155
156 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
157
158         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
159
160 2005-07-31 Raphael Neider <rneider AT web.de>
161
162         * device/lib/pic16/libdev/pic18f458.c,
163           device/include/pic16/pic18f458.h: added missing T0CONbits
164
165 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
166
167         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
168
169 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
170
171         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
172
173 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
174
175         * device/include/mcs51/at89c51ed2.h: added.
176
177 2005-07-23 Raphael Neider <rneider AT web.de>
178
179         * src/pic/gen.h: added emitpcode macro for debugging
180         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
181           and replace by macro adding debug information on demand
182         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
183         * (gencjne): tried to fix; replaced with correct (slower) code
184         * (gen{Unp,P}ackBits): fixed single bit access
185         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
186         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
187           previous instruction
188         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
189           register has to be handled with care (forbidding movement
190           of assignments/uses, removing assignments completely, ...)
191         * (pCodeOptime2pCodes): make use of regIsSpecial
192         * added lots of debugging output (commented out)
193         * src/pic/rallloc.c (deassignLRs): prevent operand registers
194           from being reused as result UNLESS it is known to work
195
196 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
197
198         * support/Util/dbuf.h: include <stddef.h> for size_t
199         * .version: changed to version 2.5.2
200
201 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
202
203         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
204
205 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
206
207         * src/hc08/gen.c (genMinus): fixed bug #1241835,
208           (genModOneByte): removed needless psha/pula
209
210 2005-07-22 Raphael Neider <rneider AT web.de>
211
212         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
213           have PIC14 handled like PIC16, fixes broken pic14 linker calls
214         * src/pic/gen.c (resolveIfx): do not "invent" labels
215         * (genSkipc): changed to positive logic
216         * (genSkipCond): removed as no longer needed
217         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
218           backport from PIC16
219         * (genLeftShift): check operands are in different registers
220         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
221           INCF does not update CARRY...
222         * src/pic/main.c: fixed _linkCmd
223         * src/pic/pcode.c (unlinkpCode): added inactive code
224         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
225           alive (do not assign result and operand overlapping registers)
226
227 2005-07-22 Raphael Neider <rneider AT web.de>
228
229         * src/pic/device.c (dump_sfr): replaced register declaration with
230           call to emitSymbolToFile() to avoid duplicate symbols
231         * (assignRelocatableRegisters): do not declare external symbols
232         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
233           right (take size of type, not etype)
234         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
235         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
236         * (packRegsForAccUse): disabled assignment of WREG as
237           the result reg to prevent occurence of just fixed #1235003,
238           fixes #1242954
239         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
240           symbols (avoids duplicate symbols in .asm file)
241         * (pic14emitRegularMap): use emitSymbolToFile()
242         * src/pic/gen.c (aopOp): fixed spillLocation handling
243         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
244         * (genDataPointerSet): removed unneccessary variables/output
245
246 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
247
248         * as/mcs51/lkarea.c: enlarged codemap for banked memory
249         * device/lib/mcs51/crtbank.asm: added # to 0x0F
250
251 2005-07-21 Raphael Neider <rneider AT web.de>
252
253         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
254           architecture cannot handle them efficiently, fixes bug #1235003
255         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
256           check for empty sets before using them (fixes bug #1232190)
257
258 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
259
260         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
261           (lnksect2): generate warnings for memory overlap
262         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
263           constseg to set the name of these segments so you can instruct the linker
264           to place them in banks
265         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
266         * src/SDCCglobl.h: added MODEL_HUGE to enum,
267           added code_seg and const_seg to options
268         * src/SDCCglue.c (emitMaps): use options.const_seg,
269           (createInterruptVect): put interrupt vectors in segment HOME,
270           (glue): put HOME before static segment and put the main glue in HOME,
271           (glue): use options.code_seg
272         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
273         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
274           these segments so you can instruct the linker to place them in banks
275           (linkEdit): use code_loc for HOME segment which should be the first
276           segment in code memory now
277         * src/SDCCmem.c: fixed more stuff like bug 1238386
278         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
279           (changePointer): don't change function pointers to code pointers for
280           banked functions,
281           (compareType): added exceptional check for banked function pointers
282         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
283         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
284           after static in code memory
285         * src/mcs51/gen.c: added aopLiteralLong prototype,
286           (aopForSym): use getSize for functions,
287           (genCall): generate banked calls over one trampoline __sdcc_banked_call
288           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
289           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
290           the segment,
291           (genPcall): use call for literal function pointers and generate banked
292           calls over the one trampoline so there's only one place for the user to
293           modify according to his/hers hardware,
294           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
295           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
296         * src/mcs51/main.c: added keyword banked,
297           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
298         * support/Util/SDCCerr.c,
299         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
300           needed for passing the bank and address to the trampoline
301         * device/lib/mcs51/crtbank.asm: added for bankswitching
302         * device/lib/mcs51/Makefile: added crtbank
303
304 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
305
306         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
307           for fields at offset 0 of a struct or union as reported
308           on 2005-07-07 in the developer mailing list.
309
310 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
311
312         * src/SDCCmem.c: fixed bug 1238386
313
314 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
315
316         * src/mcs51/peeph.def: added labelrefcounting for peepholes
317           (patch #1144962), added peephole 300, enabled 259.x
318         * doc/sdccman.lyx: removed screenshot and provided link instead
319
320 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
321
322         * doc/sdccman.lyx: added section about debugging with ddd
323         * doc/figures/ddd_example.eps: screenshot of debugging session
324
325 2005-07-04 Raphael Neider <rneider AT web.de>
326
327         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
328           like CODE pointers, fixes #1115683
329         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
330           call, fixes bugs #1232211, #1228110,
331           fixed wrong casts to pCodeFlow from pCodeInstructions
332
333 2005-07-04 Raphael Neider <rneider AT web.de>
334
335         * src/pic/gen.c (popGet): changed assert to allow for
336           bit operands
337         * (popGetAddr): changed signature to provide
338           an additional index, patched all call sites
339         * (genCmpEq): handle literal-like operands correctly
340         * (genAddrOf): added sanity checks on __code/__data pointers
341         * (genAssign): added handling of symbols from __code section
342         * (gencjne): do not generate code for comparisons whose result
343           is neither stored nor used, fixes bug #1171114
344         * (AccLsh, AccRsh): operate on operand instead of WREG
345         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
346           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
347           by known count
348         * rewrote complete shift-by-literal logic, commented unused
349           functions out
350         * (genConstPointerGet): get multiple bytes (if result size > 1),
351           fixed handling of non-immediate addresses
352         * (genPointerGet): handle CODE pointers like CONST pointers
353         * (genpic14Code): insert C-SRC lines as Cource-pCodes
354         * ({aop,op}_isLitLike): NEW, single place to decide whether an
355           operand is to be treated as a literal or not
356         * (mov2w,genPcall,genCmpEq),
357           src/pic/genarith.c: use aop_isLitLike() to decide between
358           literal/register contents
359         * (addSign): added missing offset
360         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
361           only emit comment in debug-mode,
362           use {aop,op}_isLitLike throughout the file
363         * src/pic/glue.c: fix initializers for pointers (work in progress)
364         * src/pic/pcode.c (get_op): honor index on _const symbols
365         * ({reset,dump}pCodeStatistics): NEW, estimate code size
366         * (dumppBlock): added pCode size estimation
367         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
368           check for IS_SYMOP before OP_SYMBOL'ing
369         * fixed indentation, compacted switch-statements
370         * (allocReg): find free register and allocate it instead of
371           allocating new registers all the time
372         * (deassignLRs): prevent POINTER_GET's from being assigned the same
373           registers as its operands (necessary only for multibyte GETs)
374
375 2005-07-01 Raphael Neider <rneider AT web.de>
376
377         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
378           debugging .asm-output macros FENTRY + FEXIT
379         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
380           way... I wonder...
381         * (emitpComment): NEW, printf to pCode
382         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
383           offset handling
384         * (popGetAddr): NEW, variant of popGet to access an immediates
385           high(er) bytes instead of the n'th byte of memory they reference,
386           replaced popGet with popGetAddr where neccessary
387         * (genDataPointerGet): reactivated and fixed implementation
388         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
389           accesses
390         * (genDataPointerSet): fixed multibyte assignments
391         * (genpic14Code): fixed --i-code-in-asm handling
392         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
393         * (genPlus): fixed index-out-of-bounds error
394         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
395         * src/pic/ralloc.c: added debugging output macro FENTRY2
396         * (spillThis): fixed indentation, enbraced for-body for clarity
397         * (rematStr): commented out as now unused
398         * (regTypeNum): commented out special spill case (overwrites
399           arbitrary values)
400         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
401
402 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
403
404         * doc/sdccman.lyx: documented sfr16/sfr32,
405           added example for using storage class with function pointers
406         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
407
408 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
409
410         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
411         * device/lib/_itoa.c,
412         * device/lib/_ltoa.c: optimized codesize
413         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
414           but don't know how to suppress the double warning.
415         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
416         * support/Util/SDCCerr.c,
417         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
418
419 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
420
421         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
422           fixed old K&R prototypes
423         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
424         * device/lib/_gptrget.c,
425         * device/lib/_gptrgetc.c,
426         * device/lib/_gptrput.c: changed versions for new memory indicator values,
427           also new versions for small generic pointers and banked generic pointers
428         * src/port.h: added const_name
429         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
430         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
431         * src/SDCCcse.c (findPrevIc): check all associative operators
432         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
433         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
434         * src/SDCCmem.c: updated comments,
435           set far-space to 0 for pdata, results in optimized code
436         * src/SDCCmem.h: added macro CONST_NAME
437         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
438           moving the info into the highest bits, see also gptrget/gptrput
439         * src/src.dsp: added sdcc.ico to project files
440         * src/avr/gen.c (genCast): fixed bug 0x%d
441         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
442         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
443           relation between ptr_type and DCL_TYPE,
444           (genCast): fixed bug 0x%d
445         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
446           (CODE)" for const_name
447         * src/hc08/gen.c (genCast): fixed bug 0x%d
448         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
449           (hc08_port): added "CONST (CODE)" for const_name
450         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
451           (aopForRemat, adjustArithmeticResult): disconnected direct relation
452           between ptr_type and DCL_TYPE,
453           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
454           operand* and took AOP() inside function so sfr-ness can be checked,
455           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
456           new prototype,
457           (genFunction, genEndFunction): optimized stack setup,
458           (genMinus): optimized for literals with ending zeroes (in bytes),
459           (genCast): fixed bug 0x%d
460         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
461           (mcs51_port): added "CONST (CODE)" for const_name
462         * src/mcs51/peeph.def: made rule 226 more generic
463         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
464         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
465         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
466         * src/z80/main.c (z80_port): added NULL for const_name,
467           (gbz80_port): added NULL for const_name
468         * support/regression/tests/bug663539.c,
469         * support/regression/tests/sfr16.c: new tests
470
471 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
472
473         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
474
475 2005-06-24 Raphael Neider <rneider AT web.de>
476
477         * device/lib/pic16/libdev/pic18f[68][567]20.c:
478           corrected typos...
479         * device/include/pic16/signal.h: added USBIF
480           and SIG_USB
481
482 2005-06-24 Raphael Neider <rneider AT web.de>
483
484         * device/lib/pic16/libdev/pic18f2455.c,
485           device/include/pic16/pic18f2455.h: NEW
486         * device/include/pic16/pic18fregs.h,
487           device/lib/pic16/pics.all,
488           src/pic16/device.c: added 18f2455
489         * device/lib/pic16/libdev/pic18f[68][567]20.c,
490           device/include/pic16/{pic18f[68][567].h,usart.h}:
491           replaced MULTIPLE_USARTS define with more relaible
492           compatibility sfrs (for USART access)
493
494 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
495
496         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
497           and the output asm file line is printed on two lines.
498
499 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
500
501         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
502           BGT, BLE, BHI, and BLS instructions
503         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
504           genCmpEq): removed
505         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
506           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
507           fixes bug #1216342
508         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
509
510 2005-06-15 Raphael Neider <rneider AT web.de>
511
512         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
513         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
514         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
515           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
516           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
517
518 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
519
520         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
521           Marcel Telka in bug #1215704
522
523 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
524
525         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
526           located in shared memory bank.
527
528 2005-05-31 Raphael Neider <rneider AT web.de>
529
530         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
531           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
532           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
533
534 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
535
536         * device/lib/_strncpy.c: fixed the fix
537
538 2005-05-26 Raphael Neider <rneider AT web.de>
539
540         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
541           initializers with \0, bug #1208187
542         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
543           intializers with \0, bug #1208187
544
545 2005-05-26 Raphael Neider <rneider AT web.de>
546
547         * src/pic16/glue.c (pic16_printIvalChar): fixed string
548           initializers with \0, bug #1208187
549         * src/pic16/main.c (_process_pragma): added sanity checks
550           for stack position and size, emit warnings when appropriate
551
552 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
553
554         * device/lib/_strncpy.c: fixed not filling with \0
555
556 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
557
558         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
559           createFunction),
560         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
561           compound_statement),
562         * src/SDCCsymt.h,
563         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
564
565 2005-05-24 Raphael Neider <rneider AT web.de>
566
567         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
568
569 2005-05-24 Raphael Neider <rneider AT web.de>
570
571         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
572           TRISE definitions, closes bug #1162453
573
574 2005-05-22 Raphael Neider <rneider AT web.de>
575
576         * src/pic16/main.c (_process_pragma): check for missing
577           arguments to pragmas code and udata
578         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
579           consistency fixes to match other headers (thanks to Jim Paris)
580         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
581
582 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
583
584         * src/SDCCicode.c (isOperandEqual): fixed missing ;
585
586 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
587
588         * support/regression/tests/bug1198642.c: new test
589         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
590         * src/SDCCcse.c (findPrevIc): added comment, please have a look
591         * support/scripts/resource.h,
592         * support/scripts/resource.rc,
593         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
594         * support/scripts/sdcc.ico: added 32x32 icon
595
596 2005-05-18 Raphael Neider <rneider AT web.de>
597
598         * device/lib/pic16/libdev/pic18f*.c,
599         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
600           keywords to "__sfr" and "__at (X)"
601         * device/include/pic16/pic18fregs.h: added pic18f4520
602         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
603           #1203088 (MPLAB compatibility)
604
605 2005-05-17 Raphael Neider <rneider AT web.de>
606
607         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
608         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
609         * device/lib/pic16/pics.all: added new devices
610         * src/pic16/device.c: added support for pic18f4520
611
612 2005-05-16 Raphael Neider <rneider AT web.de>
613         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
614         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
615         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
616           convenience function for bit access
617
618 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
619
620         * device/lib/printf_large.c: fixed bug 1193299
621         * support/regression/tests/bug1057979.c: added test %3.3s
622
623 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
624
625         * device/include/mcs51/8051.h,
626         * device/include/mcs51/8052.h: made parseable with lint
627         * device/include/mcs51/lint.h: added include file for (sp)lint
628         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
629         * doc/cdbfileformat.lyx,
630         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
631
632 2005-05-14 Raphael Neider <rneider AT web.de>
633
634         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
635         * device/lib/pic16/libc/stdlib/itoa.c (new)
636         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
637         * device/lib/pic16/libio/Makefile: exclude subdir according to
638           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
639         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
640         * src/pic16/gen.c (genFunction): prevent annoying warning
641         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
642           nameclashes on BeOS
643         * support/cpp2/cppmain.c (cpp_output_string): new
644         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
645           fixes bug 1116802
646
647 2005-05-13 Borut Razem <borut.razem AT siol.net>
648
649         * src/SDCCmain.c (linkEdit): fixed bug 1195202
650
651 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
652
653         * .version: changed to version 2.5.1; back to bleeding edge development
654
655 2005-05-11 Borut Razem <borut.razem AT siol.net>
656
657         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
658           generate PDF version 1.3 documents
659
660 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
661
662         * .version: changed to version 2.5.0
663
664 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
665
666         * doc/sdccman.lyx: updated weblinks, index and smaller updates
667
668 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
669
670         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
671         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
672         well as many smaller updates.
673         * .version: changed to version 2.5.0-pre1
674
675 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
676
677         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
678
679 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
680
681         * support/regression/tests/bug1185672.c: added
682         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
683           bug 1185672
684         * src/mcs51/gen.c (genCall): added comments, made it look safer
685         * src/mcs51/gen.c (genEndFunction): simplified
686
687 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
688
689         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
690
691 2005-04-14 Borut Razem <borut.razem AT siol.net>
692
693         * fixed bug 1045046 - SIGSEGV with really simple code?:
694           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
695           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
696
697 2005-04-14 Borut Razem <borut.razem AT siol.net>
698
699         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
700           src/pic16/device.h: temporarily disabled experimental #inline pragma
701           for 2.5.0 release
702
703 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
704
705         * device/include/z80/stdio.h,
706         * device/include/z80/string.h: removed these highly incomplete files so
707           SDCC can use the default ones in device/include/
708
709 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
710
711         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
712         gcc warning.
713         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
714         fix sdcpp warnings.
715
716 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
717
718         * device/include/malloc.h: removed redundant __reentrant prototypes
719         * device/lib/_mullong.c: added working xstack variant in asm (C version
720           doesn't pass regression tests)
721         * device/lib/bpx.c: used __data and made bpx char for mcs51
722         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
723           (createFunction): fixed bug with xstackPtr
724         * src/SDCCcse.c: corrected comments
725         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
726           (killDeadCode, eBBlockFromiCode): removed unused code
727         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
728           corrected comments
729         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
730           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
731           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
732           (genModOneByte): fixed warning in MSVC
733         * src/mcs51/main.c (): added comments
734         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
735
736 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
737
738         * src/SDCCmain.c (linkEdit): oops, changed one line too many
739
740 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
741
742         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
743
744 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
745
746         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
747         characters arrays of larger size than the declared one.
748
749 2005-04-10 Borut Razem <borut.razem AT siol.net>
750
751         * src/pic/gen.c (genInline),
752           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
753           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
754           (findNextInstruction), (findPrevInstruction),
755           (findInstructionUsingLabel),
756           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
757         * src/pic/pcode.c (findLabel): added missing '\n'
758         * src/src.dsp: added SDCCdwarf2.c to the project
759
760 2005-04-09 Borut Razem <borut.razem AT siol.net>
761
762         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
763
764 2005-04-08 Raphael Neider <rneider AT web.de>
765
766         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
767           into the chain after a given one) and mergeDefmapSymbols (combine
768           defmap entries for each symbol per pcode)
769         * (createDefmap): have defmap entries merged in the end
770         * (defmapReplaceSymRef): split defmap entries covering two accesses to
771           a symbol before replacing one access type's symbol, merge symbols in
772           the end (replacement symbol might already have an entry)
773         * (assignValnums): keep reference to written WREG intact
774
775 2005-04-08 Raphael Neider <rneider AT web.de>
776
777         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
778           Alpha)
779
780 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
781
782         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
783         bytes
784
785 2005-04-07 Raphael Neider <rneider AT web.de>
786
787         * device/include/pic16/usart.h: added compatibility defines for
788           devices with more than one USART
789         * device/include/pic16/pic18f[68][567]20.h: activated above defines
790
791 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
792
793         * device/lib/Makefile.in: updated for port specific include
794
795 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
796
797         * support/regression/ports/mcs51/spec.mk: added mcs51 include
798
799 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
800
801         * device/include/8051.h,
802         * device/include/8052.h,
803         * device/include/at89S8252.h,
804         * device/include/at89c55.h,
805         * device/include/at89x051.h,
806         * device/include/at89x51.h,
807         * device/include/at89x52.h,
808         * device/include/mcs51reg.h,
809         * device/include/reg51.h,
810         * device/include/reg764.h,
811         * device/include/regc515c.h,
812         * device/include/sab80515.h: (re)moved these 12 files
813         * device/include/mcs51/8051.h,
814         * device/include/mcs51/8052.h,
815         * device/include/mcs51/at89S8252.h,
816         * device/include/mcs51/at89c55.h,
817         * device/include/mcs51/at89x051.h,
818         * device/include/mcs51/at89x51.h,
819         * device/include/mcs51/at89x52.h,
820         * device/include/mcs51/mcs51reg.h,
821         * device/include/mcs51/reg51.h,
822         * device/include/mcs51/reg764.h,
823         * device/include/mcs51/regc515c.h,
824         * device/include/mcs51/sab80515.h: and added them here
825
826 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
827
828         * device/include/stdarg.h: changed SDCC specific keywords to double
829           underlined form.
830         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
831           mcs51 and ds390.
832         * device/include/hc08/mc68hc908gp32.h,
833         * device/include/hc08/mc68hc908jb8.h,
834         * device/include/hc08/mc68hc908jkjl.h,
835         * device/include/hc08/mc68hc908qy.h: fixed comments
836         * device/include/mcs51/README: updated
837         * device/include/mcs51/c8051f120.h: added PINRSF
838         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
839         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
840           amidst code. Also inline is not supported.
841
842 2005-04-06 Raphael Neider <rneider AT web.de>
843
844         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
845         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
846           callers stack/frame pointers
847
848 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
849
850         * device/include/pic16/usart.h: added, missing in previous commit,
851         * device/include/pic16/adc.h: fixed typo,
852         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
853         commit,
854         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
855         <p18fxxx.inc>
856         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
857         uninitialized because a bug appears with gplink
858         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
859         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
860         complains for unrecognised option
861
862 2005-04-05 Raphael Neider <rneider AT web.de>
863
864         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
865           structs as well (using memcpy)
866         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
867           on ISRs (GOTO has no label)
868         * src/pic16/device.h: added OF_OPTIMIZE_DF
869         * src/pic16/main.c: added compiler switch --optimize-df to enable the
870           new data flow analysis/optimization
871         * src/pic16/pcode.c: added (prototypes for and implementation of)
872           dataflow analysis functions, fixed pCodeInstructions' inCond and
873           outCond values, made RCALL a branch instruction
874         * (pic16_unlinkpCode): keep C line if possible
875         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
876           C line moved if possible
877         * (pic16_getRegFrompCodeOp): NEW, improved version of...
878         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
879           to use new pic16_getRegFrompCodeOp (works for more SFRs)
880         * (pic16_BuildFlow): fixed skip instructions with label (did not start
881           new flow)
882         * (pic16_getJumptabpCode): NEW, needed in...
883         * (LinkFlow): fixed handling of jumptables, calls and conditional
884           branches
885         * (pic16_InsertCommentAfter): NEW
886         * (pic16_pCodeReplace): made verbose and flow preserving
887         * (AnalyzeFlow): added call to data flow analysis
888         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
889         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
890         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
891
892 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
893
894         * src/SDCCast.c (decorateType): fixed bug #1105626
895
896 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
897
898         * device/include/asm/pic16/features.h,
899         * pic18f*.h headers,
900         * device/include/pic16/adc.h,
901         * device/include/pic16/delay.h,
902         * device/include/pic16/i2c.h,
903         * device/include/pic16/malloc.h,
904         * device/include/pic16/stdio.h,
905         * device/include/pic16/stdlib.h,
906         * device/include/pic16/string.h,
907         * device/lib/pic16/libc/stdio/printf_tiny.c,
908         * device/lib/pic16/libc/stdio/printf_small.c,
909         * device/lib/pic16/libc/stdio/strmgpsim.c,
910         * device/lib/pic16/libc/stdio/strmmssp.c,
911         * device/lib/pic16/libc/stdio/strmusart.c,
912         * device/lib/pic16/libc/stdio/vfprintf.c,
913         * device/lib/pic16/libc/stdlib/ltoa.c,
914         * device/lib/pic16/libc/stdlib/putchar.c,
915         * device/lib/pic16/libc/stdlib/x_ftoa.c,
916         * device/lib/pic16/libc/stdlib/memchrpgm.c,
917         * device/lib/pic16/libc/stdlib/memchrram.c,
918         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
919         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
920         * device/lib/pic16/libio/adc/adcbusy.c,
921         * device/lib/pic16/libio/adc/adcread.c,
922         * device/lib/pic16/libio/adc/adcsetch.c,
923         * device/lib/pic16/libio/usart/ubaud.c,
924         * device/lib/pic16/libio/usart/ubusy.c,
925         * device/lib/pic16/libio/usart/udrdy.c,
926         * device/lib/pic16/libio/usart/uopen.c,
927         * device/lib/pic16/libio/usart/uputc.c,
928         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
929         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
930         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
931         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
932         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
933         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
934         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
935         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
936         specific keywords to double underlined form,
937         * device/lib/pic16/libc/Makefile.rules,
938         * device/lib/pic16/libsdcc/Makefile.rules,
939         * device/lib/pic16/libm/Makefile,
940         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
941         to compile with C standard set in Makefile.common
942         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
943         rand.c and crc.c in compilation process,
944         * device/lib/pic16/libsdcc/int/divuint.c,
945         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
946         `c' from signed to unsigned,
947         * device/lib/pic16/startup/crt0.c,
948         * device/lib/pic16/startup/crt0i.c,
949         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
950         keywords to double underlined form, bug fixes in _do_cinit function
951         which prevented the correct initialization of the .idata segment,
952         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
953         core to enter a infinite loop
954         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
955
956 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
957
958         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
959
960 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
961
962         * device/include/Makefile.in: add support for hc08 subdirectory
963         * device/include/hc08/: new subdirectory
964         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
965         Lucas Loizaga, thanks!
966         * device/include/hc08/mc68hc908qy.h,
967         * device/include/hc08/mc68hc908gp32.h,
968         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
969         their own directory. Changed internal macro names to use the compiler
970         reserved namespace. Changed SDCC specific keywords to double
971         underlined form.
972         * device/include/math.h,
973         * device/include/malloc.h,
974         * device/include/stdarg.h,
975         * device/include/stdbool.h
976         * device/include/string.h,
977         * device/include/tinibios.h,
978         * device/include/ds400rom.h,
979         * device/include/8051.h,
980         * device/include/8052.h,
981         * device/include/80c51xa.h,
982         * device/include/at89c55.h,
983         * device/include/at89S8252.h,
984         * device/include/at89x51.h,
985         * device/include/at89x52.h,
986         * device/include/ds80c390.h,
987         * device/include/reg764.h,
988         * device/include/regc515c.h,
989         * device/include/sab80515.h,
990         * device/include/mcs51/c8051f000.h,
991         * device/include/mcs51/c8051f018.h,
992         * device/include/mcs51/c8051f020.h,
993         * device/include/mcs51/c8051f040.h,
994         * device/include/mcs51/c8051f060.h,
995         * device/include/mcs51/c8051f120.h,
996         * device/include/mcs51/c8051f300.h,
997         * device/include/mcs51/c8051f310.h,
998         * device/include/mcs51/c8051f320.h,
999         * device/include/mcs51/c8051f330.h,
1000         * device/include/mcs51/c8051f350.h,
1001         * device/include/z180.h: Changed SDCC specific keywords to double
1002         underlined form.
1003
1004 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
1005
1006         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
1007         18F4455,
1008         * (pic16_assignConfigWordValue): disable testing of configuration
1009         register value with config mask,
1010         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
1011         function with port->fun_prefix,
1012         * (genFunction): when generating a naked interrupt function never
1013         create an absolute segment placed in interrupt vector address, place
1014         the actual interrupt function at IVA instead, when an interrupt
1015         function is generated with unspecified interrupt then do not create
1016         the absolute section,
1017         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
1018         code for generating a call to generic pointer get/put function with
1019         a call to function pic16_callGenericPointer(),
1020         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
1021         the call to the generic pointer get/put functions with prefixing the
1022         function name with port->fun_prefix,
1023         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
1024         * src/pic16/main.c (_process_pragma): prefix function with
1025         port->fun_prefix,
1026         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
1027         calling assembler, old 18Fxxxx macro is deprecated,
1028         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
1029         PC_ASMDIR in while condition,
1030         * (findInstruction): add PC_ASMDIR in while condition,
1031         * (buildCallTree): prefix main with port->fun_prefix,
1032         * (pic16_pCode2str): fixed bug that didn't emit the memory access
1033         identifier for variable with banked access in instructions BTFSS,
1034         BTFSC, BCF, BSF, BTG
1035         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
1036         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
1037         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
1038         perform optimization when enviroment variable NO_REG_OPT is set,
1039         * (insideLRBlock): NEW, return 1 if register is inside an
1040         INF_LOCALREGS block,
1041         * (RemoveRegFromLRBlock): remove a register that is completely
1042         eliminated by register optimization, but it is still left in local
1043         register store/restore in/from stack block,
1044         * (Remove2pcodes): after removing register, check to see if it
1045         should be removed from local register store/restore in/from stack
1046         block,
1047         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
1048         DUMMY_READ_VOLATILE,
1049
1050         * device/include/pic16/adc.h: minor prototype modifications and
1051         update,
1052         * device/include/pic16/malloc.h: added GPL notice various
1053         modifications,
1054         * device/include/pic16/stdint.h: NEW, standard header for ints
1055         * device/include/pic16/delay.h: NEW, header for delay functions,
1056         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
1057         delay1mtcy,
1058         * device/include/pic16/signal.h: NEW, header providing helper macros
1059         for implementing signal handlers,
1060         * device/include/pic16/stdio.h: added prototypes for functions,
1061         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
1062         prototypes for stdin and stdout, added macro PUTCHAR to
1063         automatically implement putchar function prototype,
1064         * device/include/pic16/usart.h: modified and updated USART library,
1065         * device/lib/pic16/libio/adc/,
1066         * device/lib/pic16/libio/i2c: some modifications to improve library
1067         performance,
1068         * device/lib/pic16/libc/stdio/: modifications for the new printf*
1069         family of functions,
1070         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
1071         family of functions and other sources,
1072         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
1073         of the PIC18Fxx[28] devices,
1074         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
1075         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
1076         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
1077         _do_cinit function, because the previous failed when local variables
1078         where not placed in the same memory bank,
1079         * device/lib/pic16/libsdcc/char/: various modifications to improve
1080         library performance,
1081         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
1082         information on the new functions of the c library and more...
1083
1084 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1085
1086         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
1087
1088 2005-03-26 Raphael Neider <rneider AT web.de>
1089
1090         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
1091           if condition == CARRY)
1092         * (genCmp): adapted to new genSkipc semantics
1093         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
1094           on rIfx (genCmp was broken)
1095
1096 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1097
1098         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
1099         * src/z80/main.c (_keywords[]),
1100         * src/SDCCglobal.h (struct options),
1101         * src/SDCC.y,
1102         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
1103         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
1104         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
1105         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
1106         always available in leading double underscore form. The C99 support is
1107         mostly missing, but it's a start.
1108         * support/regression/tests/bug-227710.c: fixed nonconforming use of
1109         reserved identifier "__data".
1110
1111 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1112
1113         * src/mcs51/peeph.def: fixed bug 1170013
1114
1115 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
1116
1117         * device/include/mcs51reg.h: fixed bug 842007
1118
1119 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1120
1121         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
1122         last time.
1123
1124 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1125
1126         * src/port.h (struct PORT),
1127         * src/avr/ralloc.c (avr_assignRegisters),
1128         * src/avr/main.c,
1129         * src/ds390/ralloc.c (ds390_assignRegisters),
1130         * src/ds390/main.c,
1131         * src/hc08/ralloc.c (hc08_assignRegisters),
1132         * src/hc08/main.c,
1133         * src/mcs51/ralloc.c (mcs51_assignRegisters),
1134         * src/mcs51/main.c,
1135         * src/pic/ralloc.c (pic14_assignRegisters),
1136         * src/pic/main.c,
1137         * src/pic16/ralloc.c (pic16_assignRegisters),
1138         * src/pic16/main.c,
1139         * src/xa51/ralloc.c (xa51_assignRegisters),
1140         * src/xa51/main.c,
1141         * src/z80/ralloc.c (z80_assignRegisters),
1142         * src/z80/ralloc.h,
1143         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
1144         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
1145         * src/SDCCcse.h,
1146         * src/SDCCdflow.c (computeDataFlow),
1147         * src/SDCCdflow.h,
1148         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
1149         * src/SDCCloop.h,
1150         * src/SDCCcflow.c (*),
1151         * src/SDCCcflow.h,
1152         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
1153         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
1154         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
1155         immedDom() returning wrong block; probably fixes bug #1160833)
1156
1157 2005-03-20 Borut Razem <borut.razem AT siol.net>
1158
1159         * support/scripts/inc2h.pl: WIN32 port
1160
1161 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
1162
1163         * device/lib/makefile.in: added abs.c and labs.c
1164
1165 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
1166
1167         * device/include/stdint.h: added
1168         * device/lib/abs.c: added
1169         * device/lib/labs.c: added
1170         * device/include/stdlib.h: added abs() and labs() prototypes
1171         * device/lib/libsdcc.lib: added abs and labs
1172         * device/include/float.h,
1173         * device/lib/_fsmul.c,
1174         * device/lib/printf_fast.c,
1175         * device/lib/printf_tiny.c: updated comments
1176
1177 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1178
1179         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
1180         bug #1164313
1181
1182 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1183
1184         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
1185         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
1186
1187 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
1188
1189         * device/lib/printf_large.c: removed inline assembly for portability and
1190           readability. Use printf_fast if speed or size are more important.
1191         * src/pic16/gen.c: removed conditions around use of DEBUGpc
1192         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
1193
1194 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
1195
1196         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
1197         prevent compiler warning
1198
1199 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1200
1201         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
1202         moved to level 0 and declared as static. Also they are explicit
1203         placed in access bank. This was necessery because some times they
1204         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
1205         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
1206         optimizations. Currently only compare to unsigned char is implemented,
1207         * src/pic16/gen.c: added fReturnIdx array,
1208         * (struct resolvedIfx) is moved to gen.h and made public,
1209         * (struct _G): added sregsAlloc and sregsAllocSet fields,
1210         * (aopForSym): added an optimization to directly store in stack of
1211         the operand of a SEND iCode,
1212         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
1213         but as registers instead (AOP_REG) using the fReturnIdx array,
1214         * (pic16_freeAsmop): remove the freed register from the
1215         _G.sregsAlloc field,
1216         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
1217         a compare of 'WREG',
1218         * (pic16_popGetTempRegCond): changed function prototype, now
1219         function takes also a bitVector argument v which holds the current
1220         set of registers that are allocated for stack access by aopForSym,
1221         registers allocated in aopForSym for accessing stack symbols are not
1222         any more part of the functions usedRegs field,
1223         * (genCall): some times aopOp is called for a stack variable to be
1224         send, aopForSym might perform the push, if this is true make sure
1225         that genCall doesn't push the variable twice by testing _G.resDirect,
1226         * (genFunction): changed testing for unspecified interrupt number
1227         from 256 to INTNO_UNSPEC,
1228         * modified selection scheme of frame pointer generation. Previously
1229         if function did use local registers a frame pointer was generated,
1230         now a frame pointer is generated only if function has arguments
1231         (that need PLUSW2 register access), or has stack arguments, or the
1232         compiler is not instructed to omit the frame pointer,
1233         * (genEndFunction): before restoring local registers that were saved
1234         in the function preamble, also restore the registers that *might*
1235         have been allocated for stack access,
1236         * (genRet): removed some old comments,
1237         * (genCmp, the active (RN's) version): added a call to the
1238         pic16_genCmp_special function to perform the compare with a more
1239         robust and optimized way,
1240         * (genInline): a feature has been added in inline code generation,
1241         which allows a wildcard variable substitution when writing inline
1242         assembly. Code is incomplete and experimental therefore undocumented,
1243         * (genCast): changed order of aopOp for result and right to allow
1244         aopForSym to directly load the result if possible,
1245         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
1246         perform an optimized compare on some selected special occasions,
1247         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
1248         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
1249         generate an IVT any more,
1250         * src/pic16/main.c (pic16_optionsTable): added command line option
1251         --optimize-cmp,
1252         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
1253         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
1254         macros,
1255         * src/pic16/NOTES: Raphael Neider added in list of active developers
1256         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
1257         jumptable_end to prevent bug #,
1258         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
1259         inCond and outCond fields,
1260         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
1261         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
1262         turn off register spilling,
1263         * (packRegsForOneUse): synced with other ports' versions although it
1264         is not used currently,
1265         * (pic16_packRegisters): added an optimization while reading
1266         structure bitfields, some registers may be saved (malloc code is
1267         decreased by 80 bytes)
1268
1269 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
1270
1271         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
1272         left is a bitfield, if yes, then don't optimize assignment. Perhaps
1273         this can be optimized more?
1274
1275 2005-03-10 Raphael Neider <rneider AT web.de>
1276
1277         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
1278           genNearPointerGet): (hopefully) fixed access to bitfields via
1279           pointers (p->bitN = x; and x = p->bitN; failed)
1280
1281 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
1282
1283         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
1284
1285 2005-03-09 Raphael Neider <rneider AT web.de>
1286
1287         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
1288
1289 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
1290
1291         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
1292         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
1293           (regTypeNum): set REG_BIT type if necessary
1294         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
1295         * support/regression/tests/critical.c: check bug 1144613
1296
1297 2005-03-02 Raphael Neider <rneider AT web.de>
1298
1299         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
1300
1301 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1302
1303         * src/avr/ralloc.c (serialRegAssign),
1304         * src/ds390/ralloc.c (serialRegAssign),
1305         * src/hc08/ralloc.c (serialRegAssign),
1306         * src/mcs51/ralloc.c (serialRegAssign),
1307         * src/pic/ralloc.c (serialRegAssign),
1308         * src/pic16/ralloc.c (serialRegAssign),
1309         * src/xa51/ralloc.c (serialRegAssign),
1310         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
1311
1312 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
1313
1314         * src/SDCCast.c (decorateType): fixed bug 1124787
1315
1316 2005-02-20 Hubert Sack <sack AT digiplan.de>
1317         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1318
1319         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
1320         patch #1121755
1321
1322 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1323
1324         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
1325         to keep the correct label reference count when adding/removing references
1326         to labels. A peephole file using this is appended to patch #1144962.
1327
1328 2005-02-14 Raphael Neider <rneider AT web.de>
1329
1330         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
1331         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
1332         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
1333           retrievals of result operand's value on assignment
1334
1335 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
1336
1337         * device/include/pic16/string.h: modified prototype for memccpy()
1338         to memccpy(void *, void *, char, size_t)
1339         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
1340         check whether to omit frame pointer or not,
1341         * (genInline): convert all occurences of "\n" to LF in inline
1342         assembler blocks, this helps formatting the inline text,
1343         * (pic16_loadFSR0): modified prototype,
1344         * (genNearPointerGet, genNearPointerSet): reorganization of code,
1345         removed some 8051 legacy code,
1346         * (genPackBits): enabled handling bitfields exceeding one byte in size,
1347         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
1348         before allocating temporary registers in functions,
1349
1350 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1351
1352         * support/regression/tests/bitvars.c: corrected the "fix"
1353
1354 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1355
1356         * support/regression/tests/bitvars.c,
1357         * support/regression/tests/bitwise.c,
1358         * support/regression/tests/rotate.c: "fixed" problems on Alpha
1359
1360 2005-02-10 Raphael Neider <rneider AT web.de>
1361
1362         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
1363           different size for Alpha
1364         * src/pic16/gen.c (genCmpEq) : improved compare with 0
1365
1366 2005-02-09 Raphael Neider <rneider AT web.de>
1367
1368         * src/SDCC.lex(doPragma) : save and restore warning options as well
1369           (also added new stack plus clone- and copyAndFreeSDCCERRG())
1370         * have #pragma less_pedantic set the errorlevel to WARNING
1371           (fixes #1117001)
1372         * (cloneOptimize) : fixed wrong malloc's size
1373         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
1374           facilitate correct handling of #pragma (save|restore)
1375
1376 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1377
1378         * src/mcs51/gen.c: removed non-standard C nameless struct/union
1379
1380 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
1381
1382         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
1383
1384 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
1385
1386         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
1387
1388 2005-02-02 Raphael Neider <rneider AT web.de>
1389
1390         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
1391         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
1392         * (pic16_storeForReturn): fixed to allow returning function pointers
1393         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
1394         * device/include/pic16/{stddef.h,stdbool.h}: added
1395
1396 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
1397
1398         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
1399
1400 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
1401
1402         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
1403         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
1404          appeared to be required
1405
1406 2005-01-31 Borut Razem <borut.razem AT siol.net>
1407
1408         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
1409           include/mcs51 and include/z80 directories to the package
1410
1411 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1412
1413         * src/hc08/gen.c (genFunction): fixed bug #1112752
1414
1415 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1416
1417         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
1418
1419 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1420
1421         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
1422
1423 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
1424
1425         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
1426
1427 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
1428
1429         * device/include/c8051fxxx.h: removed these 6 files
1430         * device/include/mcs51/c8051fxxx.h: added these 11 new files
1431
1432 2005-01-26 Raphael Neider <rneider AT web.de>
1433
1434         * src/pic16/gen.c (genAssign): fixed assignment from longs
1435           in codespace (were cut to three bytes)
1436         * (genDummyRead): implemented (except for CODESPACE...),
1437           fixed bug #1108575
1438         * src/pic16/glue.c (emitStatistics): beautified
1439         * device/lib/pic16/libm/Makefile: added include path
1440
1441 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1442
1443         * src/z80/gen.c (aopPut): fixed bug #1103902
1444
1445 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1446
1447         * device/lib/expf.c: fixed bug #1095792
1448
1449 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
1450
1451         * device/lib/pic16/libm: added Math library sources
1452
1453 2005-01-24 Raphael Neider <rneider AT web.de>
1454
1455         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
1456           to enable upcast to pCodeOpReg2 (there is no type tag to
1457           differenciate the two and pic16_popGet2p cast into PCOR2)
1458         * src/pic16/main.c (_process_pragma): fixed another malloc bug
1459           (sizeof(sectNames) changed to sizeof(sectName))
1460           Both patches fix segfaults under MinGW.
1461
1462 2005-01-23 Raphael Neider <rneider AT web.de>
1463
1464         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
1465           Safe_[mc]?alloc()'ed variables
1466         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
1467           of (byte sized) temporaries (assign them to WREG for now)
1468         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
1469           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
1470           this might fix SIGSEGVs on MinGW...
1471         * src/SDCCopt.c (killDeadCode): restored original behaviour
1472           (volatile operands might get thrown away though)
1473
1474 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
1475
1476         * src/pic16/gen.c: fixed bug #1106975,
1477         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
1478         pointer update, INTCON is saved, global interrupts are disabled and
1479         restored after updateing TOS.
1480         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
1481         * added function attribute 'shadowregs' to take advantage of shadow
1482         registers,
1483         * added function attribute 'wparam' as an alternative to the wparam
1484         pragma,
1485         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
1486         user declares a non-ISR function as 'shadowregs',
1487         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
1488
1489 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
1490
1491         * .version: bumped version number to 2.4.8
1492         * device/lib/pic16/pics.all: list of PIC18F devices supported by
1493         pic16 port,
1494         * device/lib/pic16/libio/i2c/: I2C module support library,
1495         * device/include/pic16/i2c.h: I2C support library header,
1496         * device/lib/pic16/libc/stdio/: standard IO support sources,
1497         * (printf_small.c): printf_small() source, supports float print,
1498         * (printf_tiny.c): printf_tiny() source, does not support floats,
1499         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
1500         enable global optimizations for entire library source, other
1501         Makefiles in the source tree are also modified to reflect this,
1502         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
1503         function,
1504         * doc/sdccman.lyx: updated to reflect new changes,
1505         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
1506         sym->onStack if-case,
1507         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
1508         sbit, idata, _idata, xdata, _xdata,
1509         * added pragma library, to link an external library, (see doc),
1510         * removed command line options, --pomit-config-words, --pomit-ivt,
1511         --pleave-reset-vector,
1512         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
1513         when calling assembler to reflect memory model used, also define
1514         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
1515         reflect stack model used,
1516         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
1517         on stack return NULL,
1518
1519 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1520
1521         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
1522           of the operands is volatile. Fixes #1020220
1523
1524 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1525
1526         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
1527         * (OptimizeRegUsage): make sure that there is really no other flow where
1528           the first pCode is used
1529
1530 2005-01-22 Raphael Neider <rneider AT web.de>
1531
1532         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
1533           to fix #1106967 (pCode->seq are not set up correctly)
1534
1535 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1536
1537         * src/SDCCglue.c (glue): make sure code area is declared before the
1538         static initialization area.
1539
1540 2005-01-21 Raphael Neider <rneider AT web.de>
1541
1542         * device/lib/Makefile.in: fixed test for pic16 install dir
1543         * device/lib/pic16/*/Makefile*: modified compile flags to enable
1544           optimizations
1545         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
1546           added --optimize-goto compiler switch and pragma wparam documentation
1547         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
1548         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
1549           and PRODH closing bug #1071770 (peephole optimizer)
1550
1551 2005-01-19 Raphael Neider <rneider AT web.de>
1552
1553         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
1554           cmdLine buffers (used when calling sdcpp...) are large enough
1555           (MAX_PATH=256 truncates arguments leading to system halts when
1556           used in MinGW...)
1557         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
1558         * (genUminus): rewritten to for efficiency
1559         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
1560           used uninitialized in some cases)
1561         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
1562           copy the third byte from the int -- now assumes 0x80 (data memory)
1563         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
1564           operands (genAddLit expects the iCode's operands to swapped as
1565           well), fixed leftover bytes (crashed for short left operands)
1566         * (pic16_genMinusDec): performance improvements, removed false
1567           PIC14 emitSKPNCs
1568         * (pic16_genMinus): fixed to cope with differently sized operands
1569         * src/pic16/glue.c (pic16_glue): added new banksel optimization
1570           for --obanksel > 1
1571         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
1572         * src/pic16/graph.[ch]: implementation of directed graphs, used by
1573           new banksel optimization
1574         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
1575           analysis for temporary registers (segfaults...)
1576         * src/pic16/peeph.def: added rule
1577
1578 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
1579
1580         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
1581         which converts a float number to its ASCII representation
1582         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
1583         functions to convert the fractional and integer part of a float to ASCII,
1584         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
1585         realloc.c): added _MALLOC_SPEC to explicit place variables in data
1586         ram
1587         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
1588         _STATMEM macros,
1589         * device/include/pic16/adc.h: added GPL info,
1590         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
1591         a pCodeOp as tested operand,
1592         * (genNearPointerGet): optimized bit testing, does not use
1593         intermediate register for bit value, test directly instead with
1594         BTFSS, BTFSC, works only for single bits,
1595         * (genpic16Code): dump the name of the iCode in the asm,
1596         * src/pic16/ralloc.c (decodeOp): removed static declaration and
1597         renamed to pic16_decodeOp,
1598         * (serialRegAssign): do not allocate a temporary register for iCode
1599         sequences that test a single bit for 1/0
1600
1601 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
1602
1603         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
1604         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
1605         access stack and frame pointers. They are initially assigned to
1606         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
1607         accessing SFRs. Updated all occurences of modification of stack or
1608         frame pointer in gen.c and pcode.c,
1609         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
1610         assigning of a literal value to pointers,
1611         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
1612         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
1613         selected
1614
1615 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
1616
1617         * doc/sdccman.lyx: update documentation about stack pragma, added
1618         some info for stack memory models
1619
1620 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1621
1622         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
1623
1624 2005-01-08 Raphael Neider <rneider AT web.de>
1625
1626         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
1627           udata sections to fix bug #1097823
1628
1629 2005-01-05 Raphael Neider <rneider AT web.de>
1630
1631         * src/pic16/gen.c (genGenericShift): added handling of differently
1632           sized left operand and result
1633
1634 2005-01-04 Raphael Neider <rneider AT web.de>
1635
1636         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
1637         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
1638           to hold the condition bit)
1639         * added new version of genCmp (old code available via #define)
1640         * added new version of genShiftLeft/genShiftRight in a generic
1641           way, now supports shifting by negative values
1642         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
1643           shiftCount (expected by genGenericShift)
1644         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
1645         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
1646           dump
1647         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
1648           is an invalid literal too...)
1649
1650 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
1651
1652         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
1653         from Raphael Neider,
1654         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
1655         for 8-bit literals. This fixes some literal operands which are sign
1656         extended to 16-bits ints when instruction needs only 8-bits.
1657
1658 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
1659
1660         * device/lib/logf.c: added mcs51 assembly version
1661         * device/lib/expf.c: added mcs51 assembly version
1662         * device/lib/_logexpf.c: new shared asm code for expf and logf
1663         * device/include/math.h: add defines for assembly math library
1664         * device/lib/Makefile.in: build new _logexpf.c
1665         * device/lib/libfloat.lib: use new _logexpf.c
1666
1667 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1668
1669         * src/pic/device.c
1670         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
1671           device types which have less than 0x7f registers.
1672
1673 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1674
1675         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
1676
1677 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
1678
1679         * device/lib/printf_fast.c: only build on supported arch.
1680         * device/lib/printf_tiny.c: only build on supported arch.
1681         * device/lib/printf_fast_f.c: only build if asm float lib
1682         * device/lib/_fsget1arg.c: only build if asm float lib
1683         * device/lib/_fsget2args.c: only build if asm float lib
1684         * device/lib/_fsnormalize.c: only build if asm float lib
1685         * device/lib/_fsreturnval.c: only build if asm float lib
1686         * device/lib/_fsrshift.c: only build if asm float lib
1687         * device/lib/_fsswapargs.c: only build if asm float lib
1688         * device/include/stdio.h: don't provide print_fast,
1689           print_fast_f, print_tiny prototypes if --xstack used
1690
1691 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
1692
1693         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
1694         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
1695           to the SOURCES
1696
1697 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
1698
1699         * device/lib/printf_fast_f.c: same as printf_fast, but
1700           with floating point enabled
1701         * device/lib/printf_fast.c: minor tweaks
1702         * device/include/stdio.h: add printf_fast_f
1703
1704 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
1705
1706         * src/SDCCmain.c: make --float-reent default for mcs51
1707         * device/lib/_fsadd.c: added mcs51 assembly version
1708         * device/lib/_fssub.c: added mcs51 assembly version
1709         * device/lib/_fsmul.c: added mcs51 assembly version
1710         * device/lib/_fsdiv.c: added mcs51 assembly version
1711         * device/lib/_fseq.c: added mcs51 assembly version
1712         * device/lib/_fsneq.c: added mcs51 assembly version
1713         * device/lib/_fsgt.c: added mcs51 assembly version
1714         * device/lib/_fslt.c: added mcs51 assembly version
1715         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
1716         * device/lib/Makefile.in: add _fscmp to build
1717         * device/lib/libfloat.lib: add _fscmp to build
1718
1719 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
1720
1721         * device/lib/_fs2slong.c: added mcs51 assembly version
1722         * device/lib/_fs2sint.c: added mcs51 assembly version
1723         * device/lib/_fs2schar.c: added mcs51 assembly version
1724         * device/lib/_fs2ulong.c: added mcs51 assembly version
1725         * device/lib/_fs2uint.c: added mcs51 assembly version
1726         * device/lib/_fs2uchar.c: added mcs51 assembly version
1727         * device/lib/_slong2fs.c: added mcs51 assembly version
1728         * device/lib/_sint2fs.c: added mcs51 assembly version
1729         * device/lib/_schar2fs.c: added mcs51 assembly version
1730         * device/lib/_ulong2fs.c: added mcs51 assembly version
1731         * device/lib/_uint2fs.c: added mcs51 assembly version
1732         * device/lib/_uchar2fs.c: added mcs51 assembly version
1733         * device/include/float.h: added #define to select asm vs c
1734
1735 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
1736
1737         * device/lib/printf_fast.c: improvements to float output
1738         * device/include/float.h: add defines for assembly float library
1739         * device/lib/_fsget1arg.c: receive 1 float arg
1740         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
1741         * device/lib/_fsnormalize.c: normalize a float
1742         * device/lib/_fsreturnval.c: return float, various helper routines
1743         * device/lib/_fsrshift.c: right shift a float's mantissa
1744         * device/lib/_fsswapargs.c: swap 2 floats
1745         * device/lib/Makefile.in: build these 6 new files for mcs51
1746         * device/lib/libfloat.lib: add these 6 files to the library
1747
1748 2004-12-26 Borut Razem <borut.razem AT siol.net>
1749
1750         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
1751           built by gcc 3.4.2
1752
1753 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
1754
1755         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
1756           and fully reentrant and register bank neutral.
1757         * device/lib/printf_fast.c: added float (not enabled by default),
1758           added compact/slower integer (also not enabled by default),
1759           improved size/speed of fast integer code, other minor changes
1760         * device/include/stdio.h, device/lib/Makefile.in,
1761           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
1762
1763 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
1764
1765         * src/pic16/pcode.c: declaring variables other than at the start of a
1766           block is not supported in C by VC6.
1767
1768 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
1769
1770         * applied a previous patch from Raphael Neider that wasn't included
1771         in the previous commits, which fixes infinite loops within jumptable
1772         improvements,
1773         * made some fixes that previous patches introduced
1774
1775 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
1776
1777         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
1778         that fixes an issue with AOP_PCODE asmop's offset,
1779         * (pic16_popCopyReg): update instance field too,
1780         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
1781         function of pic port,
1782         * (genCmp, genAnd, genAssign),
1783         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
1784
1785 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
1786
1787         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
1788         variables initial values to idata section,
1789         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
1790         variables in some functions. This utilizes parmBytes field of iCode
1791         structure to hold the offset of the variable in stack. (might be
1792         able to use the stack field too?)
1793         * applied patch from Raphael Neider # ### , # ###
1794         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
1795         variable initial values in idata section,
1796         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
1797         for static variables with initial value
1798         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
1799         applied fix in while loop from Raphael Neider.
1800
1801 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
1802
1803         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
1804         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
1805         * src/ds390/ralloc.c (serialRegAssign): spill bits
1806         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
1807         * support/Util/SDCCerr.c,
1808         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
1809         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
1810         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
1811
1812 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
1813
1814         * device/include/sdcc-lib.h: inserted LGPL, added includes
1815           asm/ds390/features.h and asm/mcs51/features.h
1816         * device/include/asm/default/features.h,
1817         * device/include/asm/gbz80/features.h,
1818         * device/include/asm/z80/features.h: added empty _AUTOMEM
1819           and _STATMEM
1820         * device/include/asm/ds390/features.h,
1821         * device/include/asm/mcs51/features.h: added files with defines for
1822           _AUTOMEM and _STATMEM indicating automatic and static storage class
1823         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
1824         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
1825         * src/SDCCicode.c (geniCodeCast),
1826         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
1827         * src/SDCCloop.c (loopInduction): removed unused variable lr
1828         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
1829           to convertToFcall to include char modulo (RFE 1065037), added check
1830           if left operand is unsigned and use abs of literal value
1831         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
1832           as it doesn't work after conversion from peephole.def to peephole.rul
1833         * src/mcs51/gen.c (toBoolean): added check for size,
1834           (genModOneByte): optimized code for signed char modulo a literal
1835           power of 2 (thanks to Hubert Sack),
1836           (genRRC): removed unnecessary "clr c",
1837           (genRLC): replaced "add a,acc" with cheaper "rlc a"
1838         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
1839           jump optimization,
1840           swapped rules 256.c and 256.d,
1841           extended 256.d by using new multiple checks (thanks Erik),
1842           added rules 256.e and 256.f,
1843           updated rule 261.a and 261.b to new generated code
1844         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
1845
1846 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1847
1848         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
1849           induction related bugs, including first part of bug #1074377
1850
1851 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
1852
1853         * applied patch from bug-report #1076292,
1854         * applied patches for genAnd and Goto-optimizations for Raphael
1855         Neider,
1856         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
1857         dump a less iCode information,
1858         * src/pic16/device.h (pic16_options_t): added field debgen,
1859         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
1860         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
1861         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
1862         puclic,
1863         * (various functions): added macros FENTRY and FENTRY2 to functions,
1864         to emit function prologue,
1865         * (various functions): fixed indentation,
1866         * (genNearPointerGet): fixed loading of FSR0,
1867         * (genPackBits): applied patch from Raphael Neider to fix updating
1868         of FSR0 and touching only the modified bits,
1869         * src/pic16/genarith.c (various functions): added macros FENTRY to
1870         emit function prologue in comments,
1871         * src/pic16/pcode.h: added functions debugf2, debugf3,
1872         * src/pic16/ralloc.c: partial fix for packForPush caused
1873         segmentation fault,
1874
1875 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1876
1877         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
1878           <stsp AT users.sourceforge.net> with reversed byte order
1879         * support/regression/tests/rotate.c: added (ds390 skips some tests)
1880
1881 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1882
1883         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
1884           bug #1074377
1885         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
1886         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
1887
1888 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
1889
1890         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
1891
1892 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1893
1894         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
1895           conditions,
1896           (setFromConditionArgs): friendly operand parser for peephole rules,
1897           (operandBaseName, operandsNotRelated): new peephole condition
1898           "operandsNotRelated" -- similar to "operandsNotSame", but takes
1899           architecture specific register naming into account, handles n-way
1900           comparisons, and supports quoted literals
1901         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
1902
1903 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1904
1905         * src/mcs51/peeph.def: fixed bug #1076940
1906
1907 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
1908
1909         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
1910
1911 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1912
1913         Adding support for replacing ljmps with sjmps in jumptables
1914         generated for switch statements. For now you need to set the
1915         environment variable SDCC_SJMP_JUMPTABLE to enable this.
1916         Now 4 algorithms for mcs51 jumptable generation are used:
1917         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
1918         addresses loaded pc-relative for up to 112 cases and stack-pushing
1919         target addresses loaded with offset from dptr for up to 256 cases.
1920
1921         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
1922         * src/mcs51/main.c: adapted constants for switch table generation
1923         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
1924
1925 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
1926
1927         * device/lib/printf_large.c (_print_format): fixed bug 1073386
1928         * support/regression/tests/bug1057979.c: added test for bug 1073386
1929
1930 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
1931
1932         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
1933         compilers
1934
1935 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
1936
1937         * src/pic16/device.h,
1938         * src/pic16/genarith.c,
1939         * src/pic16/glue.c,
1940         * src/pic16/main.c,
1941         * src/pic16/pcode.c: applied patches #1068154 and #1070213
1942
1943 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
1944
1945         Large cummulative patch for pic16 port.
1946         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
1947         to call when a stack overflow occurs,
1948         * (malloc.h): added CVS Id tag,
1949         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
1950         variable,
1951         * added libc directory. The current version of LibC contains string
1952         functions, ctype functions and macros and some functions of the
1953         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
1954         be extensively tested in the future. Standard disclaimer here.
1955         Library is not automatically build yet. But one can build it by
1956         invoking 'make' inside the libc directory.
1957         * added ADC library under libio. Preliminary version yet.
1958
1959         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
1960         * src/pic16/gen.c (aopForRemat): asmop size is filled by
1961         aopForRemat() now and not by pic16_aopOp(),
1962         * (pic16_popGetTempReg): removed warning messgae when allocating
1963         temporary registers, its a buggy feature and will be removed,
1964         * (pic16_popGet): set register instance field in AOP_CRY,
1965         * (pic16_outBitC): fixed for results in size greater than 1,
1966         * (genUminusFloat): fixed for pic16, ported code from mcs51,
1967         * (pic16_storeForReturn): optimized return of 0,
1968         * (genCmp): experimental code for new genCmp which uses PIC18's
1969         special compare&skip instructions. Initial tests fail some times
1970         with variables grater than 1 byte in size, so new code is disabled,
1971         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
1972         a single bit,
1973         * (genCast): began a fix to optimize the casting of a bit to another
1974         bit, now assigning a bitfield to another bitfield will fail, sorry,
1975         * src/pic16/main.c: disabled the use of lr-support feature,
1976         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
1977         * added some function prototypes, added function _debugf prototype,
1978         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
1979         bits with offset (case PO_GPR_BIT),
1980         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
1981         command line,
1982         * (isBankInstruction): modified to return 0 for no banking instruction,
1983         and 1 for banking instruction,
1984         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
1985         caused stop processing pCodes after a inline assembly block,
1986         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
1987         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
1988         registers when it shouldn't,
1989         * src/pic16/ralloc.c (allocReg): add preliminary support for
1990         supporting a limited set of temporary registers,
1991
1992 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1993
1994         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
1995           genDataPointerSet): ensure assignments always copy in MSB to LSB
1996           order,
1997           (loadRegFromAop): recognize CLRH optimization,
1998           (genFunction): optimize RECEIVE iCodes in reentrant functions
1999
2000 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2001
2002         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
2003           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
2004           selected.
2005         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
2006         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
2007           contiguous with data
2008
2009 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2010
2011         * device/lib/_gptrget.c (_gptrget),
2012         * device/lib/_gptrgetc.c (_gptrgetc),
2013         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
2014           instead of sjmp to ret
2015         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
2016           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
2017
2018 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2019
2020         * .version: bumped version to 2.4.7
2021         * device/lib/_gptrget.c (_gptrget): is now _naked
2022         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
2023         * device/lib/_gptrput.c (_gptrput): is now _naked
2024         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
2025           (createFunction): fixed xstack
2026         * src/SDCCglue.c (emitMaps): set allocation required for bit area
2027         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
2028           or bit either,
2029           (geniCodeCritical): store original interrupt state in an iTemp bit
2030           var unless stack-auto
2031         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
2032         * src/SDCCmain.c (setIncludePath): added include/target to search path
2033         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
2034         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
2035           prototype,
2036           (processFuncArgs): put bit vars in bit area
2037         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
2038           unsaveRBank): fixed xstack,
2039           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
2040           (genFunction, genEndFunction): fixed xstack,
2041           (genAssign): optimization don't walk backwards through mem
2042         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
2043         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
2044         * support/regression/Makefile: also make library (for stack-auto) when
2045           making "all" and added "test-mcs51-xstack-auto"
2046         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
2047         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
2048         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
2049         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
2050         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
2051           make-library by MAKE_LIBRARY
2052         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
2053           regression tests for xstack
2054         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
2055         * support/regression/tests/critical.c: test for critical on mcs51
2056
2057 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2058
2059         * support/regression/ports/ucz80/spec.mk: use include and lib files from
2060           built version of sdcc instead of installed version
2061
2062 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2063
2064         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
2065         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
2066           vprintf.c now
2067         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
2068         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
2069           WARNING: remove device/lib/build/z80/printf.o by hand when
2070           updating from previous build!
2071         * device/lib/z80/printf.c: updated comment
2072         * support/regression/tests/bug1057979.c: test all ports now
2073         * support/regression/tests/bug1065458.c: file added
2074
2075 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2076
2077         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
2078           *_start and *_end symbols for static functions
2079
2080 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
2081
2082         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
2083           and search crt0.o in all library paths,
2084           (setIncludePath): proper handling of --nostdinc,
2085           (setLibPath): proper handling of --nostdlib
2086         * support/regression/Makefile,
2087         * support/regression/ports/ds390/spec.mk,
2088         * support/regression/ports/gbz80/spec.mk,
2089         * support/regression/ports/hc08/spec.mk,
2090         * support/regression/ports/mcs51/spec.mk,
2091         * support/regression/ports/mcs51-large/spec.mk,
2092         * support/regression/ports/mcs51-stack-auto/spec.mk,
2093         * support/regression/ports/z80/spec.mk: use include and lib files from
2094           built version of sdcc instead of installed version
2095         * doc/sdccman.lyx: fixed typo in --nostdinc
2096
2097 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
2098
2099         * src/pic/pcode.c,
2100         * src/pic/device.c,
2101         * src/pic/ralloc.c,
2102         * src/pic/gen.c : added support to generate code for struct bit fields.
2103
2104 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2105
2106         * as/xa51/xa_version.h,
2107         * device/include/errno.h,
2108         * device/include/regc515c.h,
2109         * device/lib/_itoa.c,
2110         * device/lib/_ltoa.c,
2111         * device/lib/ser_ir_cts_rts.c,
2112         * sim/ucsim/xa.src/glob.cc,
2113         * sim/ucsim/xa.src/inst_gen.cc,
2114         * sim/ucsim/xa.src/xa_bit.cc,
2115         * sim/ucsim/xa.src/xa_sfr.cc,
2116         * sim/ucsim/z80.src/inst_dd.cc,
2117         * sim/ucsim/z80.src/inst_fdcb.cc,
2118         * support/scripts/keil2sdcc.pl,
2119         * src/pic16/pic16.dsp,
2120         * src/pic16/pic16a.dsp: corrected cvs line endings
2121         * device/lib/printf_large.c: fixed bug 1057979
2122         * src/pic16/gen.c: fixed non-C standard code
2123         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
2124         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
2125         * support/regression/ports/mcs51/support.c: reload T1 asap
2126         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
2127           pdata use and clear idata startup behaviour
2128         * support/regression/tests/bug1057979.c: added
2129
2130 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
2131
2132         * device/examples/ds390/ow390/ad26.h,
2133         * device/examples/ds390/ow390/cnt1d.h,
2134         * device/examples/ds390/ow390/crcutil.c,
2135         * device/examples/ds390/ow390/ownet.h,
2136         * device/examples/ds390/ow390/owsesu.c,
2137         * device/examples/ds390/ow390/swt12.h,
2138         * device/examples/ds390/ow390/swtoper.c,
2139         * device/examples/ds390/ow390/temp10.h,
2140         * device/examples/ds390/ow390/thermodl.c,
2141         * device/examples/ds390/tinitalk/tinitalk.dsp,
2142         * device/examples/ds390/tinitalk/tinitalk.dsw,
2143         * device/examples/mcs51/clock/hw.h,
2144         * device/examples/mcs51/simple2/go.bat,
2145         * device/examples/serialcomm/windows/serial.h,
2146         * device/examples/xa51/dummy.c,
2147         * device/examples/xa51/hello.c,
2148         * device/include/80c51xa.h,
2149         * device/include/at89x051.h: corrected cvs line endings
2150
2151 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
2152
2153         * src/pic16/main.c (options): added command line --gstack, to trace
2154         stack over/under flows,
2155         * added pragma 'wparam' to allow passing first byte of function
2156         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
2157         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
2158         call to __gstack_test function and sets up the symbol as extern,
2159         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
2160         * popaop): added call to pic16_testStackOverflow,
2161         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
2162         wparamList list,
2163         * (genCall, genPcall): now all parameters are passed via stack
2164         except in functions that are pass to wparam pragma in which WREG is
2165         used too,
2166         * (genPcall): REENTRANT flag is checked to see if variable prototype
2167         contains reentrant keyword, don't call a non-reentrant function, via
2168         a reentrant function pointer or vice versa, functions are never
2169         passed via WREG,
2170         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
2171         D.Winkler,
2172         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
2173         SIGSEGV when accessing a NULL register stucture,
2174         * (pic16_printGPointerType): modified to handle UPPER modifier for
2175         function initializers, changed prototype of function to simpler one,
2176         * (pic16_printIvalFuncPtr): check to see if function is already
2177         added in externs list,
2178         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
2179         optimized a move from W to SFR with a move to the same register
2180         later after a CALL,
2181         * device/lib/pic16/debug: NEW directory, contains debug features
2182         which are enabled when linking with libdebug.lib, currently command
2183         line option --gstack enables stack pointer tracing for over/under
2184         flow, corresponding sources are in debug/gstack
2185
2186 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
2187
2188         * doc/sdccman.lyx: updated SDCC version,
2189         * (PIC16 port): update list of command line options,
2190         * src/pic16/device.h (structure pic16_options_t): added field gstack
2191         to enable stack overflow tracing on push/pops,
2192         * src/pic16/device.c (statistics structure): added statistics
2193         structure,
2194         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
2195         pic16_dump_int_registers): increase statistics counters for each
2196         * variable which is encountered
2197         * (pic16_dump_usection): emit each .udata variable to its own udata
2198         section,
2199         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
2200         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
2201         parameters via stack, otherwise use old scheme,
2202         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
2203         assembler output file,
2204         * src/pic16/main.c: added command line options --gstack to enable
2205         push/pop tracing for stack overflow,
2206         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
2207         instructions): added size of each instruction,
2208         * (pic16_countInstruction): estimate size of instructions in
2209         the_pFile list, inline assembly blocks are not counted,
2210         * (pic16_FixRegisterBanking): trace previous register usage, when
2211         banksel optimizations is greater than 0, don't emit a redudant
2212         banksel directive,
2213
2214 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
2215
2216         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
2217         * src/pic16/ralloc.c : applied same fix for pic16.
2218         * src/pic/gen.c : tidied it up a little.
2219
2220 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2221
2222         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
2223         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
2224
2225 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2226
2227         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
2228
2229 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2230
2231         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
2232         non-reentrant function __modsint in the interrupt function (thus
2233         corrupting math operations during serial I/O)
2234         * device/lib/ser_ir.c: as above, changed buffersize
2235         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
2236         256.c,d for zeroing
2237         * doc/Makefile: added option -t for rsync
2238
2239 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2240
2241         * src/SDCCast.h (struct ast),
2242         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
2243
2244 2004-10-20 Borut Razem <borut.razem AT siol.net>
2245
2246         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
2247         package
2248
2249 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
2250
2251         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
2252         makefile targets,
2253         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
2254         support functions to replace long sequences of MOVFF's from access
2255         bank registers to stack and vice versa,
2256         * src/pic16/device.h: added new field opt_flags, where optimization
2257         flags can be set to enable certain features,
2258         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
2259         * pBlock, (genFunction, genEndFunction): surroung loop for
2260         saving/loading used registers in stack with PC_INFO pCodes,
2261         INF_LREGS. Code in between can then be optimized by pCode optimizer
2262         to support function calls,
2263         * (genDataPointerSet): fixed bug which loaded float fields in
2264         structures with corrupt data,
2265         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
2266         in a standard way debug info on stderr. Feature used for developing
2267         and debugging only,
2268         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
2269         obsolete chunks of code,
2270         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
2271         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
2272         * pic16/src/pcode.c (pic16_newpCodeInfo,
2273         * (pic16_newpCodeOpLocalRegs),
2274         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
2275         feature,
2276         * (pic16_pCodeConstString): printing of the initial value of a
2277         symbol as a comment is inhibited since parsing was already done by
2278         copyStr and output is corrupt,
2279         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
2280
2281 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2282
2283         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
2284
2285 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
2286
2287         * as/mcs51/lkarea.c: removed old K&R style,
2288           (lnksect): changed check on boundary error,
2289           (lnksect2): changed check on boundary error,
2290           (lnksect2): extend XSTK to end of page if size = 1
2291         * as/mcs51/lkmain.c: removed old K&R style,
2292           (Areas51): create l_IRAM symbol
2293         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
2294         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
2295           model-mcs51-stack-auto, added model-mcs51-xstack-auto
2296         * device/lib/_mullong.c: added version to be compiled with xstack
2297         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
2298         * device/lib/mcs51/crtxclear.asm: clear pdata as well
2299         * device/lib/mcs51/crtxstack.asm: fixed comment
2300         * src/SDCCglue.c: maxInterrupts defaults to 0,
2301           (emitMaps): added pdata,
2302           (createInterruptVect): (re)moved default,
2303           (glue): added pdata,
2304           (glue): moved __start__xstack to XSTK with default size 1
2305         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
2306           and options.float_rent when options.stackAuto is set,
2307           (linkEdit): only write XDATA_NAME if provided on command line
2308         * src/SDCCmem.h,
2309         * src/SDCCmem.c: added pdata
2310         * src/port.h: added pdata_name to PORT
2311         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
2312           (saveRegisters, unsaveRegisters): removed usage of B,
2313           (genMinus): fixed accumulator clash,
2314           (genJumpTab): added comment, this needs another look
2315         * src/mcs51/gen.c: added check for "B in use" paranoia,
2316           added pushB() and popB()
2317         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
2318           chance
2319         * src/avr/main.c,
2320         * src/ds390/main.c,
2321         * src/hc08/main.c,
2322         * src/mcs51/main.c,
2323         * src/pic/main.c,
2324         * src/pic16/main.c,
2325         * src/xa51/main.c,
2326         * src/z80/main.c: (reset_regparms) made void parameter explicit and
2327           added PSEG (PAG,XDATA) or NULL to port specifier
2328         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
2329         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
2330           (_mcs51_genInitStartup): removed __start__xstack equ,
2331           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
2332         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
2333         * src/z80/gen.c (_rleAppend): fixed warnings
2334         * support/regression/tests/zeropad.c: added pdata test
2335         * .version: bumped to 2.4.6
2336
2337 2004-10-17 Borut Razem <borut.razem AT siol.net>
2338
2339         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
2340         as a part of nightly build
2341
2342 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
2343
2344         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
2345         WREG holds the first byte function parameters,
2346         * (aopForSym): take special case for symbols which are in FARSPACE
2347         but in CODESPACE too,
2348         * (assignResultValue): modified to take into account _G.useWreg,
2349         * (genCall): don't use wreg for parameter passing when function is
2350         declared as reentrant, too, added optimization INCF to stack
2351         pointer when stack parameter count is 1,
2352         * (genFunction, genEndFunction): refurnished and fixed to not using
2353         wreg for passing parameters when function has varargs or is
2354         reentrant, fixed bug with symbol name compare for generating
2355         functions in absolute address,
2356         * (pic16_storeForReturn): refurnished,
2357         * (genCmp): began writing a new version of the function, not ready
2358         yet, therefore it is disabled,
2359         * (genAssign): do not read code memory when assigning a function to
2360         a pointer function,
2361         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
2362         array of characters, not pointer,
2363         * (pic16initialComments): in debug mode emit an .ident directive for
2364         the assembler,
2365         * (_process_pragma): emit a new warning type (internal to pic16)
2366         when setting stack to default length, emit a similar warning when
2367         placing a function at absolute address and address is not word aligned
2368         * (_pic16_parseOptions): added 'return TRUE' statement,
2369         * (_pic16_linkEdit): if compiling a source, then add the source's
2370         file object, first in the list of objects to link,
2371
2372 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
2373
2374         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
2375         * src/pic/main.c : removed VC warning.
2376         * src/pic/gen.c : changed comment.
2377
2378 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
2379
2380         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
2381         reference to a deprecated symbol _GPTRREG was causing failure to
2382         link. Thanks G. M. Gallant for the info.
2383
2384 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
2385
2386         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
2387         comments for Bugs item #954788.
2388
2389 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
2390
2391         * src/pic16/device.c (pic16_dump_gsection,
2392         * pic16_groupRegistersInSection): handle symbols declared to be in
2393         access bank differently,
2394         * src/pic16/gen.c (struct _G): added field resDirect,
2395         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
2396         send values read from stack directly to result and don't allocate
2397         temporary values,
2398         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
2399         same registers,
2400         * (pic16_sameRegsOfs): NEW,
2401         * (freeAsmop): if _G.resDirect is set then do not mark registers as
2402         free because they were not allocated from temporary pool,
2403         * pic16_popRegFromString): workaround to fix a problem with
2404         allocating variables twice or never,
2405         * (genGenPointerGet): using PRODL instead of FSR0H,
2406         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
2407         instead of FSR0H,
2408         * (genAssign): take advantage of the _G.resDirect flag,
2409         * (genCast): around line 11844, use mov2f instead of directly
2410         MOVFF'ing between operands to account for literal values,
2411         * src/pic16/genutils.c: some new debug functions for gpsim have been
2412         added,
2413         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
2414         float with integer part only,
2415         * src/pic16/main.c (_process_pragma): handle pragma udata access to
2416         place variables in access bank
2417         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
2418         updated sources to reflect recent changes in gen.c
2419
2420 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
2421
2422         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
2423         sources that searched for headers in installation path, now the
2424         device/include/pic16 is used,
2425         * src/pic16/glue.c (pic16glue),
2426         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
2427         .line directives if not in debug mode, this suppresses assembler's
2428         warnings for ignored directives
2429
2430 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2431
2432         * src/port.h: made reset_regparms prototype void parameter explicit.
2433         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
2434         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
2435         * doc/sdccman.lyx: documented warning disabling and how to use
2436           printf_large to make it print floats.
2437         * device/include/stdbool.h: NEW
2438         * device/lib/_atof.c,
2439         * device/lib/_divuint.c,
2440         * device/lib/_divulong.c,
2441         * device/lib/expf.c,
2442         * device/lib/printf_large.c,
2443         * device/lib/sincosf.c,
2444         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
2445         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
2446           a completely reentrant lib.
2447
2448 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
2449
2450         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
2451         * device/include/pic16/stdio.h: fixed bug with colon
2452
2453 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
2454
2455         * device/include/pic16/stdio.h,
2456         * device/include/pic16/stdlib.h,
2457         * device/include/pic16/math.h: NEW
2458         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
2459         declared as _naked to reduce overhead
2460         * device/lib/Makefile.in (target port-specific-objects-pic16):
2461         changed * to *.* so to ignore the CVS directory,
2462         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
2463         stacked variables back in stack,
2464         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
2465         corruption
2466
2467 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
2468
2469         * .version: bumped version number to 2.4.5
2470         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
2471         * support/Util/SDCCerr.c (messages structure): added entry for
2472         W_POSSBUG2
2473
2474         Large cumulative patch for pic16 port and libraries.
2475         * device/include/pic16/sdcc-lib.h,
2476         * device/include/pic16/stdarg.h,
2477         * device/include/asm/pic16/features.h,
2478         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
2479         * device/include/pic16/float.h: changes reentrant keyword with
2480         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
2481         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
2482         updated target build-libraries to include objects from gptr,
2483         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
2484         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
2485         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
2486         all function headings,
2487         * src/SDCCmain.c: added global parameter userIncDirsSet,
2488         * (parseCmdLine): when option -I is encountered add directory to
2489         userIncDirsSet too,
2490         * src/version.awk: added space between control and long,
2491         * src/pic16/NOTES: added some notes for the port,
2492         * src/pic16/gen.c: added prototype for mov2fp function,
2493         * (fReturnpic16[]): properly named return value registers,
2494         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
2495         * (aopForSym): added code to handle symbols with onStack flag set,
2496         symbols onStack are allocated PTRSIZE bytes,
2497         * (aopFreeAsmop): handles special case where asmops are stack objects,
2498         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
2499         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
2500         added argument lock to trace flaws in allocating temporary registers
2501         when developing port,
2502         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
2503         * (pic16_popRegFromString): reenabled allocating a direct register
2504         from string,
2505         * (assignResultValue): various beautifications,
2506         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
2507         referenced function argument,
2508         * (genIpush): reenabled to allow stacked arguments, handles only
2509         ic->parmPush iCodes,
2510         * (genCall, genPcall): major changes to allow for variable argument
2511         functions, fixed a bug with falsely restoring stack pointer after
2512         returning from call,
2513         * (genFunction): pending code for critical function,
2514         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
2515         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
2516         * (genNearPointerGet): fixed bug with indirect reading, was always
2517         reading from INDF0
2518         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
2519         pointers,
2520         * (genAddrOf): rewrote code to take address of a stacked function parameter
2521         * (genCast): fixed casting to generic pointer type,
2522         * src/pic16/gen.h: added AOP_STA,
2523         * (struct asmop): added field stk,
2524         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
2525         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
2526         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
2527         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
2528         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
2529         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
2530         generic pointers,
2531         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
2532         and library paths,
2533         * (pic16_port structure): generic pointer size is set to 3,
2534         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
2535         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
2536         compiler warning,
2537         * src/pic16/ralloc.c (allocReg): prevent allocating register when
2538         operand is an iTemp,
2539
2540 2004-09-24 Martin Helmling <mh AT octo-soft.de>
2541
2542         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
2543         * debugger/mcs51/simi.c: addapt new syntax of s51
2544
2545 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
2546
2547         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
2548         * src/pic16/pcode.c: commented out some calls to free() in order to
2549         fix bug #989576,
2550
2551 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2552
2553         * src/SDCCicode.h,
2554         * src/SDCCicode.c (isiCodeInFunctionCall),
2555         * src/avr/ralloc.c (selectSpil),
2556         * src/pic/ralloc.c (selectSpil),
2557         * src/pic16/ralloc.c (selectSpil),
2558         * src/ds390/ralloc.c (selectSpil),
2559         * src/hc08/ralloc.c (selectSpil),
2560         * src/xa51/ralloc.c (selectSpil),
2561         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
2562         stack in the middle of a function call sequence (fixes bug #1020268)
2563         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
2564         costs associated with the minimum switch case.
2565
2566 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2567
2568         * src/SDCC.lex: fixed bug #1030549
2569
2570 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2571
2572         * src/SDCCcse.h (struct cseDef),
2573         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
2574         over a function call if the CSE is derived from a symbol whose
2575         address has been taken (fixes bug #1029883)
2576         * support/regression/tests/bug-1029883: a new regression test for
2577         this bug
2578
2579 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2580
2581         * src/hc08/gen.c (emitinline): fixed bug #1029778
2582         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
2583         to a cast object is no longer a syntax error ("fixes" bug #1030006,
2584         and starts toward RFE #905167)
2585
2586 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
2587
2588         * src/pic16/gen.c (mov2f): New function to move an operand to
2589         another without considering if it is a literal or a register,
2590         * (pic16_sameRegs): don't check if they are both AOP_REG,
2591         * (AccRsh): removed andmask=0 lines,
2592         * (genLeftShift): duplicated to be improved in future versions,
2593         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
2594         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
2595         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
2596         * (pic16initMnemonics): added initialization for POC_INFSNZW,
2597         * (insertBankSwitch): fixed inserting banksel directives algorithm
2598         for instructions that follow a skip instruction, this fixes a report
2599         for broken subtraction code generation,
2600         * src/pic16/ralloc.c (deassignLRs): do not free register if current
2601         iCode is a left op, just in case result and right share the same
2602         registers
2603
2604 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2605
2606         * src/hc08/main.c,
2607         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
2608         preservation of HX
2609         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
2610         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
2611         on 2004-09-12; it was buggy
2612
2613 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
2614
2615         * src/SDCCsymt.h: removed RESULT_CHECK
2616         * src/SDCCast.c,
2617         * src/SDCCglue.c,
2618         * src/SDCCval.c,
2619         * src/pic/glue.c,
2620         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
2621
2622 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
2623
2624         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
2625         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
2626         configuration values no more rejected by compiler, they are assigned
2627         to configuration registers with a warning message instead,
2628         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
2629         the for-loop so last conf register is emitted too,
2630         * (_pic16_initPaths): link library libsdcc.lib by default,
2631         * (_hasNativeMulFor): modified test for multiplication according to
2632         Raphael Neider's remarks. Integer multiplication is also done with
2633         support functions,
2634         * device/include/pic16/pic18fregs.h: corrected type error in while
2635         testing and including 18f6720 header file
2636
2637 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
2638
2639         * src/pic16/device.h (pic16_options): removed field use_crt,
2640         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
2641         until an optimization to handle single bits is added,
2642         * (pic16_loadFSR0): moved before genUnpackBits,
2643         * (genAnd): some white lines removed,
2644         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
2645         leave_reset flags in pic16_options when using crt modules,
2646
2647 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
2648
2649         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
2650           for bugs 898889 & 979599. Also used some safer print instructions.
2651
2652 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
2653
2654         * src/pic16/device.h (pic16_options_t): added field use_crt,
2655         crt_name, no_crt,
2656         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
2657         catch a probable future bug,
2658         * src/pic16/gen.c: aopIdx function commented out,
2659         * (genAssign): commented out old code which used aopIdx,
2660         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
2661         code, added if conditionals to take into account the --use-crt
2662         command line options,
2663         * src/pic16/main.c (pic16_optionsTable): added new command line
2664         options, --use-crt= and --no-crt,
2665         * (_pic16_linkEdit): now the proper crt object is added in the
2666         linker command line except than when --no-crt is specified,
2667         * src/pic16/pcode.c,
2668         * src/pic16/pcode.h: added some structures and functions for a new
2669         optimization scheme to compansate for instruction overhead between
2670         same iCodes, this scheme is currently under development and is not
2671         working in any way,
2672         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
2673         to && operator,
2674         * device/lib/pic16/startup/crt0i.c,
2675         * device/lib/pic16/startup/crt0iz.c: added global char variable
2676         __uflags to force the generation of an idata section
2677
2678 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
2679
2680         * doc/Makefile,
2681         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
2682         * doc/sdccman.lyx: updated sdcc version to 2.4.4
2683
2684 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2685
2686         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
2687         Frieder) and clarified the default code optimization mode
2688
2689 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2690
2691         * src/SDCC.lex (doPragma, process_pragma),
2692         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
2693         "opt_code_size", and "opt_code_balanced"
2694         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
2695         regrouped options by category, added support for category headers
2696         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
2697         and "--opt-code-size"
2698         * doc/sdccman.lyx: documented these new options and pragmas
2699         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
2700         preference into account
2701
2702 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2703
2704         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
2705           geniCodePreDec): Fixed bug 904237 by generating a warning
2706         * src/SDCCerr.h,
2707         * src/SDCCerr.c: added warning W_SIZEOF_VOID
2708
2709 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
2710
2711         * src/pic/device.c : When no max ram set validate full memory range.
2712         * src/pic/pcode.c,
2713         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
2714
2715 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2716
2717         * device/lib/_gptrget.c,
2718         * device/lib/_gptrput.c: updated comment
2719         * device/lib/calloc.c,
2720         * device/lib/free.c,
2721         * device/lib/malloc.c,
2722         * device/lib/realloc.c: added LGPL, made them reentrant-safe
2723         * src/SDCCcse.c (cseBBlock),
2724         * src/SDCCicode.c (printOperand, geniCodeArray),
2725         * src/SDCCicode.h (struct operand): fixed bug 868103
2726         * support/regression/tests/bug-868103.c: added
2727         * src/SDCCast.c (searchLitOp),
2728         * src/SDCCcse.h (struct cseDef),
2729         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
2730         * src/SDCCicode.h (struct operand),
2731         * src/SDCCsymt.h (struct sym_link),
2732         * src/avr/gen.c (hasInc),
2733         * src/ds390/gen.c (hasInc),
2734         * src/hc08/gen.c (genPlusIncr, hasInc),
2735         * src/mcs51/gen.c (hasInc),
2736         * src/pic16/glue.c (pic16_printIvalChar),
2737         * src/pic16/ralloc.c (regWithIdx),
2738         * src/xa51/gen.c (hasInc) : removed warnings
2739         * src/SDCCast.c (createBlock): added comment ???
2740         * src/hc08/ralloc.c: updated comments
2741
2742 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2743
2744         * doc/sdccman.lyx: updated section on switch statements, added
2745         section about semaphore locking
2746         * doc/Makefile: added option -info for latex2html
2747         * device/lib/_gptrget.c,
2748         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
2749
2750 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
2751
2752         * src/pic/device.h,
2753         * src/pic/device.c,
2754         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
2755          maxram is less than 0x100.
2756
2757 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
2758
2759         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
2760
2761 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2762
2763         * src/port.h,
2764         * src/mcs51/main.c,
2765         * src/ds390/main.c,
2766         * src/z80/main.c,
2767         * src/hc08/main.c,
2768         * src/pic/main.c,
2769         * src/pic16/main.c,
2770         * src/avr/main.c,
2771         * src/xa51/main.c
2772         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
2773         a jump table is the best form for a switch statement, including
2774         automatic insertion of missing cases to make the case range
2775         continuous. Developed in collaboration with Frieder Ferlemann.
2776
2777 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2778
2779         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
2780         accumulator result if it needs sign extension
2781
2782 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2783
2784         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
2785
2786 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2787
2788         * device/lib/gbz80/printf.c,
2789         * device/lib/z80/printf.c: removed define for NULL
2790
2791 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2792
2793         * as/xa51/xa_link.c,
2794         * device/examples/ds390/ow390/ad26.c,
2795         * device/examples/ds390/ow390/cnt1d.c,
2796         * device/examples/ds390/ow390/counter.c,
2797         * device/examples/ds390/ow390/ds2480.h,
2798         * device/examples/ds390/ow390/ds2480ut.c,
2799         * device/examples/ds390/ow390/findtype.c,
2800         * device/examples/ds390/ow390/gethumd.c,
2801         * device/examples/ds390/ow390/owllu.c,
2802         * device/examples/ds390/ow390/ownetu.c,
2803         * device/examples/ds390/ow390/swt12.c,
2804         * device/examples/ds390/ow390/swtloop.c,
2805         * device/examples/ds390/ow390/temp.c,
2806         * device/examples/ds390/ow390/temp10.c,
2807         * device/examples/ds390/ow390/thermo21.c,
2808         * device/examples/ds390/ow390/tinilnk.c,
2809         * device/examples/ds390/ow390/tstfind.c,
2810         * device/examples/serialcomm/windows/serial.cpp,
2811         * device/examples/serialcomm/windows/test_serialcomm.cpp,
2812         * device/include/reg51.h: fixed line endings for cvs
2813
2814 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2815
2816         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
2817         packRegsForAccUse, packRegisters): new accumulator register
2818         packing algorithm
2819         * support/regression/ports/hc08/support.c (_putchar): suppress
2820         warning of unused variable
2821         * src/SDCCicode.c: added SWAP entry to codeTable
2822
2823 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
2824
2825         * device/lib/sprintf.c: forgot to add this file before previous commit
2826
2827 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
2828
2829         * src/pic16/gen.c (genPackBits): added operand right in function
2830         parameters, load result directly if p_type is POINTER (that is
2831         called by genNearPointerSet)
2832         * (genUnPackBits): added operand left in function parameters,
2833         * (genNearPointerGet, genNearPointerSet): prevent the loading of
2834         FSR0 if accessing bitfields,
2835
2836 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
2837
2838         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
2839           _print_format; updated printf, sprintf, vsprintf
2840         * device/include/asm/default/features.h: corrected comment/define
2841         * device/lib/Makefile.in: added sprintf.c
2842         * device/lib/libsdcc.lib: added sprintf module
2843         * device/lib/printf_large.c,
2844         * device/lib/vprintf.c,
2845         * device/lib/sprintf.c: totally refactored printf_large and vprintf
2846           into these 3 files
2847         * support/regression/Makefile: changed ALL_PORTS into a usefull default
2848         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
2849         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
2850           hc08 test
2851         * support/regression/tests/zeropad.c: define idata as data for hc08
2852
2853 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2854
2855         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
2856         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
2857         labels are referenced at least once (even if a reference is not found)
2858         * src/hc08/gen.c (emitcode): set isComment flag for comments
2859         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
2860         loads), rules 6a..6b (optimize jumps to return)
2861
2862 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2863
2864         * device/lib/acosf.c (acosf),
2865         * device/lib/asinf.c (asinf),
2866         * device/lib/atanf.c (atanf),
2867         * device/lib/ceilf.c (ceilf),
2868         * device/lib/cosf.c (cosf),
2869         * device/lib/coshf.c (coshf),
2870         * device/lib/cotf.c (cotf),
2871         * device/lib/fabsf.c (fabsf),
2872         * device/lib/floorf.c (floorf),
2873         * device/lib/log10f.c (log10f),
2874         * device/lib/logf.c (logf),
2875         * device/lib/sinf.c (sinf),
2876         * device/lib/sinhf.c (sinhf),
2877         * device/lib/sqrtf.c (sqrtf),
2878         * device/lib/tanf.c (tanf),
2879         * device/lib/tanhf.c (tanhf),
2880         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
2881         replaced all instances of "reentrant" in the library functions
2882         defined in math.h with this macro.
2883         * support/regression/tests/float_trans.c: reenabled test for hc08
2884
2885 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
2886
2887         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
2888         erroneously deleted
2889
2890 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2891
2892         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
2893         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
2894         multi-byte volatile operands are used
2895         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
2896         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
2897         initialization to area GSINIT0 so that it would always precede
2898         any static initializers in GSINIT
2899         * support/regression/tests/zeropad.c: fixed idata define for hc08
2900         * support/regression/tests/bug-927659.c,
2901         * support/regression/tests/float_trans.c: disabled tests for hc08
2902         pending missing library routines
2903         * .version: increased version number to 2.4.4 - hc08 port now passes
2904         regression tests
2905
2906
2907 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
2908
2909         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
2910         * Makefile.common.in,
2911         * as/Makefile,
2912         * as/hc08/Makefile.in,
2913         * as/mcs51/Makefile.in,
2914         * as/z80/Makefile.in,
2915         * debugger/mcs51/Makefile.in,
2916         * device/include/Makefile.in,
2917         * device/lib/Makefile.in,
2918         * doc/Makefile,
2919         * link/Makefile,
2920         * link/z80/Makefile.in,
2921         * packihx/Makefile.in,
2922         * sim/ucsim/main_in.mk,
2923         * sim/ucsim/avr.src/Makefile.in,
2924         * sim/ucsim/doc/Makefile.in,
2925         * sim/ucsim/gui.src/serio.src/Makefile.in,
2926         * sim/ucsim/hc08.src/Makefile.in,
2927         * sim/ucsim/s51.src/Makefile.in,
2928         * sim/ucsim/xa.src/Makefile.in,
2929         * sim/ucsim/z80.src/Makefile.in,
2930         * src/Makefile.in,
2931         * support/cpp2/Makefile.in,
2932         * support/librarian/Makefile,
2933         * support/makebin/Makefile: added DESTDIR to the install path proposed
2934         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
2935         * doc/sdccman.lyx: added DESTDIR documentation
2936
2937 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
2938
2939         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
2940         instruction for interrupt handlers, use fast returns when returning
2941         from high priority interrupts
2942
2943 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2944
2945         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
2946         code generation
2947         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
2948         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
2949         bugs, ported much of Bernhard's code from mcs51
2950         * src/mcs51/gen.c (genSend),
2951         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
2952         than one when calling a reentrant function
2953         * device/lib/_mullong.c: defined an alternate struct layout for big
2954         endian ports (hc08)
2955
2956 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2957
2958         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
2959         test
2960
2961 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2962
2963         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
2964         are sane and complete before asking the port its prefered parameter
2965         passing method (fixes bug #1017633)
2966         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
2967         and _ret3
2968
2969 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2970
2971         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
2972         problem in bitfields >= 8 bits.
2973
2974 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
2975
2976         * src/SDCCsymt.c: undid changes that were not meant to be committed
2977
2978 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
2979
2980         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
2981
2982 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
2983
2984         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
2985           copied and wrong bit got inverted
2986
2987 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2988
2989         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
2990         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
2991         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
2992         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
2993         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
2994         assignments to bitfields at known addresses
2995         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
2996         reads from bitfields at known addresses
2997         * src/hc08/ralloc.c (packRegisters),
2998         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
2999         genhc08Code): optimize pointer get values used as conditionals
3000         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
3001         and branch
3002
3003 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3004
3005         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
3006         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
3007         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
3008         as conditionals
3009
3010 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3011
3012         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
3013
3014 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3015
3016         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
3017         related problems
3018
3019 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
3020
3021         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
3022
3023 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3024
3025         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
3026         mcs51 port
3027
3028 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3029
3030         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
3031
3032 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3033
3034         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
3035         cases use more compact code.
3036
3037 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
3038
3039         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
3040
3041 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3042
3043         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
3044
3045 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3046
3047         * src/SDCCsymt.h,
3048         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
3049         parameter of changePointer() from symbol* to sym_link*
3050         * src/SDCCast.c (decorateType): call changePointer() for CAST op
3051         * src/SDCCsymt.c (compareType): void* type is castable to other
3052         pointers, but not necesarily an exact match.
3053         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
3054         is no longer blindly treated as an exact match.
3055         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
3056
3057 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
3058
3059         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
3060
3061 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
3062
3063         * src/pic/gen.c,
3064         * src/pic/pcode.c,
3065         * src/pic/ralloc.h,
3066         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
3067
3068 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
3069
3070         * src/pic/device.c,
3071         * src/pic/device.h,
3072         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
3073
3074 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3075
3076         * src/mcs51/gen.c (emitcode): fixed bug #992819
3077
3078 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
3079
3080         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
3081           there's no need to make it worse
3082
3083 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3084
3085         * src/mcs51/ralloc.c (deassignLR),
3086         * src/ds390/ralloc.c (deassignLR),
3087         * src/hc08/ralloc.c (deassignLR),
3088         * src/z80/ralloc.c (deassignLR),
3089         * src/pic/ralloc.c (deassignLR),
3090         * src/pic16/ralloc.c (deassignLR),
3091         * src/avr/ralloc.c (deassignLR),
3092         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
3093         rlivePoint): fixed another part of bug #971834
3094
3095 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3096
3097         * src/z80/main.c: enabled "critical" keyword
3098         * src/z80/mappings.i,
3099         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
3100         functions (fixes bug #979646)
3101         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
3102
3103 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3104
3105         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
3106           such as c:\mydir.
3107
3108 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
3109
3110         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
3111           doesn't disable too much optimizations
3112
3113 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3114
3115         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
3116
3117 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
3118
3119         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
3120
3121 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3122
3123         * src/pic/gen.c tidied up tabs
3124         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
3125         * src/pic/main.c tidied up tabs
3126         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
3127         * src/pic/pcoderegs.c tidied up tabs
3128         * src/pic/ralloc.c tidied up tabs
3129
3130 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
3131
3132         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
3133         to S_FIXED for pic16 port and when symbol is not in level 0,
3134         allocate for S_REGISTER storage class and pic16 port, too,
3135         * src/pic16/device.h: prototype for checkSym,
3136         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
3137         * (pic16_assignConfigWordValue): test the value and the mask to
3138         validate that the value is suitable for the configuration word,
3139         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
3140         collect extern declared symbols, don't emit symbol twice, check
3141         first if symbol is in publics set first,
3142         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
3143         * added command line '--fstack' which enables an experimental
3144         feature for stack access, too buggy to be used yet...
3145         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
3146         * (pic16_allocDirReg): when register has storage class S_REGISTER
3147         allocate in pic16_dynAccessRegs,
3148         * device/include/pic16/pic18f????.h: modified configuration word
3149         naming convention, words started as CONFIG0H but should be CONFIG1H
3150
3151 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3152
3153         * device/include/mcs51reg.h: fixed bug 970993
3154
3155 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
3156
3157         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
3158         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
3159         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
3160         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
3161         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
3162         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
3163           error/warning numbers,
3164           added function setWarningDisabled()
3165         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
3166         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
3167           _memcmp.c _memmove.c calloc.c realloc.c free.c
3168         * support/regression/tests/malloc.c: added tests for new functionality
3169         * support/regression/tests/zeropad.c: added tests for truncated initializers
3170           and initialized char arrays starting with '\x0'
3171         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
3172
3173 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
3174
3175         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
3176
3177 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3178
3179         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
3180         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
3181         peephole 177.e. Thanks to anonymous
3182
3183 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
3184
3185         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
3186         function isn't used in the source but referenced as a
3187         variable initializer then declare it as extern in .asm file
3188
3189 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
3190
3191         * .version: increased version number to 2.4.3
3192
3193         Adding version extension according to ChangeLog CVS revision
3194         * src/Makefile.in (target all): added dependency 'version.h'
3195         * (rule version.h): added rule to create version.h from ChangeLog,
3196         * (rule dep): added dependency version.h,
3197         * src/version.awk: AWK script to create version.h
3198         * src/SDCCdwarf2.c (dwWriteModule),
3199         * src/SDCCglue.c (initialComments),
3200         * src/SDCCmain.c (printVersionInfo): modified to write after
3201         version string the version extension number,
3202         * src/SDCCutil.c: included "version.h"
3203         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
3204         number,
3205         * src/SDCCutil.h: added prototype for getBuildNumber
3206
3207         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
3208         includeDirsSet, too,
3209         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
3210         const char [] is found in function prototype...
3211
3212         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
3213         moving to WREG with source is already in WREG,
3214         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
3215         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
3216         * (aopForSym): stack'ed symbols are partially supported, added
3217         if-clause to support symbols in FARSPACE,
3218         * (sameRegs): added test for AOP_ACC to see if registers are same,
3219         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
3220         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
3221         * (pic16_popRegFromString): will not allocate a new register if it
3222         doesn't find one by name, bug may have introduced...
3223         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
3224         * (genIpush): revived to use pic16 port's stack,
3225         * (genAddrOf): added incomplete case for stack'ed operand,
3226         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
3227         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
3228         can handle multibyte operands,
3229         * src/pic16/glue.c (pic16_printIval*): some debug info added,
3230         * (pic16initialComments): added message for MPLAB compatibility
3231         mode enabled,
3232         * src/pic16/main.h: prototype for pic16_mplab_comp,
3233         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
3234         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
3235         * (_pic16_linkEdit): NEW, handles link stage, transferred here
3236         because of increased complexity of procedure,
3237         * (_process_pragma): stack pragma changed to format 'stack pos len',
3238         emit symbol '_stack_end' to conform with gplink,
3239         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
3240         to search for register,
3241         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
3242         PO_GPR_REGISTER,
3243         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
3244         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
3245         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
3246         case for PO_GPR_REGISTER,
3247         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
3248         dies, the new era is ahead !...
3249         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
3250         pic16_dynInternalRegs,
3251         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
3252         * (pic16_allocDirReg): minor optimizations and bug fixes,
3253         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
3254
3255         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
3256         load stack and frame pointer with address of 'stack_end' symbol
3257
3258 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
3259
3260         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
3261         without source code but only variable initializers
3262
3263 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
3264
3265         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
3266         external are not declared as extern to reduce overhead while linking
3267
3268 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
3269
3270         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
3271
3272 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
3273
3274         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
3275           Yee Keat for the patch
3276         * src/SDCCast.c (decorateType): fixed bug #979599
3277         * src/ds390/gen.h: removed local fReturnSizeDS390
3278         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
3279         * src/ds390/gen.c (genAnd, genOr, genXor),
3280         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
3281
3282 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
3283
3284         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
3285         add relFilesSet to $3, manipulate $2 to handle linking of object
3286         files without source files in command line,
3287         * device/include/pic16 (all headers): added ID location macros,
3288         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
3289         entries for ID location bytes,
3290         * (pic16_assignIdByteValue): NEW,
3291         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
3292         added field dumpcalltree to pic16_options_t,
3293         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
3294         is used instead of pic16_Gstack_base_addr, check if (ifx) before
3295         emitting rFalseIfx label after check_carry label,
3296         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
3297         pic16_emitDIRegs), NEW
3298         * (pic16glue): dump .calltree file when option --calltree found,
3299         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
3300         * (_pic16_genAssemblerPreamble): emit ID locations after
3301         configuration registers,
3302         * (pic16_linkCmd): modifications of the link command,
3303         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
3304         * (pic16_pCodeInitRegisters): don't init stack registers,
3305         * (pic16_findPrevInstruction): fixed bug,
3306         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
3307         bug with immediate registers,
3308         * (buildCallTree): traces stack push and pop,
3309         * (pct2): dump also stack usage for each function,
3310         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
3311         * (pic16_allocDirReg): various modifications,
3312         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
3313         fixed to 1,
3314
3315 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
3316
3317         * src/pic16/pcode.c: removed buggy double colon
3318
3319 2004-07-01 Borut Razem <borut.razem AT siol.net>
3320
3321         * support/scripts/sdcc.nsi: added include/pic16 to setup
3322
3323 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
3324
3325         * device/lib/Makefile.in: fixed bug in target objects-pic16,
3326         * device/lib/pic16/Makefile: prefixed with dash (-) command under
3327         target 'clean',
3328         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
3329         specific command line arguments. Also added sample lkr script
3330         for placing a variable at a specific memory bank.
3331         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
3332         at a specific memory bank,
3333         * (pic16_dump_isection): fixed bug which caused string literals to
3334         be omitted when dumping idata section,
3335         * (pic16_groupRegistersInSection): added code to handle registers
3336         in specific memory banks,
3337         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
3338         public, all references are renamed too,
3339         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
3340         AOP_DPTR2,
3341         * (pic16_storeForReturn): added case to handle when dest is WREG,
3342         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
3343         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
3344         pic16_rel_udata, check to see if that register is marked as being
3345         a member of a specific memory bank,
3346         * (pic16_printIvalCharPtr): added code to add string literals either
3347         to code or the idata sections,
3348         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
3349         also accept the 'udata' pragma,
3350         * src/pic16/main.h: new structure types sectName and sectSym
3351         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
3352         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
3353         * (pic16_findPrevInstruction): fixed, it returned nothing,
3354         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
3355         instruction combinations,
3356         * (pic16_FixRegisterBanking): heavily reorganised,
3357         * (pic16_AnalyzeBanking): if generating banksel directives is
3358         disabled, then don't call FixRegisterBanking at all,
3359         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
3360         completely removed,
3361         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
3362
3363 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
3364
3365         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
3366         Phuah Yee Keat <yk.phuah AT nestac.com>
3367
3368 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3369
3370         * src/pic16/glue.c (pic16createInterruptVect): function now emits
3371         correctly the IVT even if it is relocated to some other location
3372
3373 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3374
3375         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
3376         * device/include/pic16/pic18f2220.h: NEW,
3377         * device/lib/pic16/libdev/pic18f2220.c: NEW,
3378         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
3379         * src/pic16/device.c (struct Pics16): added info for 18f2220,
3380         * src/pic16/device.h (struct pic16_options): added ivt_loc and
3381         nodefaultlibs, ivt_loc is the location of the interrupt vector
3382         table, and nodefaultlibs signs that default libraries should not be
3383         linked in link stage,
3384         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
3385         according to --ivt-loc argument,
3386         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
3387         when pragma stack is found,
3388
3389 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3390
3391         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
3392         256 (range check), 257 (do while), 258.a-f (bit banging
3393         f.e. on 3-wire SPI bus)
3394
3395 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3396
3397         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
3398         variables used exclusively within a loop
3399
3400 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
3401
3402         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
3403
3404 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3405
3406         * src/SDCClrange.c (computeClash): fixed bug #971834
3407
3408 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3409
3410         * src/mcs51/gen.c (genCmp): fixed bug #975903
3411         * src/hc08/gen.c (operandsEqu),
3412         * src/ds390/gen.c (operandsEqu),
3413         * src/z80/gen.c (operandsEqu),
3414         * src/pic/gen.c (operandsEqu),
3415         * src/pic16/gen.c (operandsEqu),
3416         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
3417         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
3418
3419 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3420
3421         * src/SDCCcse.c (cseBBlock): fixed bug #966963
3422
3423 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
3424
3425         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
3426         default case in switch statement,
3427         * glue.c (pic16_initPointer): expr is initialised via decoarteType
3428         to eliminate problem with initialisation of pointers, but problem
3429         still exists,
3430         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
3431         * (emitStaticSegment): removed various lines emitting debug info,
3432         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
3433         added processor registers for utilizing EEPROM,
3434         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
3435         configurable and set 8
3436
3437 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
3438
3439         * .version: increased version number to 2.4.2,
3440
3441         Cumulative patch for pic16 port
3442         * src/pic16/device.c: changed scheme to dump initial values for
3443         variables in idata segment, all print_idata* functions were removed,
3444         now the pic16_printIval* will be called,
3445         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
3446         * _pic16_printPointerType, pic16_printPointerType,
3447         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
3448         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
3449         NEW, similar to the respective functions in SDCCglue.c,
3450         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
3451         way, emitting hex bytes,
3452         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
3453
3454 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3455
3456         * src/avr/ralloc.c (serialRegAssign),
3457         * src/xa51/ralloc.c (serialRegAssign),
3458         * src/pic/ralloc.c (serialRegAssign),
3459         * src/pic16/ralloc.c (serialRegAssign),
3460         * src/hc08/ralloc.c (serialRegAssign),
3461         * src/z80/ralloc.c (serialRegAssign),
3462         * src/ds390/ralloc.c (serialRegAssign),
3463         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
3464
3465 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3466
3467         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
3468         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
3469
3470 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
3471
3472         Cumulative patch for pic16 port:
3473         * src/pic16/device.h (typedef PIC16_device) modified fields for
3474         defining microcontrollers,
3475         * src/pic16/device.c: added new info for all devices in Pics16 array,
3476         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
3477         to be optimised out by the pCode optimiser,
3478         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
3479         specially, bug reported by G.M. Gallant,
3480         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
3481         as force'd so that cannot be optimised out by pCode optimiser,
3482         * src/pic16/pcode.c,
3483         * src/pic16/pcodepeeph.c,
3484         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
3485         they are disabled by default, but can be enabled explicit with
3486         command argument --denable-peeps, for testing,
3487         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
3488         --pomit-ivt in COMPILE_FLAGS
3489
3490 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3491
3492         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
3493           compilation on MSVC
3494
3495 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3496
3497         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
3498
3499 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3500
3501         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
3502         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
3503
3504 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
3505
3506         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
3507         would only assign 0x300001 register.
3508
3509 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
3510
3511         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
3512         in COMPILE_FLAGS. Thanks to G. Gallant for report.
3513
3514 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3515
3516         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
3517         for ds80c400
3518         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
3519         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
3520         added peephole 254 (left shift), 255 (jump table)
3521
3522 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
3523
3524         * device/lib/Makefile.in: removed comment line with model-pic16,
3525         * (target port-specific-objects-pic16): the libraries and objects
3526         are copied to the build directory form the device/lib/pic16/bin
3527         directory
3528
3529         Cumulative patch concerning pic16 port:
3530         * library directory has been re-organized,
3531         * added support for PIC18F1220,
3532         * added headers and library sources for chips 18f1220,18f6520,
3533         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
3534
3535         * configuration registers setting has changed, now each supported
3536         device has a complete description of the registers it uses,
3537         * all initialisations are moved to idata sections, these section
3538         can be absolute or relocatable,
3539         * fixed initialisation of codespace variables,
3540         * fixed warning about PCLATU and gpsim,
3541         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
3542         * (genAssign): use table reads when assigning from variables in codespace,
3543         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
3544         char/int variables placed in codespace,
3545         * (pic16_emitConfigRegs): NEW, emits a list with configuration
3546         registers set in .asm file, no need for --pomit-config-words anymore,
3547         * (pic16glue): some 8051 legacy segments are commented out
3548         (to be removed completely),
3549         * added support for alternative assembler and linker with --asm=
3550         and --link= command line arguments,
3551         * peepholes are disabled automatically in the port, no need to
3552         specify on command line,
3553         * port supports natively char/int/long multiplication, but converts
3554         all divisions to support functions,
3555         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
3556         to the file set in variable $2,
3557         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
3558         strings in ASCII format and not in hex,
3559         * ralloc.c (serialRegAssign): added a triplet of conditional calls
3560         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
3561         allocate proper register if iCodes aren't temporary,
3562
3563 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
3564
3565         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
3566
3567 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
3568
3569         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
3570         is commented out
3571
3572 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3573
3574         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
3575         computed address is reused
3576         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
3577         multi-byte bitfields
3578
3579 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3580
3581         * src/z80/gen.c: (genArrayInit): must check for pointers too
3582
3583 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3584
3585         * support/regression/tests/zeropad.c: never meant to commit the
3586           nestedstruct test: removed, added check for GCC version
3587
3588 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
3589
3590         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
3591         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
3592         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
3593           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
3594           bugs 928906 and 954082 half-empty initializers
3595         * src/SDCCsymt.h,
3596         * src/SDCCsymt.c (getAllocSize): added for above fix
3597         * src/z80/gen.c (genArrayInit): fixed bug 741044
3598         * support/regression/tests/zeropad.c: added tests
3599
3600 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
3601
3602         * src/pic16/device.c (pic16_dump_section): corrected bug which
3603         caused some symbols of the libraries to be misplaced
3604
3605 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3606
3607         * src/pic16/glue.c,
3608         * src/pic16/ralloc.h,
3609         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
3610         to fix conflict with pic port
3611
3612 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3613
3614         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
3615         externs configuration variables,
3616         * src/pic16/ralloc.h,
3617         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
3618         prototype in header, commented out some debug messages
3619
3620 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
3621
3622         * src/pic16/glue.c,
3623         * src/pic16/main.c,
3624         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
3625         for gpasm COFF object generation. Thanks to D. Hawkins for
3626         his patch info
3627
3628 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3629
3630         * src/ds390/main.c,
3631         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
3632         Brock for spotting this)
3633         * src/ds390/gen.c (genEndFunction),
3634         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
3635         interrupt handler and critical. Disable push/pop optimizations when
3636         peephole optimizations disabled.
3637
3638 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3639
3640         Updated pic16 library sources and headers.
3641         * device/lib/pic16/pic18f*/ ,
3642         * device/include/pic16/*.h: modified to handle structured SFR
3643         definitions
3644
3645 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3646
3647         * src/port.h (PORT structure): added hook initPaths, now each
3648         port can declare its own default search paths,
3649         which can been seen with the --print-search-dirs option,
3650         see pic16 port for example,
3651         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
3652         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
3653         * (doPrintSearchDirs): NEW, replaces in a central manner the
3654         printing of search dirs which was split in set*Paths functions,
3655         * (main): added call to port->initPaths and doPrintSearchDirs,
3656         * src/avr/main.c,
3657         * src/ds390/main.c,
3658         * src/hc08/main.c,
3659         * src/izt/i186.c,
3660         * src/izt/tlcs900h.c,
3661         * src/mcs51/main.c,
3662         * src/pic/main.c,
3663         * src/pic16/main.c: modified port structures to reflect addition of
3664         initPaths hook,
3665
3666         * src/pic16/device.c (regCompare): registers are finally sorted by name,
3667         * (pic16_dump_section): for registers in same address reserve memory once,
3668         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
3669         to no_banksel,
3670         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
3671         result is greater in size than right or left,
3672         * (pic16_genUMult8X8_8): there are some cases where the result can
3673         be 16 bits size, so handle these,
3674         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
3675         * (pic16_outBitC): modified to emit pcodes,
3676         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
3677         or not,
3678         * (genDivOneByte): implemented algorithm to divide 8-bits,
3679         * (genCmp): uncommented goto, but issues still exist,
3680         * (genAnd): fixed a bug with variables >8bits,
3681         * (genPackBits): optimization added that uses BCF/BSF to change a
3682         single bit,
3683         * (genAssign): fixed bug when assigning floating point literals,
3684         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
3685         __sdcc_gsinit_startup label,
3686         * src/pic16/main.c (_pic16_init): removed search directory
3687         initialisations,
3688         * (_pic16_initPaths): NEW, used to initialise search directories,
3689         * (_hasNativeMulFor): support functions for all except char/int
3690         multiplication, and char division,
3691         * (PIC16_port struct): modified entry for native mul support,
3692         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
3693         no_banksel option,
3694         * (buildCallTree): call to register_usage is ifdef'ed out,
3695
3696 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3697
3698         * device/include/string.h: applied Stas Sergeev's patch to make this
3699         header file compatible with the preprocessor -Wundef option
3700         * src/SDCCmain.c (main): abort compilation if preprocessor reports
3701         failure (fixes bug #941458)
3702
3703 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3704
3705         * src/SDCCopt.c (killDeadCode): fixed bug #907733
3706         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
3707         that the variable, not the function, should be static
3708         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
3709         to be consistent with non-literal case
3710
3711 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3712
3713         * src/SDCCast.c (isConformingBody): fixed bug #949967
3714         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
3715         convilong): fixed bug #952086
3716
3717 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3718
3719         * src/SDCCmem.c (allocVariables): fixed bug #955321
3720
3721 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3722
3723         * src/hc08/main.c (_hc08_genAssemblerEnd),
3724         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
3725         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
3726         completely eliminated the use of a temporary file
3727         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
3728         when more than one file linked
3729         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
3730
3731 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3732
3733         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
3734         which fixes bug #543481
3735         * support/regression/tests/bug-751703.c: fixed comments left from a
3736         cut and paste error
3737         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
3738         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
3739         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
3740         scopes
3741         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
3742         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
3743         are now changed to underscores in moduleName
3744
3745 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3746
3747         * as/mcs51/lkmem.c: better fix for bug #954173
3748
3749 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
3750         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3751
3752         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
3753         * device/include/c8051f000.h,
3754         * device/include/c8051f120.h,
3755         * device/include/c8051f300.h,
3756         * device/include/c8051f310.h,
3757         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
3758         PWM16) and detab'ed
3759
3760 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3761
3762         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
3763         and mailing lists, doc'ed --no-peep-comments, removed reference
3764         to knoppix (newest version has no LyX/LaTeX), other minor changes
3765         * src/SDCCglue.c (glue): save 2 bytes stack space with
3766         option --main-return. The ljmp could probably be avoided too
3767
3768 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3769
3770         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
3771
3772 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3773
3774         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
3775         * src/SDCCopt.c (isLocalWithoutDef),
3776         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
3777         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
3778         (credit to Maarten Brock for patch #949363, on which this is based)
3779         * support/regression/tests/bug-751703.c: some test cases of extern used
3780         within inner scopes.
3781
3782 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3783
3784         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
3785         SPEC_STRUCT
3786         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
3787         struct definitions
3788         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
3789         dwWriteLabel): fix to create valid debugger symbols even when
3790         the module name has non-alphanumeric symbols in it
3791         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
3792         when a variable's allocation has been optimized away
3793
3794
3795 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3796
3797         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
3798         * src/hc08/main.c,
3799         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
3800         * src/mcs51/main.c,
3801         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
3802         * src/ds390/main.c,
3803         * src/z80/gen.c (z80_emitDebuggerSymbol),
3804         * src/z80/main.c,
3805         * src/pic/gen.c (pic14_emitDebuggerSymbol),
3806         * src/pic/main.c,
3807         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
3808         * src/pic16/main.c,
3809         * src/avr/gen.c (avr_emitDebuggerSymbol),
3810         * src/avr/main.c,
3811         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
3812         * src/xa51/main.c,
3813         * src/SDCCdebug.c (emitDebuggerSymbol),
3814         * src/SDCCdebug.h,
3815         * src/port.h: added a debugger struct to the port struct. Added a
3816         callback for defining debugger symbols
3817
3818         * src/SDCCast.c (createLabel),
3819         * src/SDCC.y (labeled_statement): mark all compiler generated labels
3820         with isitmp = 1
3821         * src/SDCCicode.h,
3822         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
3823         iCode back to the ast for the function
3824
3825         * src/hc08/ralloc.c (hc08_assignRegisters),
3826         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
3827         unneeded fields from the regs struct.
3828         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
3829         pushReg() & pullReg() functions instead of emitcode()
3830
3831         * src/hc08/gen.c (genLabel, genhc08Code),
3832         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
3833
3834         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
3835         debugger hooks
3836
3837         * src/hc08/gen.c (genEndFunction, genhc08Code),
3838         * src/hc08/gen.h,
3839         * src/mcs51/gen.c (genEndFunction, gen51Code),
3840         * src/mcs51/gen.h,
3841         * src/ds390/gen.c (genEndFunction, gen390Code),
3842         * src/ds390/gen.h,
3843         * src/z80/gen.c (genEndFunction, genZ80Code),
3844         * src/z80/gen.h,
3845         * src/z80/z80.h,
3846         * src/pic/gen.c (genEndFunction, genpic14Code),
3847         * src/pic/gen.h,
3848         * src/pic16/gen.c (genEndFunction, genpic16Code),
3849         * src/pic16/gen.h,
3850         * src/avr/gen.c (genEndFunction, genAVRCode),
3851         * src/avr/gen.h,
3852         * src/xa51/gen.c (genEndFunction, genXA51Code),
3853         * src/xa51/gen.h,
3854         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
3855         specific code to cdbFile.c and out of the backend code generators
3856
3857         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
3858         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
3859         starting address is now 0
3860
3861         * as/hc08/asm.h,
3862         * as/hc08/m08pst.c,
3863         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
3864         assembler directive for DWARF support
3865         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
3866
3867         * src/src.dsp,
3868         * src/Makefile.in,
3869         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
3870
3871 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3872
3873         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
3874         and inappropriate peephole optimization in jump tables
3875
3876 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3877
3878         * as/hc08/m08pst.c,
3879         * src/SDCCglue.c: sdccopt works for the hc08 port now
3880
3881 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
3882
3883         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
3884
3885 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3886
3887         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
3888
3889 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3890
3891         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
3892         rules
3893         * src/SDCCmain.c,
3894         * src/SDCCglobl.h,
3895         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
3896         comments from the peephole optimizer replacement rules
3897         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
3898         symbols
3899         * src/SDCCcse.c (updateSpillLocation),
3900         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
3901         equivalents
3902         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
3903         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
3904         objects far pointers
3905
3906 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3907
3908         * src/SDCCsymt.h: a missing part of my last change
3909         * src/pic/ralloc.c (regTypeNum),
3910         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
3911
3912 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3913
3914         * src/SDCCicode.h,
3915         * src/SDCCicode.c (aggrToPtrDclType),
3916         * src/SDCCptropt.h,
3917         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
3918         ptrPseudoSymConvert),
3919         * src/pic/ralloc.c (regTypeNum),
3920         * src/pic16/ralloc.c (regTypeNum),
3921         * src/hc08/ralloc.c (regTypeNum),
3922         * src/ds390/ralloc.c (regTypeNum),
3923         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
3924         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
3925
3926 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3927
3928         * link/z80/lkmain.c (afile),
3929         * as/hc08/lkmain.c (afile),
3930         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
3931         prevent a pointer problem when a filename has no directory and
3932         no extension specified.
3933
3934 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3935
3936         * link/z80/lkmain.c (afile): allow periods in directory names
3937         * link/z80/lkmain.c (afile),
3938         * as/mcs51/lkmain.c (afile),
3939         * as/hc08/lkmain.c (afile): allow linker script file to have an
3940         extension other than ".lnk"
3941         * link/z80/lklex.c (getfid),
3942         * link/z80/lkmain.c (parse),
3943         * as/mcs51/lklex.c (getfid),
3944         * as/mcs51/lkmain.c (parse),
3945         * as/hc08/lklex.c (getfid),
3946         * as/hc08/lkmain.c (parse): Support comments in the linker script
3947         file on lines by themselves and after filenames
3948
3949 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3950
3951         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
3952
3953 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3954
3955         * src/z80/peeph-z80.def: removed some peephole rules that don't
3956         work with multibyte arithmetic (fixed bug #937126)
3957         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
3958         to registers and not global variables
3959         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
3960         geniCodePreInc, geniCodePostDec, geniCodePreDec,
3961         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
3962         checking for assignments not internally generated (fixed bug #931895)
3963         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
3964         structure member (fixed bug #930072)
3965
3966 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3967
3968         * src/SDCCmain.c (linkEdit),
3969         * src/hc08/main.c (_hc08_parseOptions),
3970         * as/hc08/Makefile.in,
3971         * as/hc08/aslink.h,
3972         * as/hc08/asm.h,
3973         * as/hc08/m08pst.c,
3974         * as/hc08/lkrloc.c (relr, rele),
3975         * as/hc08/lkarea.c (lnkarea)
3976         * as/hc08/lkmain.c (afile, parse),
3977         * as/hc08/lkelf.c: support for ELF output
3978         * as/hc08/lks19.c (s19),
3979         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
3980
3981 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3982
3983         * as/mcs51/lkihx.c: Fixed bug #899105.
3984
3985 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3986
3987         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
3988         .dsp files from Unix to DOS.
3989
3990 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3991
3992         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
3993         function pointers; we have been compliant for several months now.
3994         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
3995         change that was accidently commented out
3996         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
3997         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
3998         bug #922319
3999
4000 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4001
4002         * src/hc08/gen.c: output of all of the internal debugging information
4003         is now controlled by the D() macro; it is disabled by default
4004
4005 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4006
4007         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
4008         harder to keep the same registers during a CAST iCode
4009         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
4010         long via int can be done in a single cast, if the signedness is
4011         correct.
4012         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
4013         putchar() in tinibios.c in ds390's library
4014
4015 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
4016
4017         * src/SDCCast.c (decorateType): fixed bug #898889,
4018         cast result of a literal complement too
4019         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
4020         fixed check for bitfields
4021
4022 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
4023
4024         * src/SDCCicode.c (geniCodeLogic): made it static,
4025         (geniCodeLogicAndOr): added in order to fix bug #905492,
4026         (ast2iCode): fixed bug #905492
4027         * support/regression/tests/bug-905492.c: added
4028         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
4029         (processParms): fixed bug #927659: don't copy parms, this will clear
4030         decorated flag
4031         * support/regression/tests/bug-927659.c: added
4032
4033 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
4034
4035         * src/SDCCast.c (addCast): don't cast float to char
4036         * device/lib/libsdcc.lib: added _memmove
4037
4038 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
4039
4040         * device/lib/large/Makefile: fixed parallel execution by
4041         replacing `make` by `$(MAKE)`
4042
4043 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4044
4045         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
4046         offsets (fixes bug #923936)
4047
4048 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
4049
4050         * device/lib/small/Makefile: fixed parallel execution by
4051         replacing `make` by `$(MAKE)`
4052
4053 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4054
4055         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
4056
4057 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
4058
4059         * src/pic/gen.c (genCpl): multi-byte complements were not working.
4060         * src/regression/Makefile: Regression test was not running.
4061
4062 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4063
4064         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
4065         complement if possible
4066         * src/SDCCval.c (valComplement),
4067         * src/SDCCicode.c (operandOperation): fixed complement of literal
4068         * support/regression/tests/onebyte.c (testComplement): added
4069
4070 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
4071
4072         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
4073         return an optimized tree; actually replace actParm with the new tree
4074         * src/SDCCast.h: added some parantheses to remove side effects
4075         * support/regression/tests/bug-920866.c
4076
4077 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
4078         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
4079         Bit operands were not being handled properly in the pic14 port.
4080         (now src/regression/add.c passes again).
4081
4082 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4083
4084         * src/SDCC.y (labeled_statement): case and default no longer require
4085         a following statement (RFE #893037)
4086
4087 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4088
4089         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
4090         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
4091         disabled (fixes bug #916294)
4092         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
4093         "mov a,acc"; patch provided by Lenny Story
4094         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
4095
4096 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4097
4098         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
4099         functions
4100         * src/ds390/gen.c (genFunction, genEndFunction),
4101         * src/ds390/ralloc.c (ds390_assignRegisters),
4102         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
4103         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
4104         pushed if there are parameters passed on the stack. Also, a cleaner
4105         way to decide if r0/r1 should be pushed/popped. (Together they fix
4106         bug #918693)
4107
4108 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4109
4110         * doc/sdccman.lyx,
4111         * device/lib/mcs51/crtpagesfr.asm,
4112         * device/lib/mcs51/crtxinit.asm,
4113         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
4114         to avoid confusion with Si Lab's SFRPAGE register.
4115
4116 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4117
4118         * src/SDCCglue.c (emitMaps): allow public sfr variables
4119         * src/SDCCglue.c (initialComments): include compiler build date
4120         with compiler version and put the timestamp of the generated
4121         assembly file on a serperate line to be less confusing.
4122         * src/port.h: added genInitStartup hook
4123         * src/avr/main.c,
4124         * src/ds390/main.c,
4125         * src/hc08/main.c,
4126         * src/pic/main.c,
4127         * src/pic16/main.c,
4128         * src/xa51/main.c,
4129         * src/z80/main.c: genInitStartup initialize as NULL (default to
4130         historical behaviour)
4131         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
4132         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
4133         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
4134         library instead of hard coding it into the compiler.
4135         * support/regression/ports/mcs51-stack-auto/spec.mk,
4136         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
4137         * device/lib/mcs51/Makefile,
4138         * device/lib/small/Makefile,
4139         * device/lib/large/Makefile,
4140         * device/lib/mcs51/crtpagesfr.asm,
4141         * device/lib/mcs51/crtstart.asm,
4142         * device/lib/mcs51/crtxclear.asm,
4143         * device/lib/mcs51/crtxinit.asm,
4144         * device/lib/mcs51/crtclear.asm,
4145         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
4146         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
4147         and into user configurable files.
4148         * device/lib/clean.mk: clean mcs51 directory too
4149         * support/regression/tests/longlit.c: added static to T1 declaration
4150         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
4151         accesses in the initialization code
4152
4153 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4154
4155         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
4156         OSCTRIMVAL as noted in bug #916008
4157
4158 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4159
4160         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
4161         in loops with multiple exits (reported as incorrect registers
4162         used by Martin Helmling in Sdcc-user list)
4163
4164 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4165
4166         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
4167         made ds390 register extensions look less like error messages
4168
4169 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4170
4171         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
4172         reported by Adam Wozniak in Sdcc-user list
4173
4174 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
4175
4176         * src/SDCCast.c (decorateType): fixed with bug and promotion in
4177         arithmetic optimizations, added debug output
4178
4179 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
4180
4181         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
4182         * sdcc.spec: updated and split sdcc into 3 rpms
4183         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
4184         needed for literals of LEFT_OP and '+'
4185         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
4186         introduced RESULT_TYPE_NOPROM
4187         (geniCodeMultiply): fixed logic for decision if mul is optimized to
4188         left shift
4189         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
4190         limited promotion to int only for '*'
4191         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
4192
4193 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
4194
4195         * src/pic16/gen.c (genSkip),
4196         (genc16bit2lit), (gencjneshort): commented out
4197         (is_LitOp): new helper function, checks operand type
4198         (genCmpEq): rewritten
4199
4200 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
4201
4202         * support/regression/tests/bug-908454.c: added
4203
4204 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
4205
4206         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
4207         * src/SDCCicode.c (usualBinaryConversions): op needs int type
4208         (geniCodeCast): cosmetic, don't preserve bit storage class
4209         (geniCodeLeftShift): added promotion
4210         (geniCodeLogic): fixed regression
4211         * src/SDCCsymt.c (computeTypeOr): accept bits too
4212         (compareType): 2nd part of fix for bug #908454, needed for bitfields
4213
4214 2004-03-07  Borut Razem <borut.razem AT siol.net>
4215
4216         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
4217
4218 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
4219
4220         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
4221         version of pic16_genPackRegisters which does not check if ic is a
4222         CAST operator,
4223         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
4224         function cause string1.c regression test fails
4225
4226 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
4227
4228         * sim/ucsim/configure.in,
4229         * sim/ucsim/configure,
4230         * sim/ucsim/doc/Makefile.in: use docdir
4231         * src/SDCC.y: fixed sbit atrributes
4232         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
4233         * src/SDCCast.c (decorateType): |^& need special promotion handling
4234         * src/SDCCast.h,
4235         * src/SDCCsymt.h: moved definition of RESULT_TYPE
4236         * src/SDCCsymt.h (computeType),
4237         * src/SDCCicode.c: computeType() needs op
4238         * src/SDCCsymt.c (checkTypeSanity),
4239         * doc/sddman.lyx: "plain" bitfields are unsigned
4240         * src/SDCCsymt.c (computeTypeOr): added
4241         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
4242         |^& ops
4243         * src/SDCCval.c (val*): computeType() needs op
4244         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
4245         * support/regression/tests/onebyte.c: added tests for |^&
4246
4247 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
4248
4249         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
4250         for writing icode into asm output.
4251
4252 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
4253
4254         * src/pic16/device.c: added some debug lines enabled
4255         with macro DEBUG_CHECK,
4256         * src/pic16/genarith.c: more debug in genPlus,
4257         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
4258         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
4259         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
4260         * (aopForSym): onStack symbols are re-placed in data memspace,
4261         and onStack flag is cleared,
4262         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
4263         copy temporary pcodeop,
4264         * (genPcall): added warning for not updating PCLATU,
4265         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
4266         always true for pic16 port,
4267         * (genMultOneWord): NEW, supports integer multiplication,
4268         * (genMult): modified to call genMultOneWord,
4269         * (ifxForOp): added warning when return NULL,
4270         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
4271         flag is set before call to operandFromSymbol for implicit
4272         added structures,
4273         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
4274         options.intlong_rent are set by default,
4275         * (_hasNativeMulFor): modified to allow port generation of integer
4276         multiplication,
4277         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
4278         set regtype to REG_SFR for all registers, restricting seting the
4279         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
4280
4281 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4282
4283         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
4284         more than 500 times in the regression tests
4285
4286 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4287
4288         * support/Util/SDCCerr.h,
4289         * support/Util/SDCCerr.c,
4290         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4291         enumerator_list),
4292         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
4293         for symbol conflicts.
4294         * support/valdiags/tests/enum.c,
4295         * support/valdiags/tests/tentdecl.c,
4296         * support/valdiags/tests/struct.c: expect possible error messages
4297         referring to original symbol definitions.
4298         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
4299         * src/SDCCsymt.h,
4300         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
4301
4302 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
4303
4304         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
4305
4306 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
4307
4308         * src/pic16/ralloc.c (newReg): fixed bug #908929
4309
4310 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4311
4312         * src/ds390/gen.c: added missing #include "main.h"
4313
4314 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
4315
4316         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
4317         checking if symbol is already in set,
4318         * src/pic16/device.h: prototype for checkAddSym,
4319         * src/pic16/gen.c: (_G): added entry interruptvector,
4320         * (assignResultValue): removed some commented out lines,
4321         * (genFunction): check for ISR via sym->type, absolute section for
4322         interrupt code is created via a new pBlock, the goto instruction is
4323         placed now correctly at the interrupt vector position, changed all
4324         references from ivec to _G.interruptvector,
4325         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
4326         is the interrupt is a high priority one, same for return from ISR,
4327         * src/pic16/glue.c: changed all calls of addSetHead for publics and
4328         externs to calls of checkAddSym,
4329         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
4330         pic16_pcode_verbose flag is set,
4331         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
4332         * src/pic16/pcoderegs.c: message about how many registers are saved
4333         will only be emitted if pic16_pcode_verbose flag is set,
4334
4335 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4336
4337         * src/ds390/ralloc.h,
4338         * src/ds390/ralloc.c (ds390_regWithIdx),
4339         * src/ds390/gen.c (emitcode),
4340         * src/ds390/main.h,
4341         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
4342         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4343         ds390operandCompare, getRegsRead, getRegsWritten,
4344         initializeAsmLineNode): customized instruction size calculation for
4345         ds390, started basis for some register optimizations
4346         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
4347         corresponding assembly output
4348         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
4349         missing push/pop of r0/r1. Optimized push/pops
4350
4351 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4352
4353         * src/mcs51/main.c (instructionSize): fixed ACALL size
4354         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
4355
4356 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
4357
4358         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
4359         the sorting of rlist with NULL elements
4360         * (print_idataType, print_idata): NEW to create idata sections
4361         * src/pic16/device.h: idataSymSet new variable
4362         * src/pic16/gen.c (genFunction): fixed some bugs in string
4363         comparing, improved the absolute section creation for ISRs,
4364         added FSR0L/FSR0H in registers that are saved in an ISR,
4365         * (genInline): fixed the processing of inline snippets,
4366         now they undergo no process by the peephole optimizer
4367         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
4368         are placed in idataSymSet,
4369         * (pic16emitStaticSeg): extern symbols are added in externs,
4370         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
4371         switching when aboslute variables are placed in access bank memory
4372         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
4373         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
4374         commented out with #if,
4375         * (pic16_packRegisters): reintroduce the check for CAST because some
4376         symbols are not correctly handled,
4377         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
4378         pCodeInstruction instead of pCode,
4379         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
4380         pCodeAsmDir definition,
4381         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
4382         directive, then the argument directive is emitted without the leading
4383         tab, hack for inline labels which must be in the first column,
4384         * (compareLabel,pic16_findNextInstruction),
4385         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
4386         * (insertBankSwitch): modified for the new pCodeAsmDir,
4387
4388 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4389         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
4390
4391         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
4392         instance,
4393         * (pushSide): commented out with #if,
4394         * (assignResultValue): fixed some typos in saving
4395         registers,
4396         * (genPcall): FIXED and sync'ed with genCall,
4397         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
4398         * (genNearPointerGet): fixed to handle some more cases,
4399         implementation scheme via table reads,
4400         * (genConstPointerGet): modified to access code memory correct,
4401         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
4402         and improved to handle some cases
4403         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
4404         instead of "RETLW" for init data
4405         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
4406         not IN_DIRSPACE, work around to reduce bank switching when aboslute
4407         variables are placed in access bank memory (<0x80 and >=0xf80),
4408         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
4409         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
4410         TBLWT_POSTDEC,TBLWT_PREINC
4411         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
4412         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
4413         directives
4414         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
4415         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
4416         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
4417         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
4418
4419 2004-02-29  Borut Razem <borut.razem AT siol.net>
4420
4421         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
4422         support/Util/findme.h, support/Util/system.h: enhance binary relative
4423         search for lib and include by using findProgramPath()
4424
4425 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4426
4427         * src/SDCCpeeph.h,
4428         * src/SDCCpeeph.c (pcDistance),
4429         * src/port.h,
4430         * src/mcs51/ralloc.h,
4431         * src/mcs51/ralloc.c (mcs51_regWithIdx),
4432         * src/mcs51/main.h,
4433         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
4434         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4435         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
4436         size calculation port specific, started basis for some register
4437         optimizations
4438         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
4439         missing push/pop of r0/r1. Optimized push/pops
4440         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
4441         * device/lib/_modsint.c (_modsint),
4442         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
4443         and stack version so regression tests pass
4444
4445 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
4446
4447         * src/Makefile.in (dep): include SLIBOBJS in dependency check
4448         * src/SDCCast.c (decorateType): catch another small optimization
4449         with '?' operator
4450         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
4451         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
4452         modified to finally use computeType() all over SDCC,
4453         see Feature Request #877103
4454         * src/SDCCval.h: cosmetic
4455         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
4456         valCompare(); regression tested in muldiv.c
4457         * support/regression/tests/muldiv.c (testMod): mod sign follows
4458         dividend only
4459
4460 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
4461
4462         * src/SDCCast.c (decorateType): fixed bug #902362
4463         * doc/INSTALL.txt: fixed install instructions for win32
4464
4465 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
4466
4467         * device/include/Makefile.in (install): fixed by replacing spaces
4468         by tabs
4469         * doc/README.txt,
4470         * doc/INSTALL.txt: updated for release
4471         * doc/sdccman.lyx: added warning for --xstack being buggy
4472
4473 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
4474
4475         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
4476         to eliminate build warnings.
4477         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
4478
4479 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
4480            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4481
4482         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
4483         removed -penable-stack, added comment for stack pragma, added
4484         warning for not initializing the stack/frame registers, removed
4485         comment at interrupts section
4486
4487         Stack is made permanent, there is no ability to disable stack usage.
4488         * src/pic16/device.h,
4489         * src/pic16/device.c: removed all references to USE_STACK macro,
4490         * src/pic16/device.c (pic16_dump_section): when no elements in
4491         rlist, free rlist before return,
4492         * (pic16_dump_int_registers): NEW, internal registers are a new set
4493         of general purpose registers reused by each function,
4494         * (checkAddReg): returns 1 if registers is added to set,
4495         * (pic16_groupRegistersInSection): when a registers is of type
4496         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
4497         * src/pic16/device.h: memRange and Assigned Memory are deleted,
4498         SRCASECMP macro is moved here from device.c
4499         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
4500         PO_PCLATU, PO_PRODL, PO_PRODH,
4501         * (pic16_pCodeOpType, genMinus,
4502         changed compares to "a" register, with AOP_ACC,
4503         * (pic16_genPlus): fixed some bugs and indented properly,
4504         * (pic16_addSign): changed size to size+offset in the MOVWF
4505         instruction,
4506         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
4507         multiply 8-bit operand by literal, result is 8-bit,
4508         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
4509         multiply 2 8-bit operand, result is 8-bit,
4510         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
4511         genUMult8X*_16,
4512         * src/pic16/gen.c: changed accUse to contain WREG only,
4513         * (pic16_emitcomment): renamed to pic16_emitpcomment,
4514         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
4515         true, do not use immediate addressing any more unless sym is a
4516         pointer in codespace,
4517         * (aopForRemat): do not use immediate addressing when symbol not in
4518         codespace and when symbol's address is requested,
4519         * (aopOp): for-loop in if(sym->accUse) is modified for the new
4520         accUse size (= 1),
4521         * (aopGet): added case for AOP_ACC and don't return "accumulator
4522         bug" but WREG instead,
4523         * (popGetTempReg): pushes contents of temporary register in stack,
4524         * (popReleaseTempReg): pops contents of temporary register from
4525         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
4526         * (pic16_popGet): separated case AOP_ACC to return register WREG
4527         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
4528         or PO_IMMEDIATE and initializes their instance/offset appropriately,
4529         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
4530         the use of immediate pointers to certain cases only.
4531
4532         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
4533         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
4534         * (assignResultValue, genCall, genRet): modified to use the new
4535         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
4536         genPcall is still broken,
4537         * (genFunction): added code to create 'A' type pBlocks when
4538         interrupt functions are generated, code not extensively tested yet,
4539         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
4540         * (genEndFunction): modified so ISRs pop stored registers from stack,
4541         * (genMultOneByte): cleanup,
4542         * (AccRsh): added flag andmask, to and result with appropriate mask,
4543         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
4544         * (genDataPointerGet): fixed and reenabled its use,
4545         * (genNearDataPointerGet): bugs fixed,
4546         * (genDataPointerSet): bugs fixed,
4547         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
4548         pic16_DumpSymbol, pic16_DumpOp,
4549         * src/pic16/genutils.h: function prototypes for the above functions,
4550         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
4551         pointers,
4552         * (pic16emitRegularMap): many many many improvements, but needs a
4553         major cleanup,
4554         * src/pic16/main.c: enable_stack in pic16_options is removed,
4555         * (_pic16_parseOptions): removed command line options -penable-stack,
4556         * (_process_pragma): emit stack symbol only when stack pragma is
4557         processed,
4558         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
4559         redirected to FSR0L/FSR0H pair,
4560         * (pic16_get_op, pic16_get_op2): modifications and improvements,
4561         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4562         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
4563         for immediates,
4564         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
4565         * (dumpPicOptype): NEW,
4566         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
4567         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
4568         with movff instruction,
4569         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
4570         added pic16_int_regs, some packRegsFor* functions are commented out,
4571         because produce errors,
4572         * src/pic16/NOTES: minor modifications
4573
4574 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4575
4576         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
4577         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
4578         --pack-iram.
4579         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
4580         * as/mcs51/lkaomf51.c: fixed bug #895763
4581
4582 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
4583
4584         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
4585
4586 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4587
4588         * doc/sdccman.lyx: added details about the HC08 storage classes and
4589         interrupts, fixed the register usage info for z80 & gbz80
4590
4591 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
4592
4593         * doc/sdccman.lyx: added more pic16 port documentation
4594         * device/include/pic16/: added header pic18fregs.h
4595
4596 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
4597
4598         * doc/sdccman.lyx: added Vangelis' contribution
4599
4600 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4601
4602         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
4603         extend to the next CALL or PCALL, not just to the next CALL.
4604
4605 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
4606
4607         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
4608
4609 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4610
4611         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
4612         bug #895752 and a better fix for bug #716790
4613
4614 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4615
4616         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
4617
4618 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4619
4620         * doc/sdccman.lyx: minor changes, minor changed
4621
4622 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
4623
4624         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
4625         which can't handle SDCC_NEWONEBYTEOPS,
4626         (geniCodeMultiply): removed conversion from mult to shift for pic14
4627         and pic16
4628
4629 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4630
4631         * src/hc08/gen.h,
4632         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
4633         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
4634         thus fixing bug #895406
4635
4636 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
4637
4638         * device/lib/_modsint.c,
4639         * device/lib/_modslong.c: sign follows divisor only
4640         * src/hc08/gen.c (genMultOneByte): if result size is 1,
4641         signs or signedness can be ignored
4642         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
4643         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
4644         added optimization for IFX,
4645         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
4646         arguments;
4647         reenabled optimization for IFX, which was removed on 2004-01-11
4648         * src/SDCCast.h: added return type IFX
4649         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
4650         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
4651         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
4652         SDCC_OLDONEBYTEOPS selects the old behaviour
4653         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
4654         changed again and commented promotion rule
4655         * src/SDCCval.c (valDiv): promotion no longer necessary
4656         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
4657         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
4658         rewritten
4659         * support/regression/tests/onebyte.c: added
4660
4661 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
4662
4663         * gen.c (genInline): reverted to old code for assemnling inline
4664         code because of bug reported James Chadd
4665
4666 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
4667
4668         * ralloc.h: missing declarations from previous patch,
4669         seems that patch for ralloc.h was never applied, fixed
4670
4671 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4672            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
4673
4674         * pcode.c,
4675         * pcode.h,
4676         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
4677         indirect addressing. Marked FSR0 as deprecated
4678         * gen.c (pointerCode): commented out, not needed now
4679         (pic16_popGet2p): new MOVFF helper function
4680         (genGenPointerGet),
4681         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
4682         (shiftRLong): removed duplicate debugging info
4683
4684 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4685
4686         * src/ds390/gen.c (genNearPointerGet),
4687         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
4688         optimization with bits, but not bitfields.
4689         * src/ds390/ralloc.c (packRegisters),
4690         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
4691
4692 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
4693
4694         * src/SDCCcse.c (algebraicOpts): copy operands before modification
4695
4696 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4697
4698         * src/SDCCsymt.h,
4699         * src/SDCCicode.c (operandFromSymbol),
4700         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
4701         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
4702         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
4703         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
4704         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
4705         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
4706         bug #892038
4707         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
4708         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
4709         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
4710         * src/SDCCsymt.c (newSymbol),
4711         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4712         enumerator_list),
4713         * src/SDCCval.h,
4714         * src/SDCCval.c (newiList): fixed bug #885705
4715
4716 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4717
4718         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
4719         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
4720
4721 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4722
4723         * device/include/c8051f120.h,
4724         * device/include/c8051f300.h,
4725         * device/include/c8051f310.h: added/updated header files for Silicon
4726         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
4727         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
4728         in new section Submitting patches
4729
4730 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4731
4732         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
4733         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4734         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4735         genGenPointerSet),
4736         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
4737         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4738         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4739         genGenPointerSet),
4740         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
4741         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4742         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4743         genGenPointerSet),
4744         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
4745         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4746         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4747         genGenPointerSet): fixed bug #892400
4748         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
4749         to eliminate build warnings.
4750         * src/SDCCast.c (processParms),
4751         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
4752         fixed bug 751859
4753         * support/valdiag/valdiag.py: added GCC to the list of defines active
4754         when compiling with gcc
4755
4756 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4757
4758         * support/Util/SDCCerr.h,
4759         * support/Util/SDCCerr.c,
4760         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
4761         with an incomplete type (fixed bug #883734)
4762         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
4763
4764 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4765
4766         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
4767
4768 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4769
4770         * src/SDCCast.c (decorateType),
4771         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
4772         function pointer implementation
4773         * support/regression/tests/funptrs.c: added tests to verify both forms
4774         of function pointers work correctly. Added tests to verify parameters
4775         are passed in the correct order.
4776
4777 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
4778
4779         * device.c (regCompare): registers are sorted by ascending
4780         address and increasing size,
4781         * main.c (_pic16_finaliseOptions): removed the declaration
4782         of compiler macro MCU. Now a macro of the format pic18fxxxx
4783         will be defined from the command line
4784
4785 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4786             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
4787
4788         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
4789         PCOP_RLCF was overwritten!
4790         * gen.c (genSkip): commented out calls to pic16_emitcode,
4791         * (genCmpEQ): fixed "long" compares, only high word did get compared,
4792         * (genlshTwo),
4793         * (genRRC): added debugging info,
4794         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
4795         overwritten while shifting,
4796         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
4797         overwritten while shifting,
4798         * (AccLsh),
4799         * (AccRsh),
4800         * (shiftLLeftOrResult),
4801         * (shiftRLeftOrResult),
4802         * (shiftRLong),
4803         * (shiftLLong): Implemented with pic16_emitpcode
4804         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
4805         * (genLeftShift): Fixed bug, operand for shift by variable always
4806         was "and"ed with 0x0f,
4807         * (genLeftShiftLiteral),
4808         * (genrshTwo),
4809         * (genRightShiftLiteral): added debugging info,
4810         * (genrshFour): added comment,
4811         * (genRightShift): determined signedness from operand "left"
4812         instead of "result"
4813
4814 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4815
4816         * src/SDCCicode.c (geniCodeParms),
4817         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
4818         function pointers, fixed function pointer bugs #861242 and #861896
4819
4820 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4821
4822         * device/include/c8051f000.h,
4823         * device/include/c8051f120.h,
4824         * device/include/c8051f300.h: added header files for Silicon
4825         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
4826
4827 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
4828
4829         * src/SDCCast.c (processParams): added new type flow and restructured
4830         (gatherAutoInit): added new type flow
4831         (addCast): cosmetic changes
4832         (getLeftResultType): added new type flow for array indices, patch
4833         provided by Stas, see FR #877103
4834         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
4835         array index patch by Stas
4836         * src/SDCCast.h: added prototype getResultTypeFromType()
4837         * src/SDCCval.h,
4838         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
4839         * src/pic/glue.c (pic14emitStaticSeg),
4840         * src/pic16/glue.c (pic16emitStaticSeg),
4841         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
4842         for initialization of symbols
4843         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
4844         * support/Util/SDCCerr.h:
4845         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
4846         * .version: bumped version number to 2.3.8
4847         * device/include/Makefile.in (install),
4848         * doc/Makefile (install): changed to 'rm `find ...`' construct to
4849         avoid warnings
4850
4851 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
4852
4853         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
4854         Slade Rich fixed an optimization bug
4855         * src/pic/pcodepeep.c,
4856         * src/pic/pcoderegs.c
4857         * doc/Makefile (install): added test for directory
4858
4859 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4860
4861         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
4862         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
4863         * src/pic/ralloc.c (getRegPtr, getRegGpr),
4864         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
4865         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
4866         * as/mcs51/asexpr.c (term),
4867         * as/hc08/asexpr.c (term): fixed bug #887146
4868
4869 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4870
4871         * src/z80/gen.c (genMult): handle single byte result product
4872         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
4873         DUMMY_READ_VOLATILE (fixed bug #886367)
4874
4875 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
4876
4877         * support/regression/tests/libmullong.c: fixed logic, on little endian
4878         hosts we ended without a mullong_wrapper()
4879
4880 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4881
4882         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
4883         virus/worm forged address usage.
4884
4885 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
4886
4887         Fixed promotion, it should be done on AST level:
4888         * src/SDCCast.c (addCast): added promotion to int
4889         (decorateType): updated call to upCast()
4890         * src/SDCCicode.c (geniCodeLeftShift): removed call to
4891         usualUnaryConversions()
4892
4893 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
4894
4895         * support/regression/tests/literalop.c (mulWrapper): Added a
4896         wrapper to remove integer overflow warnings.
4897
4898         * support/regression/tests/float_trans.c: Made work on host.
4899
4900         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
4901         location of sz80.
4902
4903         * support/regression/generate-cases.py (main): Changed from inline
4904         to a main method.
4905
4906         * doc/Makefile (install): Changed to depth first to get rid of
4907         missing directory install warning.
4908
4909         * as/Makefile (install-doc): Made work on Mac.
4910
4911 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
4912
4913         * src/SDCCast.c: added an additional type flow in decorateType() of
4914         opposite direction, see feature request #860006; it's enabled at runtime
4915         by setting the environment variable SDCC_NEWTYPEFLOW
4916         * src/SDCCast.h: changed prototype of decorateType()
4917         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
4918         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
4919         'char' to 'int' can be omitted, if both operands are 'unsigned char';
4920         see feature request #877103
4921         * src/SDCCval.c: updated call of decorateType()
4922         (valBitwise): fixed bug #882876
4923         (valMinus): added promotion
4924         (valLogicAndOr): result is unsigned
4925         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
4926         * src/SDCCsymt.c (computeType),
4927         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
4928         must not cause an unsigned operation
4929         * src/pic/glue (pic14emitRegularMap),
4930         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
4931
4932 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
4933
4934         * src/pic/pcode.c (PCodeID): commented out left over debug code
4935
4936 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
4937
4938         * support/valdiag/tests/overflow.c: added shift tests
4939         * src/pic/device.c,
4940         * src/pic/gen.c,
4941         * src/pic/gen.h,
4942         * src/pic/glue.c,
4943         * src/pic/main.c,
4944         * src/pic/pcode.c,
4945         * src/pic/pcode.h,
4946         * src/pic/pcodepeep.c,
4947         * src/pic/pcoderegs.c,
4948         * src/pic/ralloc.c,
4949         * src/pic/ralloc.h: applied patch from Slade Rich;
4950         added support for multiple code pages and multiple RAM banks on the
4951         PIC 14 port. The ASM files now no longer simply assume all the
4952         code / RAM are in the same page / bank. This means the linker can
4953         safely allocate code/RAM of separate ASM files to different pages/banks.
4954         * doc/sdccman.lyx: added Slade's tips
4955         * src/mcs51/peeph.def: fixed bug #880768
4956
4957 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4958
4959         * src/hc08/ralloc.c (rematStr): fixed bug #879282
4960         * src/SDCCast.c (decorateType): fixed bug #880197
4961
4962 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
4963
4964         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
4965         getopt.h.
4966
4967         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
4968         strtof is not part of C89 and isn't included with Mac OS X.
4969
4970 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4971
4972         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
4973         shiftL2Left2Result): fixed bug #879326
4974         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
4975         (genMultOneByte): fixed bug in signed vs unsigned multiplication
4976         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
4977         address fetch for clr instruction
4978         * device/lib/hc08/_mulint.c: created optimized assembly version
4979         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
4980
4981 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
4982
4983         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
4984         proposed in FR #877103
4985
4986 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
4987
4988         * src/SDCCval.c (cheapestVal): added missing checks
4989         * src/SDCCicode.c (usualBinaryConversions): fixed condition
4990         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
4991
4992 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
4993
4994         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
4995         equal operands
4996
4997 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
4998
4999         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
5000         loaded with the linker search paths (-L arguments) and the libraries
5001         to be linked with the current source (-l arguments). Changes
5002         currently will affect only the pic16 port.
5003         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
5004         include path the port specific paths and port specific libraries,
5005         * gplink command now contains the $3 argument,
5006         * src/pic16/device.h,
5007         * src/pic16/device.c,: structure PIC_device is made public and
5008         renamed to PIC16_device, the same for variable Pics which is renamed
5009         to Pics16. Updated all references to them.
5010         * src/pic16/glue.c (pic16glue): corrected bug with code
5011         initialization which bypassed the variable initializations block.
5012
5013         * device/lib/pic16/Makefile.rules: removed --penable-stack from
5014         COMPILE_FLAGS and added the --nostdinc option
5015
5016 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5017
5018         * device/include/mc68hc908jb8.h: Register defs for another member
5019         of the hc08 family. Contributed by Bjorn Bringert - thanks!
5020
5021 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
5022
5023         Documenting changes from previous commits.
5024         * configure.in (version 1.56),
5025         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
5026         when generating output files to configure the pic16 library,
5027         but now I've commented it out, since gputils aren't installed in the
5028         SF compile farm, so library won't compile
5029
5030         * device/lib/Makefile.in (version 1.56): initially I've added in
5031         target 'all' the prerequestive 'model-pic16' so it compiled the
5032         pic16 library, but now I've commented it out for the same reasons
5033         above,
5034         * added targets 'model-pic16' and 'objects-pic16' to compile the
5035         library
5036         * added target 'port-specific-objects-pic16' to handle the
5037         generated libraries and copy them into the build/ directory
5038         * added target 'clean-intermediate-pic16' to clean intermediate
5039         files into pic16 directory
5040         * in target 'installdirs' added line to create directory pic16 in
5041         the installation path
5042
5043         * device/include/Makefile.in (version 1.11): in target 'install'
5044         added lines to copy all header files to installation path,
5045         * in target 'installdirs' added line create directory for pic16
5046         headers in the installation path
5047
5048 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
5049
5050         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
5051          a function call
5052
5053 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
5054
5055         * configure,
5056         * device/lib/configure.in,
5057         * device/lib/configure: fixed for autoconf 2.57
5058
5059 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5060
5061         * src/z80/main.c (_parseOptions): fixed the portmode= command line
5062         option so that it actually works. Made it specific to the z80, since
5063         the gbz80 doesn't have these kinds of I/O ports.
5064
5065 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5066
5067         * device/include/z180.h,
5068         * device/lib/_memcpy.c,
5069         * device/lib/_memmove.c,
5070         * device/lib/_mulint.c,
5071         * device/lib/ser_ir.c,
5072         * device/lib/ser_ir_cts_rts.c,
5073         * device/lib/_strcmp.c,
5074         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
5075         * src/z80/main.c (_process_pragma): add support for pragmas bank and
5076         portmode; added deprecation warning for bank= and protmode= forms.
5077         Also, guard against buffer overflow.
5078         * src/z80/gen.c (aopGet): generate better code for sfr banked read
5079
5080 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5081
5082         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
5083         changed interrupt vector table generation to only emit declared vectors.
5084         * device/include/Makefile.in: added missing backslash
5085         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
5086
5087 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5088
5089         Mainly changes to support compilation of the device libraries
5090         * src/pic16/device.c: stack is allocated via symbol and not
5091         via literal number. The symbol is placed in the corresponding
5092         position of the data ram
5093         * (pic16_dump_section): relocatable and absolute uninitialized
5094         data are now emitted in sorted order to reduce section naming,
5095         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
5096         weren't marked as being in the access bank,
5097
5098 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5099
5100         Added portion of GNU PIC Library under the directory
5101         device/include/pic16 and device/lib/pic16. These files
5102         contain the declarations of SFRs for the PIC18Fxx2 devices.
5103         The directory is initialized via configure from toplevel.
5104
5105 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
5106
5107         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
5108         the spilllocations to be compared correctly
5109
5110 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5111
5112         * src/SDCCast.c (decorateType): fixed bug introduced today
5113
5114 2004-01-12  Borut Razem <borut.razem AT siol.net>
5115
5116         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
5117         doc/sdccman.lyx: upper case pragmas are deprecated
5118
5119 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5120
5121         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
5122         in simpler and even better code
5123
5124 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
5125
5126         * src/SDCCicode.c (operandOperation): fixed bug #874819
5127         * src/SDCCast.c (decorateType): fixed
5128         char foo (unsigned long ul) { return ul > 0; }
5129
5130 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5131
5132         * doc/sdccman.lyx: Moved and added some sections, small changes
5133         all over. Telling LaTeX to be less strict with word spacing
5134         to better keep the right margin. Changed some notes about
5135         maintainance of the ports in section 3.2.1 - is it OK like this?
5136
5137 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
5138
5139         SDCC source changes:
5140         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
5141         convilong): modified to inform the pic16 port that builtin functions
5142         are external
5143
5144         PIC16 PORT specific changes:
5145         * src/pic16/device.c pic16_dump_equates() added,
5146         processor registers declared internally by the port are emitted in
5147         the translation as equates,
5148         * src/pic16/gen.c: inline code is passed unprocessed to the
5149         translation,
5150         * (pic16_popGetLit2): fnuction modified to take second operand as
5151         pCodeOp pointer and not as literal,
5152         * (popRegFromIdx): prefixed with pic16_,
5153         * (pic16_popCombine2): modified to receive already allocated pCode
5154         operands,
5155         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
5156         * (genFunction): initializes local stack frame and pushes on stack
5157         all the registers used by this function,
5158         * (genEndFunction): restores all registers from stack and restores
5159         stack frame,
5160         * src/pic16/glue.c (pic16emitRegularMap): various changes and
5161         improvements,
5162         * (pic16glue): changed the program startup sequence,
5163         * added new dbName code 'A' for functions placed in absolute section
5164         * src/pic16/main.c: added function attribute _naked,
5165         * added pragma 'code' to place a fnuction at an absolute address,
5166         * added command line arguments --debug-ralloc and --pcode-verbose,
5167         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
5168         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
5169         * (pic16_newpCodeOpLit2): modified to take the second operand as
5170         pCodeOp pointer,
5171         * (pic16_printpBlock): modified to emit each function in a separate
5172         section,
5173         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
5174         UPPER for immediate operands,
5175         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
5176         instruction,
5177         * src/pic16/peeph.def: all peepholes with movff are commented out,
5178         because there is a problem in the pcode peep optimizer,
5179         * src/pic16/ralloc.c: the register allocator can now reuse local
5180         function symbols for another function. This saves register usage.
5181         * src/pic16/ralloc.h: added flag isLocal in structure regs,
5182
5183         Added file src/pic16/NOTES with information about program writing on
5184         the current port version.
5185
5186 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5187
5188         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
5189         and peephole 252 (array access)
5190
5191 2004-01-09  Borut Razem <borut.razem AT siol.net>
5192
5193         * src/SDCCmain.c : fixed #872250: -l command line defined library
5194           files are scanned before standard library files
5195
5196 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5197
5198         * src/SDCCast.c (decorateType): fixed bug #874046
5199
5200 2004-01-09  Borut Razem <borut.razem AT siol.net>
5201
5202         * support/scripts/sdcc.nsi: remove previous installation
5203
5204 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5205
5206         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
5207         bytes for last interrupt vector (mcs51)
5208         * sdcc.spec: fixed typo
5209
5210 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5211
5212         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
5213         gen51Code): more efficient parameter receive for --model-large
5214         ("bug" #845294)
5215
5216 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5217
5218         * src/ds390/main.c,
5219         * src/z80/main.c: added missed needLinkerScript flags (more than
5220         one port structure defined in these file)
5221         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
5222         bug #795325
5223
5224 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
5225
5226         * src/SDCCmain.c: removed various references to DEFAULT_PORT
5227         * src/port.h: added flag needLinkerScript in port->linker
5228         structure to inform whether to create a .lnk file or not,
5229         * src/avr/main.c,
5230         * src/ds390/main.c,
5231         * src/hc08/main.c,
5232         * src/mcs51/main.c,
5233         * src/pic/main.c,
5234         * src/pic16/main.c,
5235         * src/xa51/main.c,
5236         * src/z80/main.c: changed appropriately to configure
5237         needLinkerScript flag
5238         * src/pic/gen.c,
5239         * src/pic16/gen.c (genAddrOf): fixed bug #863624
5240         * src/pic/glue.c: added variable udata_section_name to
5241         override default uninitialized data segment definition for
5242         devices only with SHAREBANK memory (reported from Erik Epetrich)
5243         * (pic14emitOverlay): modified to emit a commented overlay segment
5244         directive when no overlay data exist
5245         * (picglue): modified to emit uninitialized data segment
5246         according to udata_section_name
5247         * src/pic/main.c (_pic14_parseOptions): added command line
5248         options --udata-section-name=[name] to override default
5249         udata definition name
5250         * modified _linkCmd and _asmCmd to include compiler passed
5251         arguments via -W option
5252         * src/pic16/main.c: added $l in _asmCmd, changed extension for
5253         object file from '.rel' to '.o' in port->linker structure,
5254         changed size of fptr from 2 to 3 in port structure
5255
5256 2004-01-07  Borut Razem <borut.razem AT siol.net>
5257
5258         * support/scripts/sdcc.nsi: update PATH
5259         * support/scripts/sdcc.ico: craeted
5260
5261 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
5262
5263         * device/include/Makefile.in: fix install
5264         * doc/Makefile: fix install
5265
5266 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5267
5268         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
5269         in bug #860505
5270         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
5271         how the function variable allocation summary is displayed; also
5272         include information about variables allocated to the overlay
5273         segment
5274
5275 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5276
5277         * as/mcs51/lkmain.c: Help about -Y option
5278         * as/mcs51/lkarea.c: Fixed gcc warnings
5279
5280 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5281
5282         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
5283         fixed warning
5284         * support/valdiag/tests/overflow.c: added
5285         * src/SDCCast.c (decorateType),
5286         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
5287         LEFT_OP (left shift)
5288
5289 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5290
5291         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
5292         (default behaviour).
5293
5294 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5295
5296         A python script to validate compiler diagnostic messages. It can be
5297         used to verify that sdcc complains about bad c source code and
5298         gives a good location of the error.
5299         * support/valdiag/Makefile,
5300         * support/valdiag/valdiag.py,
5301         * support/valdiag/tests/*
5302
5303 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5304
5305         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
5306         * src/SDCCsymt.c (newEnumType),
5307         * src/SDCCsymt.h
5308         * support/Util/SDCCerr.c,
5309         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
5310         enum related bugs.
5311         * support/regression/tests/enum.c: added test for enum values that
5312         require at least 2 bytes of storage.
5313
5314 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5315
5316         * src/common.h: added ifndef/define/endif macros
5317         around the header file.
5318         Bug reported from Jesus Calvino-Fraga
5319
5320 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5321
5322         * sdcc.spec: updated
5323         * device/include/Makefile.in: don't install CVS directories
5324         * device/lib/Makefile.in: added removal of CVS directories after install
5325         * doc/Makefile: fixed install, added local_icons
5326         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
5327         * src/mcs51/gen.c (genRightShift): fixed bug #870788
5328         * src/ds390/gen.c (genRightShift): fixed bug #870788
5329         * src/SDCCast.c (decorateType): fixed bug #870781
5330
5331 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5332
5333         PIC16 port related changes:
5334         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
5335         added variable stackPos,
5336
5337         * gen.c: genCall, assignResultValue: added support for
5338         pushing/retrieving function parameters to/from stack,
5339         genFunction,genEndFunction: setup stack frame for the
5340         generated function,
5341         genAddrOf: will be changed according to bug 863624
5342
5343         * added files genutils.c and genutils.h which contain gen*
5344         debugged and optimised functions extracted from gen.c
5345
5346         * glue.c: added variable 'externs' which holds extern symbols,
5347         pic16emitRegularMap: is modified to properly handle relocatable
5348          symbols under the new scheme,
5349         pic16createInterruptVect: is modified
5350         pic16printPublics: is modified to emit 'global' assembler directives,
5351         added pic16_printExterns to print extern symbols,
5352         pic16glue: initializes stack/frame pointer in the beginning of
5353         the assembly output. Temporary hack, will be corrected later,
5354         because gplink yet does not support stack and SDCC does not
5355         yet support a type of crt0.o object to create the final binary.
5356
5357         * Removed many lines that contain 8051 legacy code.
5358         * The code is finally placed under a 'code' directive.
5359         * Added port specific options.
5360
5361         * _process_pragma: simplified since now we do not need *special*
5362         include file to define SFR registers. But a separate header
5363         will be needed. This will be developed later.
5364         * _pic16_parseOptions: added, parses port specific options:
5365         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
5366         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
5367         --preplace-udata-with=
5368
5369         * _pic16_setDefaultOptions: modified to initialize section names,
5370         but hack is temporarly out of order since it needs improvement.
5371         * _pic16_genAssemblerPreamble: configuration words are emitted by
5372         their address instead of their name. This part is incomplete and
5373         supports only the 18Fxx2 devices. Other devices will emit an error
5374         during assembly since they do not contain the same set of config
5375         registers
5376         * _pic16_genIVT: is modified,
5377
5378         * pcode.c: added definitions for some hardware registers that are needed
5379         for stack support
5380         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
5381         All PCI entries are updated. Now LFSR is supported.
5382         * Removed pic16_pciTRIS is mentioned by mdubuc in source
5383         * added pic16_newpCodeOpLit2 to support instructions with
5384         two literal arguments
5385         * pic16_pCode2str: corrected code that emits assembler instructions
5386         with two literal operands and those that have an access bit modifier
5387         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
5388         this fixes a bug which caused some labels to be lost, when an
5389         assembler directive was added, i.e. banksel,
5390         * pic16_FixRegisterBanking: improved logic that causes the insertion
5391         of bank switching,
5392         * InlineFunction: functions that are called once, are not any more
5393         inlined. This can be a port option in the future,
5394
5395         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
5396
5397         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
5398         hold the corresponding uninitialized symbols,
5399         * pic16_allocProcessorRegister: registers have explicit marked the
5400         accessBank field,
5401         * pic16_allocInternalRegister: registers are explicit marked as
5402         not used,
5403         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
5404         processing list, so bit registers were lost,
5405         *
5406
5407         * ralloc.h: added field 'accessBank' and original symbol operand
5408         in register definition,
5409         * removed the field isMapped from register definition,
5410
5411         ** Several functions have been removed from various sources:
5412         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
5413         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
5414         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
5415         pic16_assignRelocatableRegisters
5416
5417         ** others have been introduced:
5418         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
5419         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
5420
5421 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
5422
5423         * support/scripts/inc2h.pl: changed definition of BIT_AT
5424         to emit 'sbit at' instead of 'bit at'. This was a request.
5425
5426         PIC16 port related preliminary changes:
5427         * gen.c: prefixed function popRegFromString with
5428         pic16_ and all references to it corrected
5429         * pcode.c: all pic16_pc_* hardware registers prefixed
5430         with underscore (_),
5431         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
5432         * ralloc.c: newReg(): when register is REG_SFR then
5433         set address to rIdx,
5434         pic16_allocProcessorRegister(): marks register wasUsed=0
5435         pic16_writeUsedRegs(): added a call to assign processor
5436         registers via pic16_assignFixedRegisters
5437
5438 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5439
5440         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
5441         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
5442         variables in unused register banks.  Also the SSEG is placed
5443         wherever there is enough space for it, and IDATA can be anywhere
5444         in internal RAM.  For now compile using -Wl-Y[stack_size].
5445         The mem file is different for this option as well, since it
5446         makes no sense of talking about DSEG lenght.
5447
5448 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
5449
5450         * src/SDCClrange.c: fixed bug 869095 that caused segfault
5451         in certain cases, e.g. when ROM assignment, patch provided
5452         from Albert den Haan.
5453
5454 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
5455
5456         Many signedness and type propagation fixes:
5457         * src/SDCCicode.c: made geniCodeCast() static
5458         replaced SPEC_ by IS_ (cosmetic)
5459         (operandOperation): fixed div and mod operation
5460         (usualBinaryConversions): added support for promotion of char
5461         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
5462         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
5463         (geniCodeAdd): an array index will stay unsigned, even if promoted
5464         from char to int
5465         (geniCodeArray): ditto
5466         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
5467         * src/SDCCsymt.c (computeType): added more support for char;
5468         promotion of char is selectable by promoteCharToInt, fixed signedness
5469         for all cases
5470         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5471         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5472         * src/SDCCval (val*): replaced signedness calculation by
5473         computeType()
5474         rearranged if-branches (cosmetic)
5475         (valShift): added warning W_SHIFT_CHANGED
5476         (valCompare): fixed problem with different types
5477         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
5478         * support/regression/tests/literalop.c: added many cases
5479         * support/regression/tests/ast_constant_folding.c: changed finally to
5480         'unsigned int'
5481         * .version: new year, new version: 2.3.7
5482         * src/SDCCmain.c (main): applied patch #866468
5483         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
5484         provided by Scott Bronson
5485         * doc/sdccman.lyx: updated documentation for sdcdb
5486         updated and added chapter tips
5487
5488 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5489
5490         * src/SDCCsymt.h: missing from yesterday's commits
5491
5492 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5493
5494         * src/SDCC.y (struct_or_union_specifier),
5495         * support/Util/SDCCerr.c,
5496         * support/Util/SDCCerr.h: verify that struct & union tags are used
5497         as declared.
5498
5499 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5500
5501         * src/SDCCglobl.h: missing from yesterday's commits
5502
5503 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5504
5505         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
5506         sft_attributes, struct_declaration, parameter_declaration,
5507         type_name, start_block, declaration_list),
5508         * src/SDCC.lex (check_type): support redefinition of typedef names
5509
5510 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5511
5512         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
5513         aligned xdata arrays. Erik helped me with the if clause.
5514
5515 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5516
5517         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
5518         warning
5519
5520 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5521
5522         * src/SDCCast.h,
5523         * src/SDCCast.c (newAst_),
5524         * src/SDCCicode.h,
5525         * src/SDCCicode.c (ast2iCode, newiCode),
5526         * src/SDCCglobl.h,
5527         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
5528         expr, statement, expression_statement, selection_statement,
5529         iteration_statement, expr_opt, jump_statement): foundation for tracking
5530         sequence points
5531         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
5532         point code too)
5533
5534 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5535
5536         * support/Util/SDCCerr.c,
5537         * src/SDCCast.h,
5538         * src/SDCCast.c (createCase, createDefault, decorateType),
5539         * src/SDCClabel.c (labelUnreach),
5540         * src/SDCC.y (labeled_statement, jump_statement): More improvements
5541         to error messages.
5542         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
5543         (with thanks to Stas Sergeev)
5544         * device/include/time.h,
5545         * device/lib/time.c (CheckTime): suppress unreachable code warning
5546
5547 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5548
5549         * src/SDCCast.c (createIvalCharPtr),
5550         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
5551         bug #753752)
5552         * support/regression/tests/nullstring.c: tests for these two bugs
5553
5554 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5555
5556         * support/Util/SDCCerr.h,
5557         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
5558         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
5559         about storage class and 'at' used inside struct or union
5560         * src/SDCCBBlock.c (iCodeFromeBBlock),
5561         * src/SDCCcse.c (ifxOptimize),
5562         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
5563         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
5564         printIval, emitStaticSeg, emitOverlay),
5565         * src/SDCClabel.c (deleteIfx),
5566         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
5567         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
5568         gatherAutoInit, processParms),
5569         * support/Util/SDCCerr.h,
5570         * support/Util/SDCCerr.c (werrorfl): Support for better error location
5571         reporting for post-parse errors.
5572
5573 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5574
5575         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
5576         implicit casts via union; they don't work on big endian systems
5577         (possible fix for bug #861138)
5578
5579 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5580
5581         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
5582         * src/mcs51/main.c: fixed the fix for bug #737001
5583
5584 2003-12-15  Borut Razem <borut.razem AT siol.net>
5585
5586         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
5587
5588 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5589
5590         * support/makebin/makebin.c: put output in binary mode
5591
5592 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5593
5594         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
5595         xdata and data memory on startup. Set the environment variable
5596         SDCC_NOGENRAMCLEAR to disable this.
5597         * src/mcs51/peephole.def,
5598         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
5599         (allows non-interrupt and interrupt code to safely compete for a resource
5600         without the non-interrupt code having to disable interrupts)
5601
5602 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5603
5604         * src/SDCCicode.c (geniCodeAdd),
5605         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
5606         with valFromType if type might be a pointer and host is big endian).
5607         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
5608         types, not just integer types.
5609         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
5610         multiply defined with mismatching "at" address.
5611
5612 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5613
5614         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
5615         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
5616         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
5617         with embedded nulls (fixed bug #753752)
5618
5619 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5620
5621         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
5622         Apparently this did not see much testing (endless loop)
5623
5624 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5625
5626         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
5627
5628 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5629
5630         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
5631         gracefully handle NULL memmap pointers
5632
5633 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5634
5635         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
5636         instead of deleting the iCode when an operand is volatile
5637         * src/z80/gen.c (genDummyRead),
5638         * src/mcs51/gen.c (genDummyRead),
5639         * src/ds390/gen.c (genDummyRead),
5640         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
5641         not just IC_RIGHT
5642         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
5643         * src/SDCC.y: fixed bug #850420
5644
5645 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5646
5647         Applied z80 i/o port patch from Peter Townson and fixed some operators
5648         to better handle operands in A register.
5649         * device/include/z180.h
5650         * src/SDCC.y
5651         * src/SDCCglue.c
5652         * src/z80/gen.c
5653         * src/z80/gen.h
5654         * src/z80/main.c
5655         * src/z80/peeph-z80.def
5656         * src/z80/peeph.def
5657         * src/z80/z80.h
5658
5659 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5660
5661         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
5662
5663 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5664
5665         * device/lib/hc08/_mullong.c: Removed extra #endif
5666
5667 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5668
5669         * sim/ucsim/hc08.src/inst.cc,
5670         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
5671         carries from x to h
5672         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
5673         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
5674         * device/include/stdarg.h: fixed varargs for hc08
5675         * device/lib/Makefile.in,
5676         * device/lib/hc08/Makefile,
5677         * device/lib/hc08/_mulint.c,
5678         * device/lib/hc08/_mullong.c: fixed some endian problems
5679
5680 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5681
5682         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
5683         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
5684         * device/lib/_gptrget.c,
5685         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
5686
5687 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5688
5689         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
5690         * src/SDCCast.c (astErrors): fixed bug #846007
5691         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
5692
5693 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5694
5695         * src/SDCCast.c (decorateType): disabled a transformation I added in
5696         revision 1.188 (access to fields of a structure at an absolute address);
5697         it breaks with bitfields, extern declarations, and gcse analysis.
5698         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
5699         could be assigned through a pointer, so don't complain.
5700         * src/SDCCast.c (astErrors),
5701         * src/SDCCast.h,
5702         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
5703
5704 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
5705
5706         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
5707         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
5708         output of __config directives, since gpasm now supports them
5709         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
5710         pre-processor macro, i.e. -DMCU=p18f452
5711         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
5712         and modified to handle 'cast' icode similarly to '=' icode
5713         * src/pic16/device.h (typedef struct PIC_device): added field
5714         'extMIface' to indicate that chip has external memory interface
5715         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
5716         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
5717         18F8720
5718
5719 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5720
5721         * src/SDCC.y (pointer): fixed bug #846006
5722         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
5723         * src/SDCCast.c (decorateType): fixed bug #846009
5724         * src/ds390/peeph.def,
5725         * src/ds390/gen.c (genAnd, genOr),
5726         * src/mcs51/peeph.def,
5727         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
5728
5729 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5730
5731         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
5732         * src/SDCCdflow.c
5733         * src/SDCCcse.c
5734         * src/SDCCcse.h
5735         * src/SDCCBBlock.h
5736         * src/SDCCBBlock.c
5737
5738 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
5739
5740         fixed bug #845089
5741         * src/SDCCbitv.h,
5742         * src/SDCCbitv.c: added function to free a bitvector
5743         * src/SDCClrange.h,
5744         * src/SDCClrange.c: added function to recompute the liveranges
5745         * src/avr/ralloc.c,
5746         * src/ds390/ralloc.c,
5747         * src/hc08/ralloc.c,
5748         * src/mcs51/ralloc.c,
5749         * src/pic/ralloc.c,
5750         * src/pic16/ralloc.c,
5751         * src/xa51/ralloc.c,
5752         * src/z80/ralloc.c: recompute the liveranges after register packing
5753
5754 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
5755
5756         * src/SDCCloop.c (newInduction): fixed bug #845630
5757
5758 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5759
5760         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
5761         inadvertantly left behind from my 2003-11-12 change
5762
5763 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5764
5765         Updated headers I neglected to commit yesterday.
5766         * src/SDCClrange.h,
5767         * src/SDCCicode.h
5768
5769 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5770
5771         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
5772         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
5773         * src/SDCCopt.c (eBBlockFromiCode),
5774         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
5775         the creation of the key hash table from the sequencing so it can be used
5776         earlier (for some GCSE bug fixes still pending)
5777
5778 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5779
5780         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
5781         * support/regression/tests/addsub.c: testing genPlus shortcut
5782
5783 2003-11-15  Borut Razem <borut.razem AT siol.net>
5784
5785         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
5786
5787 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5788
5789         * src/SDCCcse.c (cseBBlock): fixed bug #527779
5790         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
5791         ordering is immaterial.
5792         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
5793
5794 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5795
5796         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
5797         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
5798         (SIGSEV) of bug #840381
5799         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
5800         unlink new file before rename if new and old filenames are the same)
5801
5802 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5803
5804         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
5805         uninitialized variables) for the mcs51. Set environment variable
5806         SDCC_GENRAMCLEAR to test.
5807         xdata initialization slightly shorter
5808
5809 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5810
5811         * src/SDCCsymt.h,
5812         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
5813         #838241 & 780691 (basicly the same bug)
5814         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
5815         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
5816
5817 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
5818
5819         * src/SDCCmain.c (linkEdit): "fix" #834252
5820
5821 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5822
5823         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
5824         * src/SDCCast.h,
5825         * src/SDCC.y: fixed bug #819403
5826
5827 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5828
5829         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
5830         the reentrant attribute.
5831         * src/hc08/gen.c (genPackBits): added missing stack readjustment
5832         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
5833         simulation
5834         * src/SDCCast.c (decorateType): fixed bug with storage class not being
5835         updated during pointer dereference; f.e. ~(((char *)1)*) was being
5836         erroneously reduced to a literal.
5837         * src/hc08/ralloc.c (packRegisters, rematStr),
5838         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
5839         some cases
5840
5841 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5842
5843         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
5844         * doc/sdccman.lyx: changed from 'article' to 'book'
5845         * doc/Makefile: readded test_suite_spec and cdbfileformat
5846
5847 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
5848
5849         * device/include/stdlib.h: include malloc.h to comply with ANSI
5850         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
5851
5852 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5853
5854         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
5855         * doc/clean.mk: also remove *.out files
5856         * doc/sdccman.lyx: some additions, larger top/bottom margins
5857
5858 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5859
5860         * src/SDCC.y: fixed bug #837365
5861         * support/regression/tests/bitopcse.c
5862         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
5863         a symbol (might be valop instead)
5864         * device/lib/Makefile.in: added errno.c to HC08SOURCES
5865         * device/lib/clean.mk: added hc08 to the cleaning list
5866
5867 2003-11-04  Borut Razem <borut.razem AT siol.net>
5868
5869         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
5870           made 2003-11-04
5871         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
5872           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
5873           malloc is declared in standard stdlib.h
5874
5875 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5876
5877         * device/lib/hc08/Makefile: need to clean .rel not .o files
5878         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
5879
5880 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5881
5882         * src/port.h,
5883         * src/hc08/main.c,
5884         * src/mcs51/main.c,
5885         * src/ds390/main.c,
5886         * src/z80/main.c,
5887         * src/avr/main.c,
5888         * src/pic/main.c,
5889         * src/pic16/main.c,
5890         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
5891         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
5892         tests (which uses the port's oclsExpense function)
5893         * src/SDCC.y,
5894         * src/SDCCast.c,
5895         * src/SDCCicode.c,
5896         * src/hc08/gen.c,
5897         * src/ds390/gen.c,
5898         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
5899
5900 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5901
5902         * src/SDCCcse.c (ifxOptimize),
5903         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
5904         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
5905         deleting the IFX iCode.
5906         * src/hc08/ralloc.c: reduced unneeded slocs
5907         * src/hc08/gen.c: fixed bug in asmopToBoolean
5908
5909 2003-11-04  Borut Razem <borut.razem AT siol.net>
5910
5911         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
5912           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
5913           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
5914           transferred to configure
5915
5916 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
5917
5918         Use headers defined in the C[++] standards:
5919         * sim/ucsim/gui.src/serio.src/fileio.cc
5920         * sim/ucsim/gui.src/serio.src/frontend.cc
5921         * sim/ucsim/gui.src/serio.src/main.cc
5922         * sim/ucsim/gui.src/serio.src/posix_signal.cc
5923         * support/Util/NewAlloc.c
5924         * as/hc08/lklibr.c
5925         * as/mcs51/lklibr.c
5926         * as/z80/aslist.c
5927         * as/z80/assym.c
5928
5929 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5930
5931         * Added MSVC projects for hc08 assembler and linker:
5932         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
5933         /as/hc08/link_hc08.dsp
5934
5935 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
5936
5937         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
5938
5939 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
5940
5941         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
5942
5943 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5944
5945         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
5946
5947 2003-10-31  Borut Razem <borut.razem AT siol.net>
5948
5949         * support/cpp2/cpplib.h,
5950           support/cpp2/cpplib.c,
5951           support/cpp2/cpplex.c,
5952           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
5953           to switch _asm block preprocessing on / off. Default is
5954           #pragma preproc_asm +
5955
5956 2003-10-31  Borut Razem <borut.razem AT siol.net>
5957
5958         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
5959           when outputting comment blocks (when executed with -C option) and
5960           _asm (SDCPP specific) blocks
5961
5962 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5963
5964         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
5965
5966 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
5967
5968         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
5969
5970 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
5971
5972         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
5973         * src/SDCCast.c (decorateType): fixed bug #832664
5974
5975 2003-10-31  Borut Razem <borut.razem AT siol.net>
5976
5977         * support\cpp2\cpplex.c: fixed for SDCPP:
5978           comments(when executed with -C option) and _asm blocks
5979           were included even if they where in skipped #if block.
5980           Applied solution from GCC cpp 3.3.2
5981
5982 2003-10-31  Borut Razem <borut.razem AT siol.net>
5983
5984         * src/SDCC.lex: sdcc now understands both formats:
5985           '# <line_number> <file_name>' and
5986           '#line <line_number> <file_name>'
5987         * support/cpp2/cppmain.c: sdcpp now generates the standard
5988           '# <line_number> <file_name>' instead of former
5989           '#line <line_number> <file_name>'
5990
5991 2003-10-30  Borut Razem <borut.razem AT siol.net>
5992
5993         * support/cpp2/cpphash.h,
5994         * support/cpp2/cpplib.h
5995         * support/cpp2/cpplex.c,
5996         * support/cpp2/cppmain.c,
5997         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
5998
5999 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6000
6001         Fixed a number of problems revealed by bug #827883.
6002         * src/SDCCloop.c (loopInvariants): Spill location of the
6003         result operand should be recomputed if extracted from
6004         a loop. Also, don't extract assignments of an iTemp
6005         from a literal.
6006         * src/SDCCast.c (isConformingBody): loop reversal should
6007         not occur if the control variable is involved with a
6008         relational operator.
6009
6010 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
6011
6012         * .version: bumped to 2.3.6 to reflect the big improvements
6013         made by Erik and Klaus. Thanks!
6014
6015 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
6016
6017         Replaced the livrange code.
6018         * src/SDCClrange.c: added new LR code
6019         * src/SDCCloop.c,
6020         * src/SDCCBBlock.h: removed remainig parts from old LR code
6021         * src/ds390/ralloc.c,
6022         * src/ds390/gen.c: minor fixes to make it work with new code
6023
6024 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6025
6026         * as/hc08/asm.h,
6027         * as/hc08/lkrloc.c,
6028         * src/hc08/gen.c,
6029         * src/hc08/ralloc.c: Fix various warnings related to the hc08
6030         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
6031         (tweaked fix for bug #818696)
6032
6033 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6034
6035         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
6036
6037 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6038
6039         * src/SDCCmain.c,
6040         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
6041         * src/mcs51/gen.c (gencjneshort),
6042         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
6043         more efficient (per Scott Bronson's suggestion)
6044
6045 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6046
6047         Extended the semantics of the critical keyword to include
6048         individual statements. See RFE #827755 and #799831
6049         * src/SDCC.y
6050         * src/SDCCicode.c
6051         * src/SDCCopt.c
6052         * src/SDCCast.c
6053         * support/Util/SDCCerr.c
6054         * support/Util/SDCCerr.h
6055         * src/mcs51/gen.c
6056         * src/ds390/gen.c
6057         * src/hc08/gen.c
6058
6059 2003-10-19  Borut Razem <borut.razem AT siol.net>
6060
6061         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
6062
6063 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6064
6065         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
6066         Fixed bug #818696
6067         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
6068         and predecrement operand is displayed
6069
6070 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6071
6072         * src/SDCCval.c (valMinus): fixed bug #826041
6073
6074 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6075
6076         Some hc08 related updates that I missed earlier
6077         * sim/ucsim/stypes.h
6078         * support/regression/ports/hc08/spec.mk
6079
6080 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6081
6082         New target "hc08" for the Motorola 68hc08 family of micros
6083
6084         * configure
6085         * configure.in
6086         * Makefile
6087         * src/hc08/*
6088         * src/SDCCmain.c
6089         * src/port.h
6090         * sim/ucsim/hc08.src/*
6091         * sim/ucsim/configure.in
6092         * src/ucsim/configure
6093         * sim/ucsim/packages_in.mk
6094         * as/hc08/*
6095         * as/Makefile
6096         * device/include/mc68hc908qy.h
6097         * device/lib/hc08/*
6098         * device/lib/Makefile.in
6099         * support/regression/ports/hc08/*
6100         * support/regression/Makefile
6101
6102 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6103
6104         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
6105         regression test
6106         * src/ds390/gen.c (genCast): fixed bug #821957
6107
6108 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6109
6110         * device/lib/logf.c: "fixed" overlay bug
6111         * support/regression/ports/host/spec.mk: added m library
6112         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
6113         * support/regression/tests/float_trans: added (for Eric)
6114
6115 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
6116
6117         * src/mcs51/gen.c (genCpl): fixed bug
6118         http://sf.net/mailarchive/message.php?msg_id=6263915
6119
6120 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
6121
6122         * src/SDCCast.c (decorateType): added extended constant folding
6123         * src/SDCCsymt.c (computeType): cleanup
6124         * src/SDCCval.c (valShift): minor optimization
6125         * support/regression/tests/ast_constant_folding.c: added
6126
6127 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6128
6129         * src/SDCCmain.c: removed some unintended changes
6130
6131 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6132
6133         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
6134         * src/z80/gen.c: fixed part of bug #817589
6135         * src/SDCCsymt.c (checkFunction): fixed bug #817895
6136
6137 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
6138
6139         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
6140         * src/SDCCcflow.c
6141         * src/SDCCcse.c
6142         * src/SDCCdflow.c
6143         * src/SDCClabel.c
6144         * src/SDCClrange.c
6145         * src/SDCCmem.c
6146         * src/SDCCopt.c
6147         * src/SDCCpeeph.c
6148         * src/SDCCset.c
6149         * src/avr/ralloc.c
6150         * src/ds390/ralloc.c
6151         * src/izt/ralloc.c
6152         * src/mcs51/ralloc.c
6153         * src/pic/ralloc.c
6154         * src/pic16/ralloc.c
6155         * src/xa51/ralloc.c
6156         * src/z80/ralloc.c
6157         * src/z80/gen.c: removed unused label "release:"
6158
6159 2003-10-06  Borut Razem <borut.razem AT siol.net>
6160
6161         * src/SDCC.lex: removed definition of unused variables
6162           save_optimize and save_options
6163
6164 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
6165
6166         * clean.mk: removed '=' in "-maxdepth=1"
6167         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
6168         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
6169
6170 2003-10-06  Borut Razem <borut.razem AT siol.net>
6171
6172         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
6173           my_unput() replaced by unput()
6174
6175 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
6176
6177         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
6178         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
6179         type-punned pointer will break strict-aliasing rules"
6180         Old LR behaviour is again default; Klaus' LR can be choosen by
6181         defining the environment variable LRKLAUS
6182         * src/SDCCBBlock.h
6183         * src/SDCCloop.c
6184         * src/SDCClrange.c
6185         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
6186         * clean.mk: fixed removal of files in bin/CVS/
6187         * device/lib/clean.mk: fixed removal of directories small and large
6188         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
6189         * src/SDCCicode.c,
6190         * src/SDCCval.c: removed superflous test for pedantic
6191
6192 2003-10-05  Borut Razem <borut.razem AT siol.net>
6193
6194         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
6195           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
6196           message "unmatched #pragma SAVE and #pragma RESTORE"
6197
6198 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6199
6200         * doc/sdccman.lyx: various additions and updates (interrupts, inline
6201           assembly, critical functions, atomic, nojtbound)
6202
6203 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
6204
6205         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
6206         * src/SDCCBBlock.h
6207         * src/SDCCloop.c
6208         * src/SDCCloop.h
6209         * src/SDCClrange.c
6210
6211 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6212
6213         * src/z80/gen.h,
6214         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6215         * src/mcs51/gen.h
6216         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6217         * src/ds390/gen.h
6218         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6219         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
6220         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
6221
6222 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6223
6224         * src/z80/gen.c (genRet): fixed bug #524753
6225         * src/z80/gen.c (genCast): fixed internal error on cast from
6226         pointer to long
6227         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
6228         fix for bug #477835 to the z80
6229         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
6230         for tracking iCodes in the peephole optimizer for z80
6231
6232 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6233
6234         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
6235         the other part of bug #814548
6236         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
6237
6238 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
6239
6240         * src/SDCCcse.c: fixed part of bug #814548
6241
6242 2003-09-28  Borut Razem <borut.razem AT siol.net>
6243
6244         * src/asm.c: rewrite of printILine() to use temporary file instead
6245           a pipe
6246         * src/xa51/main.c: commented out declaration of int rewinds
6247
6248 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6249
6250         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
6251
6252 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6253
6254         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
6255         * src/asm.c (printILine): Fixed bug #811015
6256
6257 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6258
6259         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
6260         freeing.
6261
6262 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6263
6264         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
6265         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
6266         to correctly handle general case of AOP_PAIRPTR
6267         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
6268
6269 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6270
6271         * src/mcs51/ralloc.c (fillGaps),
6272         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
6273         register positioning bug)
6274
6275 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
6276
6277         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
6278
6279 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6280
6281         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
6282         genCodePointerGet, genGenPointerGet, genFarPointerSet,
6283         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
6284         (ralloc doesn't intentionally do this now, but perhaps later)
6285         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
6286         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
6287         register positioning bugs (Fixed bug #762602 and #795325)
6288         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
6289         (Fixed bug #808779)
6290         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
6291         lines that --i-code-in-asm generates
6292
6293 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6294
6295         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
6296         trying to fclose a FILE* that was already closed.
6297
6298 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6299
6300         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
6301         of const struct should be treated as if const themselves)
6302
6303 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
6304
6305         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
6306
6307 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6308
6309         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
6310         Unix (/n) and DOS (/r/n) line terminations.
6311
6312 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6313
6314         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
6315         bug #613775
6316
6317 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6318
6319         * src/mcs51/gen.c (genFunction, genEndFunction),
6320         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
6321         and restore of EA so that stack offsets to parameters are
6322         correct when using both critical and reentrant/stack-auto.
6323         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
6324         size (can be triggered in error if sloc is shared between
6325         different sized objects)
6326         * device/include/float.h: fixed macros to explicitly use
6327         unsigned long where needed
6328
6329 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
6330
6331         Feature req. 799831: added code to allow nesting of critical functions
6332         * src/mcs51/gen.c (genFunction, genEndFunction)
6333         * src/ds390/gen.c (genFunction, genEndFunction)
6334
6335 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6336
6337         * src/SDCCsymt.c (sclsFromPtr),
6338         * src/SDCCsymt.h,
6339         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
6340         support for standard C idiom of memory mapped variables; for
6341         example, *((xdata int*)0x1234) = 1 is now internally equivalent
6342         to xdata int at 0x1234 tempvar = 1.
6343         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
6344         provided by Akiya ISHIDA
6345
6346 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
6347
6348         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
6349         * src/SDCCval.c (constVal): added reduction from int to char
6350         * src/SDCCval.c (valMult, valDiv): fixed sign handling
6351         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
6352         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
6353         to ignore the sign
6354         * support/regression/tests/shifts.c: fixed
6355
6356 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6357
6358         * src/z80/gen.c (genXor): Fixed bug #805445
6359
6360 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6361
6362         Fixed bug #621531 (const & volatile confusion in the type chain).
6363         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
6364         refer to the const or volatile state of the pointer itself.
6365
6366         * src/SDCCast.c
6367         * src/SDCCglue.c
6368         * src/SDCCicode.c
6369         * src/SDCCsymt.c
6370         * src/SDCCval.c
6371         * src/SDCC.y
6372         * src/SDCCsymt.h
6373         * src/pic/gen.c
6374         * src/pic/ralloc.c
6375         * src/pic16/gen.c
6376         * src/pic16/ralloc.c
6377         * support/regression/tests/const.c
6378
6379 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6380
6381         When checking for duplicated modules, use absolute paths
6382         instead of relative paths.  Files changed:
6383
6384         * as/mcs51/lklib.c
6385         * link/z80/lklib.c
6386
6387 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6388
6389         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
6390
6391 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6392
6393         * device/include/string.h: added size_t typedef, changed
6394         prototypes to use size_t, eliminated separate reentrant and
6395         non-reentrant declarations, added _memmove declaration
6396         * device/lib/_memcpy.c: changed to use size_t instead of int,
6397         changed /4 to >>2 to avoid division library call
6398         * device/lib/_memcmp.c,
6399         * device/lib/_memset.c,
6400         * device/lib/_strncat.c,
6401         * device/lib/_strncpy.c,
6402         * device/lib/_strncmp.c: changed to use size_t instead of int
6403         * device/lib/_memmove.c: new file (fixed bug #772294)
6404         * device/lib/Makefile.in: added _memmove.c
6405         * device/lib/z80/asm_strings.s: fixed bug #772290
6406         * support/regression/tests/bitfields.c: attempt to fix host assertion
6407         failure on amd64-unknown-linux2.2
6408
6409 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6410
6411         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
6412         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
6413         * as/z80/asmain.c (main): fixed bug #801766
6414
6415 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
6416
6417         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
6418         compilers
6419
6420 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6421
6422         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
6423         reported in bug #800609
6424
6425 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
6426
6427         * Top header beautifications in src/pic16 directory:
6428           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
6429           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
6430           pcoderegs.h, ralloc.c, ralloc.h
6431         * main.c: added top header and GPL license notice
6432         * pcode.c: fixed the if-conditional warning
6433
6434 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
6435
6436         * device/lib/_mullong.c: replaced int by short for gcc
6437
6438 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6439
6440         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
6441         and JUMPTABLE iCodes properly now (worked by accident before)
6442         * src/mcs51/gen.c (leftRightUseAcc),
6443         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
6444         iCode properly now. Use getSize instead of nRegs since a & b
6445         aren't part of the nRegs tally.
6446
6447 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
6448
6449         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
6450         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
6451           before instructions that use the _STATUS register
6452
6453 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
6454
6455         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
6456         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
6457         fetching of the pointer
6458         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
6459         copied from genNearPointerSet()
6460         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
6461         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
6462         If they pop r0/r1 they must be called in the opposite order than aopOp().
6463         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
6464         (resp. --stack-auto), prepared for --xstack
6465
6466 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6467
6468         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
6469
6470 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
6471
6472         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
6473         these ports have their own __sdcc_external_start()
6474
6475 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
6476
6477         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6478         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
6479         type for bits was changed. It resulted in bit variables becoming
6480         global, which is not permitted in PIC 14 assembly output.
6481
6482 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6483
6484         * doc/sdccman.lyx: various additions and updates. Rearranged sections
6485
6486 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6487
6488         Z80 and MCS51 linkers complaint if a public symbol is defined
6489         in more than one library module:
6490
6491         * as/mcs51/lklib.c
6492         * link/z80/lklib.c
6493         * as/mcs51/Makefile.in
6494
6495 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6496
6497         A few small changes that speed up the peephole optimizer.
6498
6499         * src/SDCCpeeph.c
6500
6501 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6502
6503         Try to make the peephole optimizer smarter by maintaining
6504         an association between the assembly source code and the
6505         iCodes that originated them. Put this information to use
6506         with a new peephole rule condition "notVolatile" so that
6507         the rules can be aggressive yet still safe.
6508
6509         * src/SDCCpeeph.c
6510         * src/SDCCpeeph.h
6511         * src/mcs51/gen.c
6512         * src/mcs51/peeph.def
6513
6514 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6515
6516         Fixed bug #741761
6517
6518         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
6519         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
6520         if the left or right operand symbols have the accuse flag set.
6521
6522 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6523
6524         Changed the type of the result of the ! (NOT) operator to char;
6525         previously it returned the same type as the source. This allows
6526         us to eliminate all the genFloatNot functions (all of its target
6527         implementations were very buggy) since !float can use the same
6528         code as !long now.
6529
6530         * src/SDCCicode.c (ast2iCode): ! returns char
6531         * src/mcs51/gen.c (genNot, genNotFloat),
6532         * src/ds390/gen.c (genNot, genNotFloat),
6533         * src/z80/gen.c (genNot, genNotFloat),
6534         * src/pic/gen.c (genNot, genNotFloat),
6535         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
6536
6537 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
6538
6539         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6540         1. Interrupt would not compile properly. Ensure PCLATH register is saved
6541            during interrupts. Ensure WSAVE is located at a shared bank address.
6542         2. Fixed page selection in some places
6543         3. Fixed BTFSS/C to where necessary use registers directly and not simply
6544            the registers name strings.
6545         4. Fixed "signed / unsigned compare" compiler warnings.
6546         5. The PIC port manages its own allocation of the general purpose
6547            registers, but makes no attempt to reuse them. As a result when
6548            compiling it soon runs out of general purpose registers. Some
6549            additional code was added to the files pcode.c and device.c to walk
6550            through the function call tree and rename the registers so that they
6551            get reused.
6552
6553         * src/pic/device.c
6554         * src/pic/gen.c
6555         * src/pic/glue.c
6556         * src/pic/pcode.c
6557         * src/pic/pcode.h
6558         * src/pic/ralloc.c
6559         * src/pic/ralloc.h
6560         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
6561         genPlus() & genMinus() when the result is the same as left or right
6562
6563 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6564
6565         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
6566
6567 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6568
6569         Made bitfield a distinct type from bit so that bitfields
6570         convert as per ANSI C and bits retain their traditional
6571         boolean style behaviour. Implemented bitfield support in
6572         the z80 port.
6573
6574         * src/SDCCsymt.h,
6575         * src/SDCCsymt.c,
6576         * src/SDCCast.c,
6577         * src/cdbFile.c,
6578         * src/mcs51/gen.c,
6579         * src/ds390/gen.c: bit v bitfield split
6580         * src/z80/gen.c: New support for bitfields
6581         * support/regression/tests/bitfields.c: reenabled z80,
6582         added more tests
6583
6584 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6585
6586         Rules 246.x, 247.x relate to bitfields, the others speed up
6587         access to xdata mapped I/O devices.
6588
6589         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
6590
6591 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6592
6593         Cleaned up genPackBits and genUnpackBits and added two helper
6594         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
6595         for literal assignments in genPackBits (thanks to Frieder for
6596         reminding me).
6597
6598         * src/mcs51/gen.c
6599         * src/ds390/gen.c
6600
6601 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6602
6603         Fixed bug #748310 (pointer to function type mishandled when the
6604         function name is omitted). Also fixed a SIGSEGV when a function
6605         attribute (reentrant, etc) is used on a non-function or on a
6606         function but misplaced before the parameter list.
6607
6608         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
6609         bug #748310
6610         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
6611         * support/Util/SDCCerr.h,
6612         * support/Util/SDCCerr.c: Added func attr misuse error msg
6613
6614 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6615
6616         Fixed bug #787649 by anonymous
6617         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
6618         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
6619
6620 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6621
6622         Fixed numerous bitfield problems.
6623
6624         * src/SDCC.y: More bitfield related error checking
6625         * src/SDCCsymt.h,
6626         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
6627         * support/Util/SDCCerr.h,
6628         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
6629         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6630         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6631         * support/regression/tests/bitfields.c: tests added
6632
6633 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6634
6635         Made the constant following the "interrupt" keyword optional. If
6636         omitted, the function will not automatically be given an entry
6637         in the interrupt vector table (similar to #pragma NOIV, but
6638         less syntacticly kludgy). The interrupt number is also now
6639         range checked. Also fixed a bug in the high order bit example
6640         in the manual.
6641
6642         * src/SDCC.y
6643         * src/SDCCmem.c
6644         * src/SDCCglue.c
6645         * src/SDCCsymt.h
6646         * support/Util/SDCCerr.c
6647         * support/Util/SDCCerr.h
6648         * doc/sdccman.lyx
6649
6650 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6651
6652         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
6653         * src/SDCCicode.c (operandOperation): rewritten some ops
6654         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
6655         * src/SDCCsymt.c (computeType): literals are handled the same way as any
6656         other type
6657         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
6658         be re-activated by defining REDUCE_LITERALS)
6659         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
6660         unsigned, but are signed by default
6661         * src/SDCCval.c (constVal): rearranged
6662         * src/SDCCval.c (valMod): preliminary fix
6663         * src/SDCCval.c (valCastLiteral): use TYPE_* types
6664         * support/regression/literalop.c: added, work in progress
6665
6666 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6667
6668         Generate warnings for useless declarations like "char data;"
6669         that don't do what new users expect.
6670
6671         * src/SDCC.y
6672         * support/Util/SDCCerr.h
6673         * support/Util/SDCCerr.c
6674
6675 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
6676
6677         * src/SDCCval.c (valMult): fix overflow detection of negative int
6678
6679 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6680
6681         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
6682
6683         Changes to support big endian targets:
6684
6685         * src/ports.h
6686         * src/SDCCglue.c
6687         * src/avr/main.c
6688         * src/ds390/main.c
6689         * src/izt/i186.c
6690         * src/mcs51/main.c
6691         * src/pic/main.c
6692         * src/pic16/main.c
6693         * src/xa51/main.c
6694         * src/z80/main.c
6695
6696 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
6697
6698         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
6699         * device/lib/time.c: fixed warning "integer overflow in expression"
6700
6701 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
6702
6703         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
6704         * src/SDCCval.c (constVal): changed default to signed; hex and octal
6705         constants are unsigned; added recognition of "u" flag for unsigned
6706         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
6707         * src/SDCCval.c (valDiv, valMod): fixed signdness
6708         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
6709         signedness of modulo, left and right shift
6710         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
6711         * support/Util/SDCCerr.h: added warning W_INT_OVL
6712         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
6713         * src/SDCCast.c (ast_print): improved output of constants
6714
6715 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6716
6717         Fixed some warnings when building with MSVC:
6718
6719         * as\mcs51\asdata.c
6720         * as\z80\asdata.c
6721         * as\mcs51\asm.h
6722         * as\z80\asm.h
6723         * link\z80\aslink.h
6724         * link\z80\lkdata.c
6725         * link\z80\lkeval.c
6726         * link\z80\lkgb.c
6727         * link\z80\lkihx.c
6728         * link\z80\lks19.c
6729         * link\z80\lksym.c
6730         * support\cpp2\cpplib.c
6731         * src\ds390\gen.c
6732         * src\mcs51\gen.c
6733
6734 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
6735
6736         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
6737
6738 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6739
6740         * support\librarian\clean.mk: Do not remove Makefile.
6741         * support\librarian\Makefile: added.
6742
6743 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6744
6745         Added librarian to MSVC build:
6746         * all.dsp
6747         * sdcc.dsw
6748         * support\librarian\librarian.dsp
6749
6750         'configure' not needed for librarian, removed:
6751         * support\librarian\configure
6752         * support\librarian\configure.in
6753         * support\librarian\config_in.h
6754         * support\librarian\Makefile.in
6755
6756         Hopefully these ones built the librarian and the rest of sdcc properly:
6757         * Makefile
6758         * Makefile.common.in
6759
6760         Messed up 'configure', so revert to previous version:
6761         * configure
6762         * configure.in
6763
6764 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
6765
6766         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
6767         there, while the mantissa of a double is "only" 53 bits wide.
6768
6769 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6770
6771         Adding sdcclib to the build.  MSVC project coming soon.
6772         Files added/changed:
6773
6774         * support\librarian\clean.mk
6775         * support\librarian\configure
6776         * support\librarian\configure.in
6777         * support\librarian\config_in.h
6778         * support\librarian\Makefile.bcc
6779         * support\librarian\Makefile.in
6780         * support\librarian\sdcclib.c
6781         * Makefile.bcc
6782         * Makefile
6783         * Makefile.common.in
6784         * configure
6785         * configure.in
6786
6787 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6788
6789         Linker now complaints if linked modules have conflicting options, for
6790         example, one compiled using --model-large and another one compiled with
6791         --model-small.  The following files were modified:
6792
6793         * as\mcs51\asdata.c
6794         * as\mcs51\aslink.h
6795         * as\mcs51\asm.h
6796         * as\mcs51\asmain.c
6797         * as\mcs51\asout.c
6798         * as\mcs51\i51pst.c
6799         * as\mcs51\lkdata.c
6800         * as\mcs51\lklibr.c
6801         * as\mcs51\lkmain.c
6802         * as\z80\asdata.c
6803         * as\z80\asm.h
6804         * as\z80\asmain.c
6805         * as\z80\asout.c
6806         * as\z80\z80pst.c
6807         * link\z80\aslink.h
6808         * link\z80\lkdata.c
6809         * link\z80\lklibr.c
6810         * link\z80\lkmain.c
6811         * src\SDCCglue.c
6812
6813 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6814
6815         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
6816         as/mcs51/lklibr.c: Generate a warning when a library is not found.
6817
6818 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
6819
6820         * src/z80/mappings.i: fix _mul[us][int,long] entries
6821
6822 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6823
6824         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
6825
6826 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
6827
6828         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
6829         * support/regression/tests/bitopcse.c: added
6830         fixed warning:
6831         * src/avr/gen.c:
6832         * src/pic/gen.c:
6833         * src/pic16/gen.c:
6834         * src/z80/gen.c:
6835         * src/xa51/gen.c:
6836
6837 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6838
6839         added support for new library format to z80, gbz80 linkers:
6840         *link/z80/aslink.h
6841         *link/z80/lklex.c
6842         *link/z80/lklib.c
6843         *link/z80/lklist.c
6844
6845 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
6846
6847         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
6848         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
6849
6850 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
6851
6852         added DUMMY_READ_VOLATILE:
6853         * src/SDCC.y:
6854         * src/avr/gen.c:
6855         * src/xa51/gen.c:
6856         * src/z80/gen.c:
6857         * src/pic/gen.c:
6858         * src/pic16/gen.c:
6859         * src/mcs51/gen.c:
6860         * src/ds390/gen.c:
6861         * src/SDCCcse.c (algebraicOpts): many improvements
6862         * src/SDCCcse.h: removed algebraicOpts()
6863         * src/SDCCicode.c (picDummyRead): added
6864
6865 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6866
6867         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
6868         "Insufficient space in data memory".
6869
6870 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6871
6872         * src/mcs51/gen.c: fixed bug #771358
6873         * src/z80/gen.c: fixed bug #759087
6874
6875 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
6876
6877         * src/pic16/glue.c: minor cleanup by Vangelis
6878
6879 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6880
6881         * device/include/regc515c.h: fixed #758477
6882         * device/lib/_gptrget.c: saving some cycles in generic pointer get
6883         * device/lib/_gptrput.c: saved a few bytes
6884         * my tab spacing is 8, yours too?)
6885         * device/lib/_ser.c: process RX bytes earlier than TX bytes
6886         * device/lib/serial.c: process RX bytes earlier than TX bytes
6887         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
6888
6889 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6890
6891         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
6892
6893 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6894
6895     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
6896
6897 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
6898
6899         * device/lib/Makefile.in: bad fix, reverted to 1.43
6900
6901 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
6902
6903         * device/lib/Makefile.in: added missing z80 object files
6904
6905 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
6906
6907         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
6908         pic16 progress by Vangelis:
6909         * src/SDCCglobl.h:
6910         * src/SDCCmain.c:
6911         * src/pic/Makefile:
6912         * src/pic:
6913         * pic/Makefile:
6914         * pic16/device.c:
6915         * pic16/device.h:
6916         * pic16/gen.c:
6917         * pic16/gen.h:
6918         * pic16/genarith.c:
6919         * pic16/glue.c:
6920         * pic16/main.c:
6921         * pic16/pcode.c:
6922         * pic16/pcode.h:
6923         * pic16/pcodepeep.c:
6924         * pic16/peeph.def:
6925
6926 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6927
6928     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
6929
6930 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6931
6932     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
6933     added gbz80 build to MSVC project.
6934     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
6935     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
6936     from 8051 stuff and setup so it links using a .lnk file.
6937
6938 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6939
6940     * support/librarian/sdcclib.c: sdcc librarian.
6941     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
6942     with sdcclib.
6943
6944 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6945
6946     * as/mcs51/lkmain.c: properly handle extensions in function afile.
6947
6948 2003-07-02  Borut Razem <borut.razem AT siol.net>
6949
6950         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
6951         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
6952         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
6953         src/xa51/main.c, src/z80/main.c:
6954         virtualization of glue() function: each port has it's own glue function,
6955         which is accessed by do_glue function pointer in PORT.general structure
6956
6957 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
6958
6959         * DS800C400 fun, improved ROM interface and tinibios.
6960
6961 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
6962
6963         * More support for DS80C400. Now includes beginning of interface to ROM.
6964
6965 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
6966
6967         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
6968
6969 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6970
6971         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
6972
6973 2003-06-19  Borut Razem <borut.razem AT siol.net>
6974
6975         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
6976
6977 2003-06-19  Borut Razem <borut.razem AT siol.net>
6978
6979         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
6980         fixed Z80 port - crt0.o: cannot open.
6981
6982 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
6983
6984         * support/Util/MySystem.c (merge_command): revert bad fix
6985
6986 2003-06-18  Borut Razem <borut.razem AT siol.net>
6987
6988         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
6989
6990 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6991
6992         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
6993         option --use-stdout sends errors to stdout instead of stderr.
6994
6995 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
6996
6997         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
6998
6999 2003-06-15  Borut Razem <borut.razem AT siol.net>
7000
7001         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
7002         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
7003         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
7004         fixed width array of pointers replaced with sets;
7005         multiple include and lib paths ared transferred to preprocessor and linker
7006         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
7007         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
7008         fixed width array of pointers
7009         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
7010         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
7011         fixupPath(), getPathDifference()
7012         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
7013         fixed width array of pointers
7014
7015 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
7016
7017         * src/pic16/ralloc.c: fix warnings
7018         * src/pic16/pcode.c: fix warning
7019
7020 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
7021
7022          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
7023         know all the details, but essentially this set of changes enable
7024         the pic16 port to generate movff instructions and generate assembler
7025         directives,
7026         * src/SDCCmain.c:
7027         * src/pic16/gen.c:
7028         * src/pic16/glue.c:
7029         * src/pic16/pcode.c:
7030         * src/pic16/device.c:
7031         * src/pic16/main.c:
7032         * src/pic16/pcode.h:
7033         * src/pic16/pcoderegs.c:
7034         * src/pic16/ralloc.c:
7035         * src/pic16/ralloc.h:
7036
7037 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7038
7039         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7040         added option --vc, so sdcc errors and warnings are compatible with
7041         Microsoft Visual Studio.
7042
7043 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7044
7045         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
7046           device/lib/libfloat.lib: added atof function.
7047
7048 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
7049
7050         * doc/sdccman.lyx: updated to Lyx 1.3
7051         * doc/cdbfileformat.lyx: updated to Lyx 1.3
7052         * doc/test_suite_spec.lyx: updated to Lyx 1.3
7053         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
7054
7055 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
7056
7057         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
7058
7059 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7060
7061         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
7062           additions to the "related tools/documentation" section
7063
7064 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
7065
7066         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
7067
7068 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
7069
7070         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
7071         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
7072
7073 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
7074
7075         * doc/sdccman.lyx: fix double dash and other minor things
7076         * doc/Makefile: fix double dash
7077
7078 2003-05-28  Karl Bongers(patches from Martin Helmling)
7079         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
7080           condition and ignore commands.
7081
7082 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7083
7084         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
7085           is in parts still quite out of date, I did changes as far as I felt makes sense
7086           for a non-native english speaker.
7087           Please feel free to add to the manual or to correct my changes.
7088         * doc/Makefile: undid touching the date of intermediate tex files.
7089
7090 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7091
7092         * doc/sdccman.lyx: Manual has an index now
7093
7094 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
7095
7096         Finalize muluint/mulsint and mululong/mulslong merging:
7097         * device/lib/_mulint.c
7098         * device/lib/_mullong.c
7099         * device/lib/gbz80/mul.s
7100         * device/lib/gbz80/stubs.s
7101         * device/lib/z80/mul.s
7102         * device/lib/z80/stubs.s
7103         * src/SDCCsymt.c (initCSupport)
7104
7105 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7106
7107         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
7108         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
7109           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
7110           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
7111           instead of /Zm500.
7112
7113 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7114
7115         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
7116           the regression tests I'm not brave enough to enable 245.b, 245.c
7117         * doc/sdccman.lyx: added latex preamble for hyperref package.
7118           Using pdflatex this will give you a hyperlinked pdf file with
7119           bookmarks. (prepend '%' before /usepackage if this breaks something)
7120
7121 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7122
7123          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
7124
7125 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
7126
7127         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
7128
7129 2003-05-21    <johan AT balder>
7130
7131         * src/SDCCglue.c (printIval): fixed bug #739934
7132
7133 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7134
7135         Applied patch from bug 737905 (renamed yylineo to mylineno):
7136         * src/altlex.c
7137         * src/SDCCast.c
7138         * src/SDCglobl.h
7139         * src/SDCC.lex
7140         * src/SDCCsymt.c
7141         * src/SDCCval.c
7142         * src/pic16/pcode.c: Cleaned warnings
7143         * src/pic16/pcodeflow.c: Cleaned warnings
7144         * src/pic16/pcoderegs.c: Cleaned warnings
7145
7146 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
7147
7148         * src/pic16/pcode.c: Cleaned warnings
7149         * src/pic16/pcodepeep.c: Cleaned warnings
7150         * src/pic16/ralloc.c: Cleaned warnings
7151
7152 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7153
7154         * doc/sdccman.lyx: fixed bug 739745
7155         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
7156
7157 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
7158
7159         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
7160         it can be defined with CFLAGS when running configure
7161         * src/SDCCmain.c: fixed compiling + linking with object files
7162
7163 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
7164
7165         * configure.in: configure for pic16 port,
7166             added --disable-pic16-port
7167         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
7168         * src/SDCCmain.c: linkOptions is changed to set *,
7169             added if/endif conditional macros to remove options help
7170             messages from optionsTable when a port is not configured, added
7171             support for the PIc16 port in the ports table, when executing
7172             the compiler with no port specified on command line, a default
7173             port is selected with the new macro DEFAULT_PORT which is
7174             defined in port.h, in setDefaultOptions() linkOptions is removed
7175             from initialization assignment, since now it is a set,
7176             parseCmdLine uses setParseWithComma for linkOptions, in
7177             linkEdit() linkOptions are accessed with new function indexSet()
7178             which returns the i'th item of a set variable. See SDCCset.c, in
7179             linkEdit() when calling buildCmdLine(), added linkOptions as
7180             last argument. Now users can pass arguments to gplink via the
7181             -Wl option, main() uses pic16glue() to glue up pic16 programs
7182         * src/SDCCpeeph.c: various changes to support pic16
7183         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
7184             return the i'th item of the set
7185         * src/SDCCset.h: added function prototype for indexSet()
7186         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
7187         * src/clean.mk: added pic16 in CLEANALLPORTS variable
7188         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
7189             added macro DEFAULT_PORT
7190         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
7191         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
7192             generated
7193         * src/pic16/glue.c: commented out some error producing lines
7194         * src/pic16/main.c: __config directives are commented out to stop
7195             gpasm complaining and test the linkage with gplink, _linkCmd and
7196             _asmCmd changed to be more gplink and gpasm friendly
7197         * src/pic16/peeph.def: peep rule 3 is commented out, since it
7198             produced an error when parsed, peep rule 12 is added to utilize
7199             movff, but it is commented out since the pCode does not support
7200             yet a command with 2 address arguments
7201
7202 2003-05-18    <johan AT balder>
7203
7204         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7205         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7206 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
7207
7208         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
7209   Added feature to script commands from file.
7210
7211 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
7212
7213         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
7214         * src/SDCCutil.c: include ctype.h for win32
7215
7216 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
7217
7218         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
7219
7220 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
7221
7222         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
7223   Fixed so you can set breakpoints prior to run, run does not stop
7224   on entry now.  Add tbreak.  Other enhancements and fixes for use
7225   with ddd.
7226
7227 2003-05-12  Borut Razem <borut.razem AT siol.net>
7228
7229         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
7230
7231 2003-05-11  Borut Razem <borut.razem AT siol.net>
7232
7233         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
7234         the path of bin directory, so that PATH is the only env. variable, which has to be set
7235         in case of standard installation.
7236         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
7237         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
7238         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
7239
7240 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7241
7242         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
7243         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
7244         temp files are in the port dir; clean the gen/test directory when
7245         generating new test.c
7246         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
7247         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
7248         * support/regression/tests/zeropad.c: added
7249
7250 2003-05-09    <johan AT balder>
7251
7252         * src/SDCCglue.c: fixed bug #597940
7253
7254 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
7255
7256         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7257   cache sfr, optimize next,step, fix off by one sourceline,
7258   support ddd list function.
7259         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
7260
7261 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7262
7263         * support/regression/HTMLgen.py: added compare_s2f()
7264         * support/regression/Makefile: redo 1.27
7265         * support/regression/generate-cases.py: redo 1.5
7266
7267 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
7268
7269         * support/regression/tests/float.c: workaround 33 bit hex constant
7270         * support/regression/tests/simplefloat.c: fix division for host
7271
7272 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
7273
7274         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
7275         that tame's the PIC's over-aggressive optimizer.
7276
7277 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7278
7279          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
7280          support for MSVC.
7281
7282 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
7283
7284         Initial support for DS80C400. "Hello world" runs on TINIm400
7285         (with polled I/O).
7286
7287 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
7288
7289          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7290          * Some notes on ddd usage added in debugger/README
7291          Martin Helmling adding more features and fixes for ddd GUI debugger.
7292          Code added for nexti, stepi, up, down, and other adjustments.
7293
7294 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
7295
7296         * src/pic/pCodepeep.c non-wildcard asmops are now handled
7297         * src/pic/peeph.def Added two rules to optimize carry manipulation
7298         * src/pic/* removed debug printfs
7299
7300 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
7301
7302         * debugger/mcs51/cmd.c: added header newalloc.h
7303
7304 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
7305
7306         * as/Makefile: new EXEEXT
7307         * as/z80/Makefile: remove trailing slash of BUILDIR
7308         * as/z80/clean.mk: new EXEEXT
7309         * Makefile.common.in: add to CFLAGS (and others), don't replace it
7310         * support/cpp2/Makefile.in: new EXEEXT
7311         * src/pic/glue.c (pic14emitRegularMap): fixed warning
7312
7313 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
7314
7315         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
7316         EXEEXT was introduced to fix all related problems with targets
7317         "clean", "install" and "uninstall"; a couple of further flaws
7318         especially with "clean" have been fixed too
7319         * as/mcs51/Makefile.in
7320         * as/mcs51/clean.mk
7321         * as/z80/Makefile
7322         * Makefile
7323         * clean.mk
7324         * debugger/mcs51/Makefile.in
7325         * debugger/mcs51/clean.mk
7326         * link/z80/Makefile
7327         * link/z80/Makefile.in
7328         * link/z80/clean.mk
7329         * link/Makefile
7330         * packihx/Makefile.in
7331         * packihx/clean.mk
7332         * sim/ucsim/Makefile
7333         * sim/ucsim/clean.mk
7334         * sim/ucsim/avr.src/Makefile.in
7335         * sim/ucsim/avr.src/clean.mk
7336         * sim/ucsim/s51.src/Makefile.in
7337         * sim/ucsim/s51.src/clean.mk
7338         * sim/ucsim/xa.src/Makefile.in
7339         * sim/ucsim/xa.src/clean.mk
7340         * sim/ucsim/z80.src/Makefile.in
7341         * sim/ucsim/z80.src/clean.mk
7342         * sim/ucsim/main_in.mk
7343         * sim/ucsim/packages_in.mk
7344         * sim/ucsim/gui.src/Makefile.in
7345         * sim/ucsim/gui.src/serio.src/Makefile.in
7346         * sim/ucsim/gui.src/serio.src/clean.mk
7347         * src/Makefile.in
7348         * src/clean.mk
7349         * support/cpp2/Makefile.in
7350         * support/cpp2/clean.mk
7351         * support/makebin/Makefile
7352         * support/makebin/clean.mk
7353         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
7354         * doc/sdccman.lyx: --program-suffix no longer needed
7355
7356 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
7357
7358          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
7359          Martin Helmling added support for ddd GUI debugger.
7360          Code added to display assembly, set variables, and other commands
7361          to interface to ddd.
7362
7363 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
7364
7365         * as/Makefile: fix target clean
7366         * as/clean.mk: fix target clean
7367         * as/z80/clean.mk: fix target clean
7368
7369 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
7370
7371         * Makefile.common.in: added  AT EXEEXT AT
7372         * configure.in: removed all mingw32 stuff
7373         * configure: rebuilt from configure.in
7374         * doc/sdccman.lyx: updated section "installation"
7375         * support/scripts/sdcc_mingw32: adapted to configure
7376         * support/scripts/sdcc_cygwin_mingw32: added
7377
7378 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
7379
7380         * src/pic Added object file support for the PIC port
7381         * src/pic Applied patch from Craig Franklin (this started the object file support)
7382         * src/regression Updated the PIC regression tests for object files
7383
7384 2003-04-20  Borut Razem <borut.razem AT siol.net>
7385
7386         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
7387           lklex.c: In function `getfid':
7388           lklex.c:203: warning: array subscript has type `char'
7389         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
7390           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
7391         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
7392           stack handling macros
7393
7394 2003-04-19  Borut Razem <borut.razem AT siol.net>
7395
7396         * "handling space characters in file path" task:
7397         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
7398         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
7399         * support/Util/MySystem.h: make it self-sufficient
7400         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
7401           src/z80/main.c, sdcc/as/mcs51/lklex.c:
7402           handling space characters in file path
7403         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
7404           (it will be used by assemblers, which have their own includes, e.g. gpasm)
7405         * support/Util/MySystem.c: handling space characters in executable's path
7406
7407 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
7408
7409         * as/z80/Makefile: fix permanent rebuild of z80
7410         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
7411         * support/regression/tests/bitfields.c: added Johan's bitfields.c
7412
7413 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
7414
7415         * src/SDCCopt.c: add special case optimization to replace modulo by
7416           a power of two with a bitwise AND.
7417
7418 2003-04-18    <johan AT balder>
7419
7420         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
7421
7422 2003-04-17    <johan AT balder>
7423
7424         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
7425         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
7426
7427 2003-04-13  Borut Razem <borut.razem AT siol.net>
7428
7429         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
7430         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
7431           fixed mingw problem in adl_NORMALIZE_PATH
7432
7433 2003-04-12  Borut Razem <borut.razem AT siol.net>
7434
7435         * fixed "#pragma SAVE/RESTORE can not be nested":
7436         * src/SDCC.lex: reworked pragma handling functions
7437         * sdcc/src/SDCCglobl.h: reworked stack handling macros
7438         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
7439
7440 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7441
7442         * src/SDCCutil.c (pathEquivalent): defined but not used
7443         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
7444         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
7445         * configure: rebuilt from configure.in
7446         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7447         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7448         * device/include/Makefile.in: replace sdcc_datadir
7449         * device/lib/Makefile.in: replace sdcc_datadir
7450         * Makefile.common.in: add LDFLAGS from configure
7451         * packihx/Makefile.in: use LDFLAGS
7452         * src/Makefile.in: use LDFLAGS
7453         * support/cpp2/Makefile.in: add LDFLAGS from configure
7454         * support/makebin/Makefile: use LDFLAGS
7455         * .version: bumped version number to 2.3.5
7456
7457 2003-04-12  Borut Razem <borut.razem AT siol.net>
7458
7459         * completed "different paths" task:
7460         * src/SDCCmacro.c: fixed bug in handling quotes
7461         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
7462         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
7463
7464 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7465
7466         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
7467
7468 2003-04-11 kevin Vigor <kevin AT vigor.nu>
7469
7470         * ds390/gen.c ds390/peeph.def: fix bug 706781
7471
7472 2003-04-11  Borut Razem <borut.razem AT siol.net>
7473
7474         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
7475
7476 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
7477
7478         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
7479         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
7480          set - this bit used to not be set...).
7481         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
7482           bad code in PIC Port
7483         * src/regression/and2.c added to test bug 609268
7484         * src/regression/Makefile added and2.c to regression test
7485
7486
7487 2003-04-08    <johan AT CP255758-A>
7488
7489         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
7490         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
7491         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
7492
7493 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
7494
7495         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
7496         fix bug #487815
7497         * support/cpp2/Makefile.in: fix bug #487815
7498         * configure: rebuilt from configure.in
7499         * Makefile.common.in: docdir changed, new path suffixes
7500         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7501         * sdcc_vc_in.h: reflect changes from sdccconf.h
7502         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
7503         * src/SDCCutil.h: remove BINDIR hack
7504         * doc/sdccman.lyx: update new path hierarchy
7505
7506 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7507
7508         * src/SDCCpeeph.c: added okToRemoveSLOC test
7509
7510 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7511
7512         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
7513
7514 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7515
7516         * src/SDCCpeeph.c: added labelIsReturnOnly test
7517         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
7518
7519 2003-04-05    <johan AT balder>
7520
7521         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
7522         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
7523         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
7524         * src/SDCCast.c: fixed a warning
7525         * src/SDCCast.h: fixed a warning
7526         * src/SDCCicode.c (operandFromAst): fixed a warning
7527
7528 2003-04-04    <johan AT balder>
7529
7530         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
7531         * src/SDCCast.c (decorateType): fixed bug #715076
7532         * src/SDCC.y: fixed bug #702907
7533
7534 2003-04-03    <johan AT balder>
7535
7536         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
7537         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
7538         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
7539         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
7540         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
7541
7542 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
7543
7544         * _decdptr.c: fix return values
7545         * _gptrget.c: fix return values
7546         * _gptrgetc.c: fix return values
7547         * _gptrput.c: fix return values
7548         * _mulint.c: fix return values
7549         * as/z80/Makefile: fix 'make -j' problem
7550
7551 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
7552
7553         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
7554         * configure.in: big cleanup, updated to autoconf 2.5x
7555         * configure: rebuilt from configure.in
7556         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7557         * sdcc_vc_in.h: reflect changes from sdccconf.h
7558         * doc/Makefile: fixed a flaw in "make install"
7559
7560 2003-04-02    <johan AT balder>
7561
7562         * src/ds390/gen.c (genCmp): no comments
7563         * src/mcs51/gen.c (genCmp): no comments
7564         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
7565         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
7566
7567 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
7568
7569         * support/regression/generate-cases.py: place generated file in given sub directory
7570         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
7571         * support/regression/Makefile: improvements for 'make -j';
7572         side effect: it's simpler and faster now
7573
7574 2003-03-31  Borut Razem <borut.razem AT siol.net>
7575
7576         * src/z80/main.c: link-{port} and as-{port} defined without path
7577         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
7578
7579 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
7580
7581         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
7582
7583 2003-03-30  Borut Razem <borut.razem AT siol.net>
7584
7585         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
7586           changed type of list parameter to set
7587         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
7588         * src/port.h: changed type of do_assemble() parameter to set
7589         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
7590           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
7591           definition of "cppoutfilename" macro with NULL value in preProcess()
7592         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
7593         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
7594         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
7595           replaced with set *binPathSet
7596         * shash_add() deallocates the item, if allready exsists, before adding the new one
7597         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
7598
7599 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
7600
7601         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
7602           a nested for loop bug in the PIC port
7603         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
7604           for loops
7605
7606 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
7607
7608         * support/Util/dbuf.h: remove C++ stuff to make it portable
7609
7610 2003-03-28  Borut Razem <borut.razem AT siol.net>
7611
7612         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
7613           literal strings in stringLiteral()
7614         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
7615         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
7616           to the project
7617
7618 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
7619
7620         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
7621
7622 2003-03-26    <johan AT balder>
7623
7624         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
7625         * src/ds390/gen.c (saveRegisters): catched symbol abuse
7626         * src/SDCCast.c (decorateType): fixed " -v < 3"
7627
7628 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
7629
7630         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
7631         Added Lenny Story's debug infrastructure changes:
7632         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
7633         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
7634         * src/cdbFile.c: added
7635         * src/SDCCdebug.c: added
7636         * src/SDCCdebug.h: added
7637         * src/SDCCast.c (createFunction)
7638         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
7639         * src/SDCCmain.c (parseCmdLine, main)
7640         * src/SDCCmem.c (redoStackOffsets)
7641         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
7642         * src/SDCCsymt.h
7643         * src/common.h
7644         * src/avr/gen.c (genAVRCode)
7645         * src/ds390/gen.c (gen390Code)
7646         * src/mcs51/gen.c (gen51Code)
7647         * src/pic/gen.c (genpic14Code)
7648         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
7649         * src/xa51/gen.c (genXA51Code)
7650         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
7651
7652 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7653
7654         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
7655         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
7656
7657 2003-03-22    <johan AT balder>
7658
7659         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
7660
7661 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
7662
7663         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
7664         * doc/cdbfileformat.lyx: added, written by Lenny Story
7665         * doc/Makefile: added cdbfileformat.lyx
7666         * doc/clean.mk: added cdbfileformat.lyx
7667
7668 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
7669
7670         * src/mcs51/peeph.def: fix bug #705773
7671
7672 2003-03-20    <johan AT balder>
7673
7674         An sfr/sbit can have an "at #" AND an initializer
7675         * src/SDCCsymt.c (checkSClass):
7676         * src/SDCCmem.c (allocGlobal):
7677         * src/SDCCmem.c (allocLocal):
7678         * src/SDCCast.c (createBlock):
7679
7680 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
7681
7682         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
7683
7684 2003-03-16    <johan AT balder>
7685
7686         Undid the hackup of const and volatile, the problem is much bigger
7687         * src/SDCC.y:1.65
7688         * src/SDCCast.c:1.171
7689         * src/SDCCglue.c:1.138
7690         * src/SDCCicode.c:1.146
7691         * src/SDCCsymt.c:1.150
7692         * src/SDCCval.c:1.65
7693
7694 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
7695
7696         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
7697         * src/ds390/gen.c (genAddrOf): fixed bug #704087
7698
7699 2003-03-13    <johan AT balder>
7700
7701         Hackup const and volatile modifiers in type chains a bit:
7702         * src/SDCC.y:1.63
7703         * src/SDCCast.c:1.169
7704         * src/SDCCglue.c:1.136
7705         * src/SDCCicode.c:1.143
7706         * src/SDCCsymt.c1.146
7707         * src/SDCCsymt.h1.59
7708         * src/SDCCval.c:1.63
7709
7710 2003-03-12    <johan AT balder>
7711
7712         * src/SDCCBBlock.h: more LRH debugging junk
7713         * src/SDCCcflow.h: more LRH debugging junk
7714         * src/SDCCloop.c: more LRH debugging junk
7715         * src/SDCC.y (struct_declaration): fixed bug #697590
7716         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
7717         * src/ds390/gen.c (aopForRemat): fixed bug #700031
7718         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
7719
7720 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7721         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
7722         test function names must now match exactly).
7723         * src/SDCCcse.c: added special case in findCheaperOp to allow
7724         extending a short integer. Makes less awful code for bug 700121 test case.
7725
7726 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7727
7728         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
7729         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
7730
7731 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7732
7733         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
7734         actually called (operandsNotEqual() was called for all
7735         operandsNotEqualX tests).
7736
7737 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7738
7739         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
7740         with shorter literals. Fixes bug 700121.
7741
7742 2003-03-11    <johan AT balder>
7743
7744         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
7745
7746 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
7747
7748         * src/SDCCloop.c (mergeRegions): an evil beast is dead
7749         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
7750
7751 2003-03-10  Borut Razem <borut.razem AT siol.net>
7752
7753         * src/SDCCmain.c: pipe preprocessor's output
7754         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
7755         * sdcc_vc_in.h: define pclose as _pclose for WIN32
7756         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
7757         which closes all pipes in pipeSet set
7758         * src/SDCCset.c: free deleted item in function deleteSetItem()
7759         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
7760         moved from z80 to src subproject
7761         * .version: increased version number to 2.3.4
7762
7763 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
7764
7765         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
7766         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
7767         * support/regression/ports/xa51/spec.mk: fix typo
7768
7769 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
7770
7771         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
7772
7773 2003-03-09  Borut Razem <borut.razem AT siol.net>
7774
7775         * src/SDCCmain.c: pipe preprocessor's output
7776         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
7777         * sdcc_vc_in.h: define pclose as _pclose for WIN32
7778         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
7779         which closes all pipes in pipeSet set
7780         * src/SDCCset.c: free deleted item in function deleteSetItem()
7781         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
7782         moved from z80 to src subproject
7783
7784 2003-03-09  Borut Razem <borut.razem AT siol.net>
7785
7786         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
7787         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
7788         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
7789         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
7790         * src/SDCCglobl.h: unification of WIN32 native definitions
7791
7792 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7793
7794         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
7795
7796 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
7797
7798         * src/configure.in:   check for endianess (even while cross-compiling)
7799         * src/configure:      check for endianess (even while cross-compiling)
7800         * src/configure_in.h: check for endianess (even while cross-compiling)
7801         * src/avr/gen.c:        remove old endianess stuff
7802         * src/mcs51/gen.c:      remove old endianess stuff
7803         * src/ds390/gen.c:      remove old endianess stuff
7804         * src/pic/gen.c:        remove old endianess stuff
7805         * src/pic/genarith.c:   remove old endianess stuff
7806         * src/pic/glue.c:       fix endianess check
7807         * src/pic16/gen.c:      remove old endianess stuff
7808         * src/pic16/genarith.c: remove old endianess stuff
7809         * src/pic16/glue.c:     fix endianess check
7810         * src/xa51/gen.c:       remove old endianess stuff
7811         * src/z80/gen.c:        fix endianess check
7812         * src/SDCCglue.c:       fix endianess check
7813         * src/ds390/peeph.def: fix bug 700036
7814
7815 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
7816
7817         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
7818         * src/configure: find appropriate data-types on host for SDCC's int and long
7819         * src/configure.in: find appropriate data-types on host for SDCC's int and long
7820         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
7821         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
7822
7823 2003-03-07    <johan AT balder>
7824
7825         Just a big NOOP:
7826                 some minor cleanups before the big shot
7827                 OP_DEFS and OP_USES now use Kevin's protection
7828                 new option --nolabelopt
7829
7830         * src/SDCCBBlock.c:
7831         * src/SDCCast.c,:
7832         * src/SDCCcflow.c:
7833         * src/SDCCcse.c:
7834         * src/SDCCicode.c:
7835         * src/SDCCicode.h:
7836         * src/SDCClabel.c:
7837         * src/SDCCloop.c:
7838         * src/SDCCmain.c:
7839         * src/ds390/ralloc.c:
7840         * src/mcs51/ralloc.c:
7841         * src/pic/ralloc.c:
7842         * src/xa51/ralloc.c:
7843         * src/z80/ralloc.c:
7844
7845 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
7846
7847         * src/pic/pcode.c (get_op): fix 64 bit warnings
7848         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
7849         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
7850         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
7851         * support/regression/tests/malloc.c: fix 64 bit warnings
7852
7853 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
7854
7855         * src/mcs51/gen.c (genMinus): fixed bug 696436
7856
7857 2003-03-02  Borut Razem <borut.razem AT siol.net>
7858
7859         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
7860
7861 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
7862
7863         * configure.in: test for mkstemp
7864         * sdccconf_in.h: add HAVE_MKSTEMP
7865
7866 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
7867
7868         * device/include/ctype.h: removed warning while using --stack-auto
7869         * device/include/malloc.h: removed warning while using --stack-auto
7870         * device/include/string.h: removed warning while using --stack-auto
7871
7872 2003-02-23  Borut Razem <borut.razem AT siol.net>
7873
7874         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
7875         because NDEBUG is defined (see man assert)
7876         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
7877
7878 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7879
7880         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
7881         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
7882
7883 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7884
7885         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
7886         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
7887
7888 2003-02-18    <johan AT balder>
7889
7890         * as/mcs51/asmain.c (asmbl): module can start with a digit
7891         * as/z80/asmain.c (asmbl): module can start with a digit
7892
7893 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
7894
7895         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
7896         * src/asm.c: fix pipe() for Mingw32
7897
7898 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
7899
7900         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
7901         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
7902         make -V work again; --c1mode reads now from stdin
7903         * doc/sdccman.lyx: added --c1mode
7904         * support/Util/SDCCerr.c: new messages for c1 mode
7905         * support/Util/SDCCerr.h: new messages for c1 mode
7906         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
7907
7908 2003-02-15    <johan AT balder>
7909
7910         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
7911
7912 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
7913
7914         * doc/sdccman.lyx: Environment variables, -o and other minor things
7915
7916 2003-02-14    <johan AT balder>
7917
7918         * src/xa51/main.c: before anyone really tries to use it :)
7919
7920         * Install doc's in share/sdcc/doc
7921         * removed some obsolete files
7922         * Do a proper make distclean and uninstall
7923         M Makefile.common.in
7924         R sdccbuild.sh
7925         M as/Makefile
7926         M device/include/Makefile.in
7927         M device/lib/Makefile.in
7928         M doc/sdccman.lyx
7929         M link/Makefile
7930         M sim/ucsim/doc/Makefile.in
7931         M src/clean.mk
7932         R src/avr/peeph.rul
7933         R src/xa51/peeph.rul
7934         M support/cpp2/Makefile.in
7935         M support/makebin/Makefile
7936
7937
7938 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
7939
7940         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
7941
7942 2003-02-10  Borut Razem <borut.razem AT siol.net>
7943
7944         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
7945         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
7946         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
7947         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
7948         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
7949         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
7950         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
7951         src/z80/Makefile.bcc: Borland Makefile cleanup
7952         * as/z80/Makefile.bcc: Added Borland Makefile
7953         * support/cpp2/borland.h: Removed
7954
7955 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
7956
7957         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
7958         * src/SDCC.lex: new pragma NOIV
7959         * src/SDCCglobl.h: new pragma NOIV
7960         * src/SDCCmem.c: new pragma NOIV
7961
7962 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
7963
7964         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
7965
7966 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
7967
7968         * src/SDCCmain.c: signal handling is switched off by --debug
7969         * doc/Makefile: small fix for install; use clean.mk again
7970         * doc/clean.mk: clean *.pdf and *.html too
7971
7972 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
7973
7974         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
7975         * device/lib/printfl.c: fix a ds390 bug by making it portable
7976         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
7977         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
7978         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
7979         * debugger/mcs51/cmd.c: converted multi-line string literals
7980         * sim/ucsim/globals.cc: converted multi-line string literals
7981         * src/SDCCmain.c: introduced signal handler to remove temp files
7982         * doc/Makefile: small tweaks, implement clean
7983         * doc: removed generated files
7984
7985 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7986
7987         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
7988         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
7989         Address Record is not correctly generated for DS390."
7990
7991 2003-02-02  Borut Razem <borut.razem AT siol.net>
7992
7993         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
7994         * as/mcs51/asm.h: fixed compilation with Borland C
7995         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
7996         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
7997         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
7998         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
7999         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
8000         src/z80/Makefile.bcc: delete $(LIB) only if exist
8001         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
8002
8003 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
8004
8005         * device/include/malloc.h: introduced NULL
8006         * device/include/string.h: introduced NULL
8007         * device/include/stdlib.h: introduced NULL
8008         * device/lib/_memcpy.c: removed NULL
8009         * device/lib/_strcat.c: removed NULL
8010         * device/lib/_strchr.c: removed NULL
8011         * device/lib/_strcmp.c: removed NULL
8012         * device/lib/_strcpy.c: removed NULL
8013         * device/lib/_strcspn.c: removed NULL
8014         * device/lib/_strlen.c: removed NULL
8015         * device/lib/_strncat.c: removed NULL
8016         * device/lib/_strncmp.c: removed NULL
8017         * device/lib/_strncpy.c: removed NULL
8018         * device/lib/_strpbrk.c: removed NULL
8019         * device/lib/_strrchr.c: removed NULL
8020         * device/lib/_strspn.c: removed NULL
8021         * device/lib/_strstr.c: removed NULL
8022         * device/lib/_strtok.c: removed NULL
8023         * device/lib/malloc.c: removed NULL, include own header
8024
8025 2003-02-02    <johan AT balder>
8026
8027         * 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
8028         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
8029         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
8030         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
8031         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
8032         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
8033
8034 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8035
8036         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
8037         area 'DATA'"
8038
8039 2003-02-01    <johan AT balder>
8040
8041         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
8042
8043 2003-01-31    <johan AT CP255758-A>
8044
8045         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
8046
8047 2003-01-30    <johan AT balder>
8048
8049         * src/SDCCBBlock.c: automatic bug detection
8050         * src/SDCCicode.c: automatic bug detection
8051
8052 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8053
8054         * src/SDCCglobl.h:   now --xram-size 0 works
8055         * src/SDCCmain.c:    now --xram-size 0 works
8056
8057 2003-01-29    <johan AT balder>
8058
8059         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
8060
8061 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8062
8063         * as/mcs51/aslink.h: Added options --xram-size and --code-size
8064         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
8065         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
8066         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
8067         * src/SDCCglobl.h:   Added options --xram-size and --code-size
8068         * src/SDCCmain.c:    Added options --xram-size and --code-size
8069
8070 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
8071
8072         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
8073         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
8074
8075 2003-01-27    <johan AT balder>
8076
8077         * src/SDCC.y: fixed bug #613764
8078
8079 2003-01-26    <johan AT balder>
8080
8081         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
8082         * src/SDCCsymt.h: fixed bug #673374
8083         * src/SDCCglue.c: fixed bug #661910
8084         * src/SDCCast.c: fixed bug #458099 and 673374
8085
8086 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
8087
8088         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
8089         * as/mcs51/strcmpi.h: added
8090         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
8091         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
8092         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
8093         * as/mcs51/assym.c: strcmpi -> as_strcmpi
8094         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
8095         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
8096         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
8097         * as/mcs51/Makefile.aslink: new module strcmpi
8098         * as/mcs51/Makefile.asx8051: new module strcmpi
8099         * as/mcs51/Makefil.bcc: new module strcmpi
8100         * as/mcs51/Makefile.in: new module strcmpi
8101         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
8102
8103 2003-01-26    <johan AT balder>
8104
8105         * src/SDCCglue.c: reverted back to 1.124
8106         * src/SDCCast.c: reverted back to 1.156
8107         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
8108
8109 2003-01-25    <johan AT balder>
8110
8111         * src/SDCCglue.c: A better fix for bug #661910
8112         * src/SDCCast.c: A better fix for bug #661910
8113         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
8114
8115 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8116
8117         * src/Makefile.in: remove spawn.o
8118         * src/SDCCmain.c: remove spawn.h
8119         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
8120         * src/spawn.c: removed
8121         * src/spawn.h: removed
8122         * support/regression/ports/ds390/spec.mk: link with -r
8123
8124 2003-01-24    <johan AT CP255758-A>
8125
8126         * src/ds390/gen.c (aopOp): fixed bug #667458
8127         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
8128         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
8129         (createIvalCharPtr): an ival doesn't always have a storage class anymore
8130
8131 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8132
8133         * src/mcs51/peeph.def: better assembler identation by Frieder
8134         * src/mcs51/gen.c: better assembler identation by Frieder
8135
8136 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
8137
8138         * as/z80/string.h: removed for gcc 3.2
8139         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
8140         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
8141
8142 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8143
8144         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
8145         * src/SDCCpeeph.c (replaceRule): fix bug #663503
8146         * support/regression/Makefile: separate temp files for ports
8147         * support/regression/generate-cases.py: separate temp files for ports
8148         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8149         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8150
8151 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8152
8153         * moved tinitalk to device/examples/ds390
8154
8155 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
8156
8157         * as/mcs51/lkmem.c: rflag is for DS390
8158         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
8159         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
8160                          (linkEdit): move mem- and map-files the same way as ihx-files
8161         * src/z80/main.c (_setDefaultOptions): removed --generic
8162         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
8163         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
8164         * src/pic/glue.c (picglue): --c1mode works again
8165         * src/pic16/glue.c (pic16glue): --c1mode works again
8166         * src/asm.c (printCLine): fix #660034
8167
8168 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
8169
8170         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
8171         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
8172         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
8173         * as/mcs51/lkmem (summary): better fix for sp problem
8174         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
8175         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
8176         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
8177                                               remove --stack-after-data
8178
8179 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
8180
8181         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
8182         * src/SDCCutil.c (join): ugly bug: missing '\0'
8183         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
8184
8185 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8186
8187         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
8188         * src/port.h: typo
8189         * src/pic/main.c (_asmCmd): gpasm supports -o
8190         * src/z80/main.c: more general macros
8191         * device/lib/Makefile.in: remove intermediate files
8192
8193 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8194
8195         * .version: Bumped version number to 2.3.3
8196         * src/SDCCBBlock.c: new option -o
8197         * src/SDCCglobl.h: new option -o
8198         * src/SDCCglue.c: new option -o
8199         * src/SDCCmain.c: new option -o
8200         * src/asm.c: new option -o
8201         * src/ds390/main.c: new option -o
8202         * src/pic/glue.c: new option -o
8203         * src/pic/pcode.c: new option -o
8204         * src/pic/ralloc.c: new option -o
8205         * src/pic16/glue.c: new option -o
8206         * src/pic16/pcode.c: new option -o
8207         * src/pic16/ralloc.c: new option -o
8208         * src/z80/main.c: new option -o
8209         * device/lib/Makefile.in: use -o
8210         * support/regression/ports/ds390/spec.mk: use -o
8211         * support/regression/ports/gbz80/spec.mk: use -o
8212         * support/regression/ports/mcs51/spec.mk: use -o
8213         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
8214         * support/regression/ports/z80/spec.mk: use -o
8215         * support/regression/ports/ucz80/spec.mk: use -o
8216         * support/regression/ports/xa51/spec.mk: use -o
8217         * support/regression/fwk/lib/timeout.c: fix usage string
8218
8219 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
8220         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
8221
8222 2003-01-07    <johan AT balder>
8223
8224         * src/SDCCast.c (decorateType): fixed bug #600035
8225
8226 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
8227         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
8228         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
8229         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
8230         * src/pic/pcode.c: outcommented unused variable to remove warnings
8231         * src/pic/ralloc.c: outcommented unused variable to remove warnings
8232
8233 2003-01-06    <karl AT turbobit.com>
8234         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
8235    regression tests.
8236
8237 2003-01-06    <johan AT balder>
8238
8239         * src/SDCCicode.c: fixed array add
8240
8241 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
8242         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
8243         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
8244
8245 2003-01-04    <johan AT balder>
8246
8247         * src/SDCCval.c (getNelements): fixed the initialized array of structures
8248
8249 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8250         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
8251
8252 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8253         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
8254         * support/regression/tests/bug-524697.c: fit mem usage into 8032
8255
8256 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8257         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
8258
8259 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
8260         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
8261
8262 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
8263         * src/mcs51/main.c: removed {bindir}{sep} from aslink
8264
8265 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8266
8267     * in \sdcc\as\mcs51\ changed these files in order to create an
8268     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
8269     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
8270     following files to include the previous two files: aslink.dsp,
8271     Makefile.aslink, Makefile.bcc, and Makefile.in.
8272
8273     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
8274     .adb instead of .cdb
8275
8276 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8277
8278         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
8279         value from option --iram-size.
8280
8281 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8282
8283         * \sdcc\as\mcs51\lklist.c: added boundary check before using
8284         dram[] array.
8285
8286 2002-09-18    <wiml AT hhhh.org>
8287
8288         * SDCClrange.h: exposed setFromRange() and setToRange()
8289         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
8290           packRegsForAccUse() (bug 542397)
8291         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
8292           multiple times and emitting the fetch operations more than once
8293           added aopGetUsesAcc() function to allow binary operators to
8294           fetch their operands in the correct order; made genMinus() emit
8295           compact code for X = LITERAL - Y
8296
8297 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8298         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
8299         sprintf() in line 1267.
8300
8301 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8302         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
8303         like ports.
8304
8305 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8306         Changes to aslink (All the changes are marked with 'JCF'):
8307
8308         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
8309         summary().
8310
8311         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
8312         area BSEG.  Also moves, if possible, the DATA area down into the internal
8313         ram so more space is available.
8314
8315         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
8316         sflag.
8317
8318         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
8319         not bytes.  Function summary() which creates a memory usage summary
8320         file with extension .mem.  Reports of overlaping stack and small stack
8321         size.  If the space for the stack is less than 16 bytes aslink trows a
8322         warning.
8323
8324         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
8325         the 8051.  Option 'y' for memory summary output file.
8326
8327         Changes to sdcc (All the changes are marked with 'JCF'):
8328
8329         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
8330
8331         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
8332         overlaying area for it (uses RegBankUsed[4]).
8333
8334         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
8335         bank zero as used by default.  By default aslink locates the stack
8336         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
8337         the creation of the .mem file.  Delegates the allocation of data area
8338         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
8339         the begining of the stack area to aslink.
8340
8341         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
8342         glue() in SDCCglue.c creates an area for it.
8343
8344 2002-09-03  Borut Razem <borut.razem AT siol.net>
8345         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
8346         sdcc/src/pic/glue.c:
8347         introduced atexit() handler for teporay files removal in case of
8348         errors, assertions, ...
8349
8350 2002-08-29  Borut Razem <borut.razem AT siol.net>
8351         * sdcc/support/cpp2/auto-host_vc_in.h:
8352         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
8353         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
8354         Maybe there is a similar problem with BORLANDC? It should be checked!
8355
8356         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
8357         corrected improper use of assert: the assignment to clr variable was done inside the assert.
8358         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
8359         was not executed, and the compiler (cl) launched a warning:
8360         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
8361
8362 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8363         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
8364
8365 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
8366         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
8367
8368         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8369           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
8370           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
8371           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8372           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
8373           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
8374           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
8375         - added Release configuration in VS projects
8376         - review of compiler an linker options
8377         - VC .exe files are generated in bin_vc directory, not to interfere
8378           with binaries generated from other projects (cygwin, mingw, bcc ...)
8379
8380         * sdcc/src/yacc.dsp: added
8381
8382         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
8383         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
8384         and insert the version number definitions from .version
8385
8386         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
8387
8388         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
8389         added - genarate auto-host.h using auto-host_vc_in.h as template
8390
8391         * sdcc/sdcc_vc.h,
8392         removed from CVS, generated automatically
8393
8394 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
8395         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
8396
8397 2002-08-11  Borut Razem <borut.razem AT siol.net>
8398         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
8399
8400 2002-08-10  Borut Razem <borut.razem AT siol.net>
8401         * src/SDCCmain.c (main):
8402         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
8403         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
8404         The consequence was that some temporary files were not removed.
8405
8406         * src/SDCCglue.c:
8407         unification of code in functions tempfilename() and tempfile():
8408         function tempnam() is defined in Visual Studio 6.0 and .NET
8409
8410         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
8411
8412         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8413           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
8414         - removed compiler command line option /WX: Treats all warnings as errors
8415         - update a list of source files, included into the project
8416
8417         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8418           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
8419         changed project type to Generic Project so that can be correcly converted to VS.NET project
8420
8421         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
8422
8423         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
8424
8425         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
8426
8427         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
8428         added return 0 statements after assert() to make compiler happy
8429
8430         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
8431         added newline in the def file to keep MSC compiler satisfied
8432
8433         * sdcc/src/z80/gen.c:
8434         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
8435           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
8436         - solved MSC error in function aopDump()
8437
8438         * sdcc_vc.h: define PREFIX as "\\sdcc"
8439
8440 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
8441         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
8442
8443 2002-06-22  Scott Dattalo <scott AT dattalo.com>
8444         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
8445         - Rewrote the register banking algorithm.
8446         - Added pCode live-range analysis to registers (for now, only non-used and
8447         singly-used registers optimized away)
8448
8449         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
8450
8451         * 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.
8452
8453 2002-05-10  Scott Dattalo <scott AT dattalo.com>
8454         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
8455
8456 2002-04-22  Michael Hope  <michaelh AT vroom>
8457
8458         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
8459
8460         * configure.in (DD_COPT): Added include support required for gbdk.
8461
8462         * .version: Bumped version number just to increase it.
8463
8464         * src/SDCCmain.c: Added -nostdinc to the default options.
8465
8466 2002-04-15  Michael Hope  <michaelh AT vroom>
8467
8468         * device/lib/z80/printf.c (sprintf): Added.
8469
8470         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
8471
8472         * src/z80/peeph.def: Added transpose redundent load rule.
8473
8474         * src/z80/main.c: Added force callee saves for jaune.
8475
8476         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
8477
8478         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
8479
8480 2002-03-28  Johan Knol  <johan AT balder>
8481
8482         * src/SDCCval.c: fixed bug #532436
8483
8484 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8485         * /src/port.h:
8486         Added "char *Processor" field to the port structure.
8487
8488         * /src/SDCCmain.c:
8489         Added -p option. Allows port dependent processor to be specified.
8490
8491         * all ports:
8492         Initialized the new field char *Processor field to NULL in all ports
8493
8494         * /src/pic/*:
8495         Compiler generated registers for interrupt context saving
8496         were not getting allocated.
8497
8498 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
8499
8500         * /src/SDCCast.c:
8501         Fixed left shift. Will promote the left side of a left shift
8502         if a) left shifting more than size of operand or b) when assigned
8503         to something size > size of left side
8504
8505 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8506         * src/pic/*
8507         tons of changes. Register allocation has been
8508         rewritten. Added customization for the various PICs. Flow
8509         analysis is restructured. ...
8510
8511         * src/pic/device.h:
8512         Added
8513
8514         * src/pic/device.c:
8515         Added. device.c is a PIC port hack to accomodate variations
8516         in PIC devices.
8517
8518 2002-03-13  Michael Hope  <michaelh AT vroom>
8519
8520         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
8521
8522 2002-03-04  johanknol  <johanknol AT manik>
8523
8524         * /src/SDCCval.c: fixed
8525
8526         const unsigned char arr[][2] = { { 0, 1 } };
8527         t18.c:1: error: Initializer element is not constant
8528
8529 2002-03-04  bela  <bela AT manik>
8530
8531         * /device/include/mcs51reg.h:
8532         ds89c420 register definition update
8533
8534 2002-03-03    <johan AT FRIJA>
8535
8536         * support/Util/SDCCerr.c: did something, but don't no why anymore
8537
8538         * support/regression/tests/bug-524691.c: made it a little less shy
8539
8540         * src/SDCCast.c (decorateType): fixed bug #524697
8541
8542         * src/SDCCast.c: made some lineno improvements
8543
8544         * src/SDCCval.c (getNelements): changed warning to error
8545
8546         * src/SDCCglue.c (printIvalArray): changed warning to error
8547
8548         * src/SDCCicode.c: fixed a warning for mingw
8549
8550         * src/SDCCast.c (decorateType): fixed the << promotion for ops
8551
8552         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
8553
8554 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
8555
8556         * src/ds390/peeph.def:
8557         Added some more peephole rules
8558
8559         * src/ds390/gen.c: Various fixes & enhancements
8560
8561         * src/SDCClrange.c, src/SDCClrange.h:
8562         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
8563
8564         * src/ds390/ralloc.c:
8565         various fixes & enhancements (ds390) specific
8566
8567         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
8568         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
8569         from rallocs.
8570
8571         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
8572
8573 2002-03-02    <johan AT FRIJA>
8574
8575         * src/SDCCast.c (decorateType): fixed bug #524708
8576
8577         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
8578
8579         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
8580
8581 2002-03-01  Michael Hope  <michaelh AT vroom>
8582
8583         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
8584
8585         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
8586
8587 2002-03-01    <johan AT FRIJA>
8588
8589         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
8590
8591         * src/SDCCast.c (decorateType): fixed bug #524209
8592
8593         * src/SDCCval.c (valNot): fixed bug #524195
8594
8595 2002-02-26    <johan AT balder>
8596
8597         * src/xa51/gen.c: fixed a warning
8598
8599         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
8600
8601         * src/SDCCast.c (decorateType): fixed bug #522534
8602
8603 2002-02-23    <johan AT balder>
8604
8605         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
8606
8607 2002-02-22    <johan AT balder>
8608
8609         * src/SDCCast.c: fixed bug #514865
8610
8611         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
8612
8613 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
8614
8615         * sdcc/src/SDCCloop.c:
8616         Previous fix was not good. basic blocks that have "break" or "return" are
8617         not really partof a loop , but live ranges used in these blocks should
8618         be live thru the entire loop, so set partOfLoop but don't add them to
8619         loop region
8620
8621 2002-02-21    <johan AT FRIJA>
8622
8623         * src/SDCCcse.c: fixed bug #514308
8624
8625 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
8626
8627         * src/SDCCloop.c:
8628         Fixed BUG #519583. If a conditional block ended in a return/break
8629         statement inside a loop, it was not being considered part of the loop.
8630
8631         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
8632
8633 2002-02-10  Karl Bongers <karl AT turbobit.com>
8634
8635         * debugger/*:
8636         Fixed up SDCDB debugger somewhat.  Updated debugger/README
8637         with lots of comments and notes.
8638
8639         * device/examples/test2.c:
8640         Fix bug, "red" variable not being initialized(compiler complained).
8641
8642         * device/examples/Makefile, examples/test3.c:
8643         Add Makefile in device/examples folder, compiles test3.c
8644         for use as a multiple module SDCDB test case.
8645
8646         * sim/ucsim/cmd.src/cmdset.cc:
8647         Took out debug printfs in ucsim "next" command.
8648
8649         * sim/ucsim/xa.src:
8650         Karl and Johan start ucsim XA support.  Most dissassembly working,
8651         about 75% emulation done(plenty of work remaining).
8652
8653         * sim/ucsim/z80.src:
8654         Add Z80 support to ucsim, add test-ucz80 regression test,
8655         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
8656         Notice z80 compiler fails on examples/test3.c/crc code.
8657
8658 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
8659
8660         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
8661         Added support for --parms-in-bank1
8662
8663         * src/ds390/peeph.def:
8664         added a few more peephole optimzations
8665
8666         * src/ds390/main.c:
8667         1) added __builtin_inp & __builtin_outp used to read in data of given length
8668            from a memory mapped port
8669         2) added __builtin_memcmp
8670         3) added __builtin_swapw swap bytes of a short
8671
8672         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
8673         1) handle multiple send & receives from register bank1
8674         2) ralloc can now allocate DPTR1 to some liveRanges
8675
8676         * src/SDCCsymt.c, src/SDCCsymt.h:
8677         changes to handle multiple sends & receives
8678
8679         * src/SDCCptropt.h:
8680         added some pointer arithmetic optimization
8681
8682         * src/SDCCptropt.c:
8683         added some pointer arithmetic optimizations but not stable yet so not
8684         called from anywhere (will get this working shortly)
8685
8686         * src/SDCCopt.c: fixed for multiple sends & receives
8687
8688         * src/SDCCmain.c:
8689         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
8690         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
8691            set preprocessor defines (depending on options)
8692
8693         * src/SDCCicode.c, src/SDCCicode.h:
8694         changes made to handle multiple sends & receives
8695
8696         * src/SDCCglobl.h:
8697         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
8698
8699         * src/SDCCcse.c, src/SDCCcse.h:
8700         added function findbackward def (to be used in upcoming optimization)
8701
8702         * src/SDCCcflow.c, src/SDCCcflow.h:
8703         added function returnAtEnd - to determine if a basic block terminates with
8704         a RETURN iCode
8705
8706         * src/SDCCast.c, src/SDCCast.h:
8707         added option parms-in-bank1
8708
8709         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
8710         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
8711         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
8712         adjusted for --parms-in-bank1 option
8713
8714         * device/include/string.h:
8715         donot redefine "reentrant" keyword
8716
8717         * device/include/ds80c390.h: Added some more SFRs
8718
8719 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
8720
8721         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
8722
8723 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
8724
8725         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
8726
8727 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
8728
8729         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
8730
8731 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
8732
8733         * Added --xram-movc option
8734
8735 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
8736
8737         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
8738
8739 2002-01-11  Johan Knol
8740
8741         * Added math lib of Jesus Calvino-Fraga
8742
8743 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
8744
8745         * src/SDCCmain.c (processFile): fix processing of ../../src.c
8746         * support/regression/Makefile: new target test-mcs51-stack-auto
8747         * support/regression/ports/mcs51-stack-auto/spec.mk: added
8748
8749 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
8750
8751         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
8752
8753 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
8754
8755         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
8756
8757 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
8758
8759         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
8760
8761         * src/SDCCglue.h: add definition for printIvalChar()
8762
8763 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
8764
8765         * src/SDCCast.c: fix #498138 by Johan
8766
8767         * src/SDCCglue.c: fix #498138 by Johan
8768
8769 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
8770
8771         * support/regression/Makefile: fix clean
8772
8773         * support/regression/ports/ds390/support.c: fix transmission of last character
8774
8775 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
8776
8777         * /sdcc/src/ds390/gen.c:
8778         a) improved computing address of stack variable
8779         b) took out some #if 0 code
8780         c) improved parmBytes adjustment
8781         d) improved genPlusIncr & genMinusIncr
8782         e) genCmp could generate bad code (when left assigned to DPTR)
8783         f) Fixed bug in hasInc
8784
8785         * /sdcc/src/ds390/ralloc.c:
8786         a) packRegsForSupport could mess up live information (Fixed)
8787         b) packRegsDPTRuse could be incorrect for left & right shift
8788
8789         * /sdcc/src/mcs51/ralloc.c:
8790         packRegsForSupport could mess up the live information (Fixed)
8791
8792         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
8793
8794         * /sdcc/src/SDCCast.c:
8795         can reverse a loop even if function call is present as long
8796         as the loop control variable is local & is not passed as parameter
8797
8798 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8799
8800         * /sdcc/ChangeLog: *** empty log message ***
8801
8802         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
8803         More builtin function additions for TININative
8804
8805         * /sdcc/src/ds390/ralloc.c:
8806         Had broken the regression testsuite
8807
8808         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
8809
8810         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
8811         Added funcattr hasStackParms will be set for reentrant functions when there
8812         are paramteres on the stack, this helps in minimizing frame pointer generation
8813         typeFromStr can handle function pointers now
8814
8815         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
8816         *** empty log message ***
8817
8818 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8819
8820         * /src/ds390/gen.c, /src/ds390/main.c:
8821         More builtin function additions for TININative
8822
8823         * /src/ds390/ralloc.c:
8824         Had broken the regression testsuite
8825
8826         * /src/SDCCast.c: Fixed a bug in dumptree
8827
8828         * /src/SDCCsymt.c, /src/SDCCsymt.h:
8829         Added funcattr hasStackParms will be set for reentrant functions when there
8830         are paramteres on the stack, this helps in minimizing frame pointer generation
8831         typeFromStr can handle function pointers now
8832
8833         * /doc/builtins.txt, /doc/TININative.txt:
8834         *** empty log message ***
8835
8836
8837 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8838
8839         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
8840         ALPHA version for -mTININative
8841
8842         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
8843         updated to reflect changes in the port structure
8844
8845         * /src/port.h:
8846         added function do_assemble (similar to do_link) if non-null this function
8847         will be called to do assembly (-mTININative) requires a multi command
8848         assembly
8849         added function genAssemblerEnd will be called to generate assembler Epilogue
8850
8851         * /src/SDCCsymt.c:
8852         added _JavaNative to debug info printing
8853
8854         * /src/SDCCmain.c: added option --tini-libid
8855         added port->do_assemble function (-mTININative) has a multi command assemble
8856
8857         * /src/SDCCglue.c: Disabled "constExpr" check
8858         added port->genAssemblerEnd function
8859
8860         * /src/SDCCglobl.h: Added option --tini-libid value
8861
8862         * /src/SDCCast.h:
8863         tookout optimizeCompare from the header (has no external references)
8864
8865         * /src/SDCCast.c: made one more function "static"
8866
8867 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
8868
8869         * src/z80/mappings.i: Added z80asm support.
8870
8871         * src/z80/main.c: Added z80asm support on --asm=z80asm
8872
8873         * src/z80/gen.c: Fixed asm portability issues.
8874
8875         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
8876
8877         * src/SDCCglue.c (printExterns): Added global/extern split.
8878
8879 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
8880
8881         * support/regression/Makefile: added test for mcs51 model large
8882
8883         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
8884
8885         * support/regression/ports/gbz80/spec.mk: added -mgbz80
8886
8887 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
8888
8889         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
8890
8891 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
8892
8893         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
8894
8895         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
8896
8897 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
8898
8899         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
8900
8901         * support/regression/tests/simplefloat.c: Port to mcs51.
8902
8903 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
8904         * support/regression/tests/bug-485362.c: Added.
8905
8906         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
8907
8908         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
8909
8910         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
8911
8912         * src/z80/gen.c (aopDump): Added a dump function.
8913
8914 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
8915         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
8916
8917         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
8918
8919         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
8920
8921         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
8922
8923         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
8924
8925         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
8926
8927         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
8928
8929         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
8930
8931         * support/regression/ports/ds390/support.c: Use tinibios.
8932
8933         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
8934
8935 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
8936
8937         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
8938         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
8939
8940         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
8941
8942         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
8943
8944 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
8945
8946         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
8947
8948         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
8949         (packRegsForIYUse): Created and optimised.
8950
8951 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
8952
8953         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
8954 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
8955
8956         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
8957
8958         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
8959
8960         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
8961
8962 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
8963
8964         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
8965
8966         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
8967
8968 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
8969
8970         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
8971
8972         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
8973
8974         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
8975
8976 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
8977
8978         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
8979         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
8980         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
8981
8982         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
8983
8984         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
8985         (genNotFloat): Added.
8986         (genUminusFloat): Added.
8987
8988         * device/lib/z80/Makefile: Added floating pt stubs.
8989
8990         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
8991
8992         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
8993
8994         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
8995
8996 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
8997
8998         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
8999
9000         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
9001
9002         * sdcc/support/regression/Makefile: Add port ds390.
9003
9004         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
9005
9006         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
9007
9008         * sdcc/support/regression/ports/ds390/spec.mk: Added.
9009
9010         * sdcc/support/regression/ports/ds390/support.c: Added.
9011
9012         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
9013
9014         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
9015
9016         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
9017
9018 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9019
9020         * device/include/malloc.h: Added z80 and gbz80 support.
9021
9022         * device/lib/gbz80/heap.s: Added.
9023
9024         * device/lib/z80/heap.s: Added.
9025
9026         * device/lib/malloc.c: Added z80 and gbz80 support.
9027
9028         * support/regression/tests/malloc.c (testMalloc): Added.
9029
9030         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
9031
9032         * support/regression/tests/bug-478094.c: Added.
9033
9034         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
9035
9036 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
9037
9038         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
9039
9040         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
9041
9042         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
9043
9044         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
9045
9046         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
9047
9048 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9049
9050         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
9051
9052 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
9053
9054         * support/regression/tests/bug-477927.c: Added.
9055
9056         * src/z80/peeph.def: Added minor rules.
9057
9058         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
9059
9060         * src/z80/peeph.def: Added jump optimisation modification.
9061
9062 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
9063
9064         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
9065
9066 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
9067
9068         * support/regression/tests/funptrs.c: Added.
9069
9070 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
9071
9072         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
9073
9074 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
9075
9076         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
9077
9078         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
9079
9080         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
9081         (movLeft2ResultLong): Created.
9082
9083         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
9084         (joinPushes): Added.  Joins two char pushes into a word push.
9085
9086 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
9087
9088         * support/cpp2/Makefile.in (install): Added creation of dest dir.
9089
9090         * support/makebin/Makefile (install): Added creation of dest dir.
9091
9092 2001-10-24 Karl Bongers <karl AT turbobit.com>
9093
9094         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
9095
9096 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
9097
9098         * src/z80/ralloc.c: Turned off faulty pack for one use.
9099
9100         * src/z80/peeph-gbz80.def: Removed redundent restart options.
9101
9102         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
9103
9104 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
9105
9106         * support/regression/Makefile: Improved clean
9107
9108         * support/regression/ports/gbz80/spec.mk: Added clean
9109
9110         * support/regression/ports/host/spec.mk: Added clean
9111
9112         * support/regression/ports/z80/spec.mk: Added clean
9113
9114         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
9115
9116         * support/regression/ports/mcs51/timeout.c: little improvements
9117
9118 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
9119
9120         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
9121
9122         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
9123
9124         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
9125
9126 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
9127
9128         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
9129
9130         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
9131
9132 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
9133         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
9134
9135         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
9136
9137         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
9138
9139         * src/mcs51/main.c (_linkCmd): Added bin path to command.
9140
9141         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
9142
9143         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
9144
9145         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
9146
9147         * support/regression/tests/longor.c: Added.
9148
9149 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
9150
9151         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
9152
9153         * as/mcs51/aslink.h: define PATH_MAX
9154
9155         * as/mcs51/asm.h: define PATH_MAX
9156
9157         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
9158
9159         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
9160
9161         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
9162
9163         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
9164
9165         * src/SDCCglobl.h: define PATH_MAX
9166
9167         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
9168
9169         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
9170
9171 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
9172
9173         * src/z80/gen.c (gencjneshort): Fixed
9174
9175         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
9176
9177 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
9178
9179         * support/regression/tests/bug-469671.c: Added.
9180
9181         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
9182
9183 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
9184
9185         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
9186
9187         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
9188
9189 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
9190
9191         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
9192
9193         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
9194
9195         * src/device/lib/_mullong.c : removed hint: nooverlay bug
9196
9197         * src/device/lib/_divuint.c : removed hint: nooverlay bug
9198
9199         * src/device/lib/_divulong.c: removed hint: nooverlay bug
9200
9201         * src/device/lib/_moduint.c : removed hint: nooverlay bug
9202
9203         * src/device/lib/_modulong.c: removed hint: nooverlay bug
9204
9205 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
9206
9207         * 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.
9208
9209         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
9210
9211         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
9212
9213 2001-10-07    <johan AT FRIJA>
9214
9215         * device/lib/gets.c (gets): fixed the return value.
9216
9217 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
9218         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
9219
9220         * 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.
9221
9222         * 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.
9223
9224         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
9225
9226         * src/pic/gen.c: Removed Safe_strdup.
9227
9228         * configure.in: Added option to enable libgc support.
9229
9230         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
9231         (bitVectUnion): Optimised.
9232         (bitVectIntersect): Optimised.
9233         (bitVectBitsInCommon): Optimised.
9234         (bitVectCplAnd): Optimised.
9235
9236         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
9237
9238 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9239
9240         * src/SDCCmain.c: distinguish between assembler debug and plain options
9241
9242         * src/avr/main.c:   remove standard assembler options
9243
9244         * src/ds390/main.c: remove standard assembler options
9245
9246         * src/mcs51/main.c: remove standard assembler options
9247
9248         * src/port.h: removed "PENDING" comment
9249
9250 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9251
9252         * src/device/lib/_mulint.c  : new, with assember functions
9253
9254         * src/device/lib/_mullong.c : new, with assember functions
9255
9256         * src/device/lib/_divuint.c : with assember functions
9257
9258         * src/device/lib/_divsint.c : with assember functions
9259
9260         * src/device/lib/_divulong.c: with assember functions
9261
9262         * src/device/lib/_divslong.c: with assember functions
9263
9264         * src/device/lib/_moduint.c : with assember functions
9265
9266         * src/device/lib/_modsint.c : with assember functions
9267
9268         * src/device/lib/_modulong.c: with assember functions
9269
9270         * src/device/lib/_modslong.c: with assember functions
9271
9272         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
9273
9274         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
9275
9276         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
9277                                       replaced _mululong.c and _mulslong.c by _mullong.c
9278
9279 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9280
9281         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
9282
9283 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9284
9285         * src/SDCCglue.c: test, if win32api is available for MINGW
9286
9287 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9288
9289         * src/SDCCsymt.c: no more _modifier in printTypeChain()
9290         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
9291         * support/regression/ports/gbz80/spec.mk: removed GENERIC
9292         * support/regression/ports/host/spec.mk: removed GENERIC
9293         * support/regression/ports/mcs51/spec.mk: removed GENERIC
9294         * support/regression/ports/z80/spec.mk: removed GENERIC
9295
9296 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
9297
9298         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
9299
9300         * support/regression/tests/bug-467035.c: Created.
9301
9302 2001-10-01    <johan AT FRIJA>
9303
9304         * src/SDCC.y: fixed bug #466586 part 1
9305
9306 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
9307
9308         * SDCCicode.c: z80 has no generic pointers
9309         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
9310
9311 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
9312
9313         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
9314
9315 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
9316
9317         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
9318
9319         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
9320
9321 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
9322
9323         * configure.in: Fixed up so that ucsim is only configured once.
9324
9325         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
9326
9327         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
9328         (getPathDifference): As above.
9329
9330         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
9331
9332         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
9333
9334 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
9335         * .version: Updated to 2.3.1
9336
9337         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
9338         Added copyright header.
9339
9340         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
9341         (assemble): Added support for macro based assembler commands.
9342         (linkEdit): Added support for macro based linker commands.
9343         (preProcess): Changed the pre-processor to use macros.
9344         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
9345         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
9346
9347         * device/lib/z80/crt0.s: Added module name for debugging.
9348
9349 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
9350
9351         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9352
9353         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
9354
9355         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
9356
9357         * src/Makefile.in: Added SDCCmacro and SDCCutil
9358
9359 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
9360
9361         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9362
9363 2001-09-16    <johan AT FRIJA>
9364
9365         * 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.
9366
9367 2001-09-15    <johan AT FRIJA>
9368
9369         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
9370         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
9371
9372 2001-09-11    <johan AT FRIJA>
9373
9374         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
9375
9376 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
9377
9378         * support/regression/tests/bug-460444.c: Added test case.
9379
9380         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
9381         (genCast): Added justification for all of the asserts.
9382
9383 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
9384
9385         * support/regression/support.c: _xdata replaced by xdata
9386
9387         * support/regression/spec.mk: removed _generic
9388
9389 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
9390
9391         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
9392
9393         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
9394         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
9395
9396         * src/z80/peeph.def: Added a rule to optimise shift then compare.
9397
9398         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
9399
9400         * support/regression/tests/bug-460010.c: Added test case.
9401
9402         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
9403
9404 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
9405
9406         * support/regression/Makefile: inter-port-clean adjusted for mcs51
9407
9408         * support/regression/testfwk.c: removed workaround for bug #436344
9409
9410         * support/regression/tests/bp.c: use less memory with mcs51
9411
9412         * support/regression/tests/bug-441448.c: use less memory
9413
9414         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
9415
9416         * support/regression/collate-results.py: typo
9417
9418 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
9419
9420         * support/regression/tests/fetchoverlap.c: Added new test case.
9421
9422         * support/regression/tests/bp.c: Added new test case.
9423
9424         * support/regression/tests/bug-448984.c: Added new test case.
9425
9426         * support/regression/tests/pow2shifts.c: Added new test case.
9427
9428         * src/z80/gen.c: Turned off the noise it normally generates for the release.
9429         (genlshTwo): Fixed right shift for count > 8.
9430
9431         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
9432
9433 2001-09-08    <johan AT FRIJA>
9434
9435         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
9436
9437 2001-09-07    <johan AT FRIJA>
9438
9439         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
9440
9441         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
9442
9443 2001-09-06    <johan AT FRIJA>
9444
9445         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
9446         * bernhard noted me at this: "() equals to (void)" (1.38)
9447
9448 2001-09-05    <johan AT FRIJA>
9449
9450         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
9451
9452 2001-09-04    <johan AT FRIJA>
9453
9454         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
9455
9456
9457 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
9458
9459         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
9460
9461 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
9462
9463         * link/z80/aslink.h: Fixed path for PATH_MAX
9464
9465 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
9466
9467         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
9468
9469         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
9470
9471         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
9472
9473         * 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.
9474
9475 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
9476
9477         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
9478         (genCmp): Fixed up genCmp for the GB with longs.
9479
9480         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
9481
9482         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
9483
9484         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
9485
9486         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
9487
9488 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
9489
9490         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
9491
9492 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
9493
9494         * 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.
9495
9496         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
9497
9498 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
9499
9500         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
9501
9502         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
9503
9504 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
9505
9506   * sim/ucsim/configure:    little improvement of Cygwin-detection
9507   * sim/ucsim/configure.in: little improvement of Cygwin-detection
9508   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
9509   * support/regression/tests/bug-221100.c: small changes for mcs51
9510   * support/regression/tests/bug-221168.c: small changes for mcs51
9511   * support/regression/tests/bug-227710.c: small changes for mcs51
9512   * support/regression/tests/staticinit.c: small changes for mcs51
9513   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
9514   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9515   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9516
9517 $Revision$