* device/lib/Makefile.in (port-specific-objects-pic16):
[fw/sdcc] / ChangeLog
1 2005-08-13 Raphael Neider <rneider AT web.de>
2
3         * device/lib/Makefile.in (port-specific-objects-pic16):
4           revert to cp $(PORT)/bin/*.* $(PORTDIR)
5         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
6           dependency
7         * device/lib/pic16/Makefile.rules: build subdirs before creating
8           the library, removed builddir rule, create $(builddir) early in
9           recurse rule, use empty recurse rule for leaf directories
10         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
11           mkdir errors (race condition), removed duplicate suffix "hex"
12           from clean rules
13         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
14         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
15           prevents mkdir -p from aborting on Alpha
16         
17 2005-08-12 Raphael Neider <rneider AT web.de>
18
19         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
20           db-statements in order to allow for arrays of pointers in code
21           sections to be placed without interspersed 0-padding, fixes
22           bug #1256215
23         * (emitStatistics): fixed division by zero for pic18f1220
24         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
25           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
26         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
27         * (pic16_pCodeConstString): keep track of already emitted string
28           literals to prevent "duplicate definitions of symbol _str_NR"
29         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
30           debug message
31         * device/lib/Makefile.in: ignore failing PIC16 library builds
32         * device/lib/pic16/Makefile: do not build if gputils are missing
33         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
34
35 2005-08-10 Raphael Neider <rneider AT web.de>
36
37         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
38           my last commit)
39
40 2005-08-10 Raphael Neider <rneider AT web.de>
41
42         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
43           Rokas' patch to add the new fixed point type "__fixed16x16"
44         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
45           functions for __fixed16x16 arithmetics
46         * device/lib/pic16: reimplemented the build system to support
47           a separate build directory, better handling of libio (create
48           the library in a separate subdir for each architecture) and
49           easier configuration (centralized in Makefile.common)
50
51 2005-08-07 Raphael Neider <rneider AT web.de>
52
53         * src/pic16/gen.c (genrshTwo): fixed sign extension
54         * src/pic16/device.c: added pic18f2320, 4220 and 4320
55         * device/include/pic16/pic18f2220.h: changed some bit definitions,
56           added T0CONbits
57         * device/include/pic16/pic18f4220.h: NEW, header for
58           pic18f4220 and pic18f4320
59         * device/include/pic16/pic18fregs.h: added new devices,
60           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
61         * device/include/pic16/signal.h: resolved name clashes
62           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
63           to also allow testing for interrupt enable bits, added
64           comments on how to use the macros
65         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
66         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
67           register definitions for the devices
68         * device/lib/pic16/pics.all: added new devices
69         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
70           allocated memory
71         * device/lib/pic16/libc/stdlib/memfree: do not count
72           the block header as free memory
73         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
74           simplified and added missing end-of-blocklist-marker
75           (reported by Peter Onion, fixes #1252814)
76         * (_mergeHeapBlock): fixed loop condition
77         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
78           len==0, restructured code
79         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
80           up a bit, reduced bitfield accesses, prevent endless loops
81           in case of heap corruption
82         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
83           "unreferenced arguments/must return a value" warnings
84         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
85           replaced BAUDREG with SPBRG
86         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
87           device/lib/pic16/debug/gstack/gstack.c: replaced
88           _naked, _asm, _endasm with __naked, __asm, __endasm
89
90 2005-08-05 Raphael Neider <rneider AT web.de>
91
92         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
93           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
94
95 2005-08-05 Borut Razem <borut.razem AT siol.net>
96
97         * device/lib/Makefile.in: added missing ';'
98         * configure: removed ^M characters
99
100 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
101
102         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
103           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
104           License
105
106 2005-08-04 Borut Razem <borut.razem AT siol.net>
107
108         * configure.in: pic16 libraries build 2nd try - enable running
109           configure in device/lib/pic16
110         * configure: regenerated from configure.in
111         * device/lib/Makefile.in: create $(PORT)/bin directory
112
113 2005-08-03 Raphael Neider <rneider AT web.de>
114
115         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
116           to get/set values via pointers
117         * (genUnpackBits,genPackBits): changed detection of
118           ptr->bitfield vs. sym.bitfield, fixed access via generic
119           pointers, removed dead (wrong) code for multibyte bitfields
120         * (genNearPointerGet, genGenPointerGet): removed useless code,
121           fixed bitfield detection, fixes #1250594
122         * (genNearPointerSet): removed useless code
123         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
124           and introduced macro pic16_emitpcode that conditionally emits
125           the origin of the following pCode (useful for debugging SDCC)
126         * src/pic16/pcode.c: changed (and disabled) some debug outputs
127         * (createDefmap): fixed handling of LFSR for --optimize-df
128
129 2005-08-02 Borut Razem <borut.razem AT siol.net>
130
131         * device/lib/Makefile.in: pic16 libraries build enabled since
132           gputils-0.13.2 are now localy installed at sourceforge's compile farm
133
134 2005-08-02 Raphael Neider <rneider AT web.de>
135
136         * src/pic16/gen.c (genPackBits): removed deprecated warning
137         * (genGenPointerSet): fixed bitfield detection
138
139 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
140
141         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
142
143 2005-07-31 Raphael Neider <rneider AT web.de>
144
145         * device/lib/pic16/libdev/pic18f458.c,
146           device/include/pic16/pic18f458.h: added missing T0CONbits
147
148 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
149
150         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
151
152 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
153
154         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
155
156 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
157
158         * device/include/mcs51/at89c51ed2.h: added.
159
160 2005-07-23 Raphael Neider <rneider AT web.de>
161
162         * src/pic/gen.h: added emitpcode macro for debugging
163         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
164           and replace by macro adding debug information on demand
165         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
166         * (gencjne): tried to fix; replaced with correct (slower) code
167         * (gen{Unp,P}ackBits): fixed single bit access
168         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
169         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
170           previous instruction
171         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
172           register has to be handled with care (forbidding movement
173           of assignments/uses, removing assignments completely, ...)
174         * (pCodeOptime2pCodes): make use of regIsSpecial
175         * added lots of debugging output (commented out)
176         * src/pic/rallloc.c (deassignLRs): prevent operand registers
177           from being reused as result UNLESS it is known to work
178
179 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
180
181         * support/Util/dbuf.h: include <stddef.h> for size_t
182         * .version: changed to version 2.5.2
183
184 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
185
186         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
187
188 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
189
190         * src/hc08/gen.c (genMinus): fixed bug #1241835,
191           (genModOneByte): removed needless psha/pula
192
193 2005-07-22 Raphael Neider <rneider AT web.de>
194
195         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
196           have PIC14 handled like PIC16, fixes broken pic14 linker calls
197         * src/pic/gen.c (resolveIfx): do not "invent" labels
198         * (genSkipc): changed to positive logic
199         * (genSkipCond): removed as no longer needed
200         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
201           backport from PIC16
202         * (genLeftShift): check operands are in different registers
203         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
204           INCF does not update CARRY...
205         * src/pic/main.c: fixed _linkCmd
206         * src/pic/pcode.c (unlinkpCode): added inactive code
207         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
208           alive (do not assign result and operand overlapping registers)
209
210 2005-07-22 Raphael Neider <rneider AT web.de>
211
212         * src/pic/device.c (dump_sfr): replaced register declaration with
213           call to emitSymbolToFile() to avoid duplicate symbols
214         * (assignRelocatableRegisters): do not declare external symbols
215         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
216           right (take size of type, not etype)
217         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
218         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
219         * (packRegsForAccUse): disabled assignment of WREG as
220           the result reg to prevent occurence of just fixed #1235003,
221           fixes #1242954
222         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
223           symbols (avoids duplicate symbols in .asm file)
224         * (pic14emitRegularMap): use emitSymbolToFile()
225         * src/pic/gen.c (aopOp): fixed spillLocation handling
226         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
227         * (genDataPointerSet): removed unneccessary variables/output
228
229 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
230
231         * as/mcs51/lkarea.c: enlarged codemap for banked memory
232         * device/lib/mcs51/crtbank.asm: added # to 0x0F
233
234 2005-07-21 Raphael Neider <rneider AT web.de>
235
236         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
237           architecture cannot handle them efficiently, fixes bug #1235003
238         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
239           check for empty sets before using them (fixes bug #1232190)
240
241 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
242
243         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
244           (lnksect2): generate warnings for memory overlap
245         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
246           constseg to set the name of these segments so you can instruct the linker
247           to place them in banks
248         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
249         * src/SDCCglobl.h: added MODEL_HUGE to enum,
250           added code_seg and const_seg to options
251         * src/SDCCglue.c (emitMaps): use options.const_seg,
252           (createInterruptVect): put interrupt vectors in segment HOME,
253           (glue): put HOME before static segment and put the main glue in HOME,
254           (glue): use options.code_seg
255         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
256         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
257           these segments so you can instruct the linker to place them in banks
258           (linkEdit): use code_loc for HOME segment which should be the first
259           segment in code memory now
260         * src/SDCCmem.c: fixed more stuff like bug 1238386
261         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
262           (changePointer): don't change function pointers to code pointers for
263           banked functions,
264           (compareType): added exceptional check for banked function pointers
265         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
266         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
267           after static in code memory
268         * src/mcs51/gen.c: added aopLiteralLong prototype,
269           (aopForSym): use getSize for functions,
270           (genCall): generate banked calls over one trampoline __sdcc_banked_call
271           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
272           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
273           the segment,
274           (genPcall): use call for literal function pointers and generate banked
275           calls over the one trampoline so there's only one place for the user to
276           modify according to his/hers hardware,
277           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
278           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
279         * src/mcs51/main.c: added keyword banked,
280           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
281         * support/Util/SDCCerr.c,
282         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
283           needed for passing the bank and address to the trampoline
284         * device/lib/mcs51/crtbank.asm: added for bankswitching
285         * device/lib/mcs51/Makefile: added crtbank
286
287 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
288
289         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
290           for fields at offset 0 of a struct or union as reported
291           on 2005-07-07 in the developer mailing list.
292
293 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
294
295         * src/SDCCmem.c: fixed bug 1238386
296
297 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
298
299         * src/mcs51/peeph.def: added labelrefcounting for peepholes
300           (patch #1144962), added peephole 300, enabled 259.x
301         * doc/sdccman.lyx: removed screenshot and provided link instead
302
303 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
304
305         * doc/sdccman.lyx: added section about debugging with ddd
306         * doc/figures/ddd_example.eps: screenshot of debugging session
307
308 2005-07-04 Raphael Neider <rneider AT web.de>
309
310         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
311           like CODE pointers, fixes #1115683
312         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
313           call, fixes bugs #1232211, #1228110,
314           fixed wrong casts to pCodeFlow from pCodeInstructions
315
316 2005-07-04 Raphael Neider <rneider AT web.de>
317
318         * src/pic/gen.c (popGet): changed assert to allow for
319           bit operands
320         * (popGetAddr): changed signature to provide
321           an additional index, patched all call sites
322         * (genCmpEq): handle literal-like operands correctly
323         * (genAddrOf): added sanity checks on __code/__data pointers
324         * (genAssign): added handling of symbols from __code section
325         * (gencjne): do not generate code for comparisons whose result
326           is neither stored nor used, fixes bug #1171114
327         * (AccLsh, AccRsh): operate on operand instead of WREG
328         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
329           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
330           by known count
331         * rewrote complete shift-by-literal logic, commented unused
332           functions out
333         * (genConstPointerGet): get multiple bytes (if result size > 1),
334           fixed handling of non-immediate addresses
335         * (genPointerGet): handle CODE pointers like CONST pointers
336         * (genpic14Code): insert C-SRC lines as Cource-pCodes
337         * ({aop,op}_isLitLike): NEW, single place to decide whether an
338           operand is to be treated as a literal or not
339         * (mov2w,genPcall,genCmpEq),
340           src/pic/genarith.c: use aop_isLitLike() to decide between
341           literal/register contents
342         * (addSign): added missing offset
343         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
344           only emit comment in debug-mode,
345           use {aop,op}_isLitLike throughout the file
346         * src/pic/glue.c: fix initializers for pointers (work in progress)
347         * src/pic/pcode.c (get_op): honor index on _const symbols
348         * ({reset,dump}pCodeStatistics): NEW, estimate code size
349         * (dumppBlock): added pCode size estimation
350         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
351           check for IS_SYMOP before OP_SYMBOL'ing
352         * fixed indentation, compacted switch-statements
353         * (allocReg): find free register and allocate it instead of
354           allocating new registers all the time
355         * (deassignLRs): prevent POINTER_GET's from being assigned the same
356           registers as its operands (necessary only for multibyte GETs)
357
358 2005-07-01 Raphael Neider <rneider AT web.de>
359
360         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
361           debugging .asm-output macros FENTRY + FEXIT
362         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
363           way... I wonder...
364         * (emitpComment): NEW, printf to pCode
365         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
366           offset handling
367         * (popGetAddr): NEW, variant of popGet to access an immediates
368           high(er) bytes instead of the n'th byte of memory they reference,
369           replaced popGet with popGetAddr where neccessary
370         * (genDataPointerGet): reactivated and fixed implementation
371         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
372           accesses
373         * (genDataPointerSet): fixed multibyte assignments
374         * (genpic14Code): fixed --i-code-in-asm handling
375         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
376         * (genPlus): fixed index-out-of-bounds error
377         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
378         * src/pic/ralloc.c: added debugging output macro FENTRY2
379         * (spillThis): fixed indentation, enbraced for-body for clarity
380         * (rematStr): commented out as now unused
381         * (regTypeNum): commented out special spill case (overwrites
382           arbitrary values)
383         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
384
385 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
386
387         * doc/sdccman.lyx: documented sfr16/sfr32,
388           added example for using storage class with function pointers
389         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
390
391 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
392
393         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
394         * device/lib/_itoa.c,
395         * device/lib/_ltoa.c: optimized codesize
396         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
397           but don't know how to suppress the double warning.
398         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
399         * support/Util/SDCCerr.c,
400         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
401
402 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
403
404         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
405           fixed old K&R prototypes
406         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
407         * device/lib/_gptrget.c,
408         * device/lib/_gptrgetc.c,
409         * device/lib/_gptrput.c: changed versions for new memory indicator values,
410           also new versions for small generic pointers and banked generic pointers
411         * src/port.h: added const_name
412         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
413         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
414         * src/SDCCcse.c (findPrevIc): check all associative operators
415         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
416         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
417         * src/SDCCmem.c: updated comments,
418           set far-space to 0 for pdata, results in optimized code
419         * src/SDCCmem.h: added macro CONST_NAME
420         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
421           moving the info into the highest bits, see also gptrget/gptrput
422         * src/src.dsp: added sdcc.ico to project files
423         * src/avr/gen.c (genCast): fixed bug 0x%d
424         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
425         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
426           relation between ptr_type and DCL_TYPE,
427           (genCast): fixed bug 0x%d
428         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
429           (CODE)" for const_name
430         * src/hc08/gen.c (genCast): fixed bug 0x%d
431         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
432           (hc08_port): added "CONST (CODE)" for const_name
433         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
434           (aopForRemat, adjustArithmeticResult): disconnected direct relation
435           between ptr_type and DCL_TYPE,
436           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
437           operand* and took AOP() inside function so sfr-ness can be checked,
438           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
439           new prototype,
440           (genFunction, genEndFunction): optimized stack setup,
441           (genMinus): optimized for literals with ending zeroes (in bytes),
442           (genCast): fixed bug 0x%d
443         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
444           (mcs51_port): added "CONST (CODE)" for const_name
445         * src/mcs51/peeph.def: made rule 226 more generic
446         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
447         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
448         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
449         * src/z80/main.c (z80_port): added NULL for const_name,
450           (gbz80_port): added NULL for const_name
451         * support/regression/tests/bug663539.c,
452         * support/regression/tests/sfr16.c: new tests
453
454 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
455
456         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
457
458 2005-06-24 Raphael Neider <rneider AT web.de>
459
460         * device/lib/pic16/libdev/pic18f[68][567]20.c:
461           corrected typos...
462         * device/include/pic16/signal.h: added USBIF
463           and SIG_USB
464
465 2005-06-24 Raphael Neider <rneider AT web.de>
466
467         * device/lib/pic16/libdev/pic18f2455.c,
468           device/include/pic16/pic18f2455.h: NEW
469         * device/include/pic16/pic18fregs.h,
470           device/lib/pic16/pics.all,
471           src/pic16/device.c: added 18f2455
472         * device/lib/pic16/libdev/pic18f[68][567]20.c,
473           device/include/pic16/{pic18f[68][567].h,usart.h}:
474           replaced MULTIPLE_USARTS define with more relaible
475           compatibility sfrs (for USART access)
476
477 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
478
479         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
480           and the output asm file line is printed on two lines.
481
482 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
483
484         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
485           BGT, BLE, BHI, and BLS instructions
486         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
487           genCmpEq): removed
488         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
489           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
490           fixes bug #1216342
491         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
492
493 2005-06-15 Raphael Neider <rneider AT web.de>
494
495         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
496         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
497         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
498           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
499           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
500
501 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
502
503         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
504           Marcel Telka in bug #1215704
505
506 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
507
508         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
509           located in shared memory bank.
510
511 2005-05-31 Raphael Neider <rneider AT web.de>
512
513         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
514           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
515           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
516
517 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
518
519         * device/lib/_strncpy.c: fixed the fix
520
521 2005-05-26 Raphael Neider <rneider AT web.de>
522
523         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
524           initializers with \0, bug #1208187
525         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
526           intializers with \0, bug #1208187
527
528 2005-05-26 Raphael Neider <rneider AT web.de>
529
530         * src/pic16/glue.c (pic16_printIvalChar): fixed string
531           initializers with \0, bug #1208187
532         * src/pic16/main.c (_process_pragma): added sanity checks
533           for stack position and size, emit warnings when appropriate
534
535 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
536
537         * device/lib/_strncpy.c: fixed not filling with \0
538
539 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
540
541         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
542           createFunction),
543         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
544           compound_statement),
545         * src/SDCCsymt.h,
546         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
547
548 2005-05-24 Raphael Neider <rneider AT web.de>
549
550         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
551
552 2005-05-24 Raphael Neider <rneider AT web.de>
553
554         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
555           TRISE definitions, closes bug #1162453
556
557 2005-05-22 Raphael Neider <rneider AT web.de>
558
559         * src/pic16/main.c (_process_pragma): check for missing
560           arguments to pragmas code and udata
561         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
562           consistency fixes to match other headers (thanks to Jim Paris)
563         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
564
565 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
566
567         * src/SDCCicode.c (isOperandEqual): fixed missing ;
568
569 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
570
571         * support/regression/tests/bug1198642.c: new test
572         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
573         * src/SDCCcse.c (findPrevIc): added comment, please have a look
574         * support/scripts/resource.h,
575         * support/scripts/resource.rc,
576         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
577         * support/scripts/sdcc.ico: added 32x32 icon
578
579 2005-05-18 Raphael Neider <rneider AT web.de>
580
581         * device/lib/pic16/libdev/pic18f*.c,
582         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
583           keywords to "__sfr" and "__at (X)"
584         * device/include/pic16/pic18fregs.h: added pic18f4520
585         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
586           #1203088 (MPLAB compatibility)
587
588 2005-05-17 Raphael Neider <rneider AT web.de>
589
590         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
591         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
592         * device/lib/pic16/pics.all: added new devices
593         * src/pic16/device.c: added support for pic18f4520
594
595 2005-05-16 Raphael Neider <rneider AT web.de>
596         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
597         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
598         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
599           convenience function for bit access
600
601 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
602
603         * device/lib/printf_large.c: fixed bug 1193299
604         * support/regression/tests/bug1057979.c: added test %3.3s
605
606 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
607
608         * device/include/mcs51/8051.h,
609         * device/include/mcs51/8052.h: made parseable with lint
610         * device/include/mcs51/lint.h: added include file for (sp)lint
611         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
612         * doc/cdbfileformat.lyx,
613         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
614
615 2005-05-14 Raphael Neider <rneider AT web.de>
616
617         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
618         * device/lib/pic16/libc/stdlib/itoa.c (new)
619         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
620         * device/lib/pic16/libio/Makefile: exclude subdir according to
621           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
622         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
623         * src/pic16/gen.c (genFunction): prevent annoying warning
624         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
625           nameclashes on BeOS
626         * support/cpp2/cppmain.c (cpp_output_string): new
627         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
628           fixes bug 1116802
629
630 2005-05-13 Borut Razem <borut.razem AT siol.net>
631
632         * src/SDCCmain.c (linkEdit): fixed bug 1195202
633
634 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
635
636         * .version: changed to version 2.5.1; back to bleeding edge development
637
638 2005-05-11 Borut Razem <borut.razem AT siol.net>
639
640         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
641           generate PDF version 1.3 documents
642
643 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
644
645         * .version: changed to version 2.5.0
646
647 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
648
649         * doc/sdccman.lyx: updated weblinks, index and smaller updates
650
651 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
652
653         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
654         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
655         well as many smaller updates.
656         * .version: changed to version 2.5.0-pre1
657
658 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
659
660         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
661
662 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
663
664         * support/regression/tests/bug1185672.c: added
665         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
666           bug 1185672
667         * src/mcs51/gen.c (genCall): added comments, made it look safer
668         * src/mcs51/gen.c (genEndFunction): simplified
669
670 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
671
672         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
673
674 2005-04-14 Borut Razem <borut.razem AT siol.net>
675
676         * fixed bug 1045046 - SIGSEGV with really simple code?:
677           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
678           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
679
680 2005-04-14 Borut Razem <borut.razem AT siol.net>
681
682         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
683           src/pic16/device.h: temporarily disabled experimental #inline pragma
684           for 2.5.0 release
685
686 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
687
688         * device/include/z80/stdio.h,
689         * device/include/z80/string.h: removed these highly incomplete files so
690           SDCC can use the default ones in device/include/
691
692 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
693
694         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
695         gcc warning.
696         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
697         fix sdcpp warnings.
698
699 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
700
701         * device/include/malloc.h: removed redundant __reentrant prototypes
702         * device/lib/_mullong.c: added working xstack variant in asm (C version
703           doesn't pass regression tests)
704         * device/lib/bpx.c: used __data and made bpx char for mcs51
705         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
706           (createFunction): fixed bug with xstackPtr
707         * src/SDCCcse.c: corrected comments
708         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
709           (killDeadCode, eBBlockFromiCode): removed unused code
710         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
711           corrected comments
712         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
713           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
714           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
715           (genModOneByte): fixed warning in MSVC
716         * src/mcs51/main.c (): added comments
717         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
718
719 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
720
721         * src/SDCCmain.c (linkEdit): oops, changed one line too many
722
723 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
724
725         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
726
727 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
728
729         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
730         characters arrays of larger size than the declared one.
731
732 2005-04-10 Borut Razem <borut.razem AT siol.net>
733
734         * src/pic/gen.c (genInline),
735           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
736           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
737           (findNextInstruction), (findPrevInstruction),
738           (findInstructionUsingLabel),
739           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
740         * src/pic/pcode.c (findLabel): added missing '\n'
741         * src/src.dsp: added SDCCdwarf2.c to the project
742
743 2005-04-09 Borut Razem <borut.razem AT siol.net>
744
745         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
746
747 2005-04-08 Raphael Neider <rneider AT web.de>
748
749         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
750           into the chain after a given one) and mergeDefmapSymbols (combine
751           defmap entries for each symbol per pcode)
752         * (createDefmap): have defmap entries merged in the end
753         * (defmapReplaceSymRef): split defmap entries covering two accesses to
754           a symbol before replacing one access type's symbol, merge symbols in
755           the end (replacement symbol might already have an entry)
756         * (assignValnums): keep reference to written WREG intact
757
758 2005-04-08 Raphael Neider <rneider AT web.de>
759
760         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
761           Alpha)
762
763 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
764
765         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
766         bytes
767
768 2005-04-07 Raphael Neider <rneider AT web.de>
769
770         * device/include/pic16/usart.h: added compatibility defines for
771           devices with more than one USART
772         * device/include/pic16/pic18f[68][567]20.h: activated above defines
773
774 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
775
776         * device/lib/Makefile.in: updated for port specific include
777
778 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
779
780         * support/regression/ports/mcs51/spec.mk: added mcs51 include
781
782 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
783
784         * device/include/8051.h,
785         * device/include/8052.h,
786         * device/include/at89S8252.h,
787         * device/include/at89c55.h,
788         * device/include/at89x051.h,
789         * device/include/at89x51.h,
790         * device/include/at89x52.h,
791         * device/include/mcs51reg.h,
792         * device/include/reg51.h,
793         * device/include/reg764.h,
794         * device/include/regc515c.h,
795         * device/include/sab80515.h: (re)moved these 12 files
796         * device/include/mcs51/8051.h,
797         * device/include/mcs51/8052.h,
798         * device/include/mcs51/at89S8252.h,
799         * device/include/mcs51/at89c55.h,
800         * device/include/mcs51/at89x051.h,
801         * device/include/mcs51/at89x51.h,
802         * device/include/mcs51/at89x52.h,
803         * device/include/mcs51/mcs51reg.h,
804         * device/include/mcs51/reg51.h,
805         * device/include/mcs51/reg764.h,
806         * device/include/mcs51/regc515c.h,
807         * device/include/mcs51/sab80515.h: and added them here
808
809 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
810
811         * device/include/stdarg.h: changed SDCC specific keywords to double
812           underlined form.
813         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
814           mcs51 and ds390.
815         * device/include/hc08/mc68hc908gp32.h,
816         * device/include/hc08/mc68hc908jb8.h,
817         * device/include/hc08/mc68hc908jkjl.h,
818         * device/include/hc08/mc68hc908qy.h: fixed comments
819         * device/include/mcs51/README: updated
820         * device/include/mcs51/c8051f120.h: added PINRSF
821         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
822         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
823           amidst code. Also inline is not supported.
824
825 2005-04-06 Raphael Neider <rneider AT web.de>
826
827         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
828         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
829           callers stack/frame pointers
830
831 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
832
833         * device/include/pic16/usart.h: added, missing in previous commit,
834         * device/include/pic16/adc.h: fixed typo,
835         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
836         commit,
837         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
838         <p18fxxx.inc>
839         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
840         uninitialized because a bug appears with gplink
841         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
842         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
843         complains for unrecognised option
844
845 2005-04-05 Raphael Neider <rneider AT web.de>
846
847         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
848           structs as well (using memcpy)
849         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
850           on ISRs (GOTO has no label)
851         * src/pic16/device.h: added OF_OPTIMIZE_DF
852         * src/pic16/main.c: added compiler switch --optimize-df to enable the
853           new data flow analysis/optimization
854         * src/pic16/pcode.c: added (prototypes for and implementation of)
855           dataflow analysis functions, fixed pCodeInstructions' inCond and
856           outCond values, made RCALL a branch instruction
857         * (pic16_unlinkpCode): keep C line if possible
858         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
859           C line moved if possible
860         * (pic16_getRegFrompCodeOp): NEW, improved version of...
861         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
862           to use new pic16_getRegFrompCodeOp (works for more SFRs)
863         * (pic16_BuildFlow): fixed skip instructions with label (did not start
864           new flow)
865         * (pic16_getJumptabpCode): NEW, needed in...
866         * (LinkFlow): fixed handling of jumptables, calls and conditional
867           branches
868         * (pic16_InsertCommentAfter): NEW
869         * (pic16_pCodeReplace): made verbose and flow preserving
870         * (AnalyzeFlow): added call to data flow analysis
871         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
872         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
873         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
874
875 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
876
877         * src/SDCCast.c (decorateType): fixed bug #1105626
878
879 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
880
881         * device/include/asm/pic16/features.h,
882         * pic18f*.h headers,
883         * device/include/pic16/adc.h,
884         * device/include/pic16/delay.h,
885         * device/include/pic16/i2c.h,
886         * device/include/pic16/malloc.h,
887         * device/include/pic16/stdio.h,
888         * device/include/pic16/stdlib.h,
889         * device/include/pic16/string.h,
890         * device/lib/pic16/libc/stdio/printf_tiny.c,
891         * device/lib/pic16/libc/stdio/printf_small.c,
892         * device/lib/pic16/libc/stdio/strmgpsim.c,
893         * device/lib/pic16/libc/stdio/strmmssp.c,
894         * device/lib/pic16/libc/stdio/strmusart.c,
895         * device/lib/pic16/libc/stdio/vfprintf.c,
896         * device/lib/pic16/libc/stdlib/ltoa.c,
897         * device/lib/pic16/libc/stdlib/putchar.c,
898         * device/lib/pic16/libc/stdlib/x_ftoa.c,
899         * device/lib/pic16/libc/stdlib/memchrpgm.c,
900         * device/lib/pic16/libc/stdlib/memchrram.c,
901         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
902         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
903         * device/lib/pic16/libio/adc/adcbusy.c,
904         * device/lib/pic16/libio/adc/adcread.c,
905         * device/lib/pic16/libio/adc/adcsetch.c,
906         * device/lib/pic16/libio/usart/ubaud.c,
907         * device/lib/pic16/libio/usart/ubusy.c,
908         * device/lib/pic16/libio/usart/udrdy.c,
909         * device/lib/pic16/libio/usart/uopen.c,
910         * device/lib/pic16/libio/usart/uputc.c,
911         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
912         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
913         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
914         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
915         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
916         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
917         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
918         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
919         specific keywords to double underlined form,
920         * device/lib/pic16/libc/Makefile.rules,
921         * device/lib/pic16/libsdcc/Makefile.rules,
922         * device/lib/pic16/libm/Makefile,
923         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
924         to compile with C standard set in Makefile.common
925         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
926         rand.c and crc.c in compilation process,
927         * device/lib/pic16/libsdcc/int/divuint.c,
928         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
929         `c' from signed to unsigned,
930         * device/lib/pic16/startup/crt0.c,
931         * device/lib/pic16/startup/crt0i.c,
932         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
933         keywords to double underlined form, bug fixes in _do_cinit function
934         which prevented the correct initialization of the .idata segment,
935         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
936         core to enter a infinite loop
937         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
938
939 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
940
941         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
942
943 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
944
945         * device/include/Makefile.in: add support for hc08 subdirectory
946         * device/include/hc08/: new subdirectory
947         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
948         Lucas Loizaga, thanks!
949         * device/include/hc08/mc68hc908qy.h,
950         * device/include/hc08/mc68hc908gp32.h,
951         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
952         their own directory. Changed internal macro names to use the compiler
953         reserved namespace. Changed SDCC specific keywords to double
954         underlined form.
955         * device/include/math.h,
956         * device/include/malloc.h,
957         * device/include/stdarg.h,
958         * device/include/stdbool.h
959         * device/include/string.h,
960         * device/include/tinibios.h,
961         * device/include/ds400rom.h,
962         * device/include/8051.h,
963         * device/include/8052.h,
964         * device/include/80c51xa.h,
965         * device/include/at89c55.h,
966         * device/include/at89S8252.h,
967         * device/include/at89x51.h,
968         * device/include/at89x52.h,
969         * device/include/ds80c390.h,
970         * device/include/reg764.h,
971         * device/include/regc515c.h,
972         * device/include/sab80515.h,
973         * device/include/mcs51/c8051f000.h,
974         * device/include/mcs51/c8051f018.h,
975         * device/include/mcs51/c8051f020.h,
976         * device/include/mcs51/c8051f040.h,
977         * device/include/mcs51/c8051f060.h,
978         * device/include/mcs51/c8051f120.h,
979         * device/include/mcs51/c8051f300.h,
980         * device/include/mcs51/c8051f310.h,
981         * device/include/mcs51/c8051f320.h,
982         * device/include/mcs51/c8051f330.h,
983         * device/include/mcs51/c8051f350.h,
984         * device/include/z180.h: Changed SDCC specific keywords to double
985         underlined form.
986
987 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
988
989         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
990         18F4455,
991         * (pic16_assignConfigWordValue): disable testing of configuration
992         register value with config mask,
993         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
994         function with port->fun_prefix,
995         * (genFunction): when generating a naked interrupt function never
996         create an absolute segment placed in interrupt vector address, place
997         the actual interrupt function at IVA instead, when an interrupt
998         function is generated with unspecified interrupt then do not create
999         the absolute section,
1000         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
1001         code for generating a call to generic pointer get/put function with
1002         a call to function pic16_callGenericPointer(),
1003         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
1004         the call to the generic pointer get/put functions with prefixing the
1005         function name with port->fun_prefix,
1006         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
1007         * src/pic16/main.c (_process_pragma): prefix function with
1008         port->fun_prefix,
1009         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
1010         calling assembler, old 18Fxxxx macro is deprecated,
1011         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
1012         PC_ASMDIR in while condition,
1013         * (findInstruction): add PC_ASMDIR in while condition,
1014         * (buildCallTree): prefix main with port->fun_prefix,
1015         * (pic16_pCode2str): fixed bug that didn't emit the memory access
1016         identifier for variable with banked access in instructions BTFSS,
1017         BTFSC, BCF, BSF, BTG
1018         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
1019         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
1020         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
1021         perform optimization when enviroment variable NO_REG_OPT is set,
1022         * (insideLRBlock): NEW, return 1 if register is inside an
1023         INF_LOCALREGS block,
1024         * (RemoveRegFromLRBlock): remove a register that is completely
1025         eliminated by register optimization, but it is still left in local
1026         register store/restore in/from stack block,
1027         * (Remove2pcodes): after removing register, check to see if it
1028         should be removed from local register store/restore in/from stack
1029         block,
1030         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
1031         DUMMY_READ_VOLATILE,
1032
1033         * device/include/pic16/adc.h: minor prototype modifications and
1034         update,
1035         * device/include/pic16/malloc.h: added GPL notice various
1036         modifications,
1037         * device/include/pic16/stdint.h: NEW, standard header for ints
1038         * device/include/pic16/delay.h: NEW, header for delay functions,
1039         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
1040         delay1mtcy,
1041         * device/include/pic16/signal.h: NEW, header providing helper macros
1042         for implementing signal handlers,
1043         * device/include/pic16/stdio.h: added prototypes for functions,
1044         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
1045         prototypes for stdin and stdout, added macro PUTCHAR to
1046         automatically implement putchar function prototype,
1047         * device/include/pic16/usart.h: modified and updated USART library,
1048         * device/lib/pic16/libio/adc/,
1049         * device/lib/pic16/libio/i2c: some modifications to improve library
1050         performance,
1051         * device/lib/pic16/libc/stdio/: modifications for the new printf*
1052         family of functions,
1053         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
1054         family of functions and other sources,
1055         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
1056         of the PIC18Fxx[28] devices,
1057         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
1058         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
1059         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
1060         _do_cinit function, because the previous failed when local variables
1061         where not placed in the same memory bank,
1062         * device/lib/pic16/libsdcc/char/: various modifications to improve
1063         library performance,
1064         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
1065         information on the new functions of the c library and more...
1066
1067 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1068
1069         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
1070
1071 2005-03-26 Raphael Neider <rneider AT web.de>
1072
1073         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
1074           if condition == CARRY)
1075         * (genCmp): adapted to new genSkipc semantics
1076         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
1077           on rIfx (genCmp was broken)
1078
1079 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1080
1081         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
1082         * src/z80/main.c (_keywords[]),
1083         * src/SDCCglobal.h (struct options),
1084         * src/SDCC.y,
1085         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
1086         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
1087         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
1088         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
1089         always available in leading double underscore form. The C99 support is
1090         mostly missing, but it's a start.
1091         * support/regression/tests/bug-227710.c: fixed nonconforming use of
1092         reserved identifier "__data".
1093
1094 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
1095
1096         * src/mcs51/peeph.def: fixed bug 1170013
1097
1098 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
1099
1100         * device/include/mcs51reg.h: fixed bug 842007
1101
1102 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1103
1104         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
1105         last time.
1106
1107 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1108
1109         * src/port.h (struct PORT),
1110         * src/avr/ralloc.c (avr_assignRegisters),
1111         * src/avr/main.c,
1112         * src/ds390/ralloc.c (ds390_assignRegisters),
1113         * src/ds390/main.c,
1114         * src/hc08/ralloc.c (hc08_assignRegisters),
1115         * src/hc08/main.c,
1116         * src/mcs51/ralloc.c (mcs51_assignRegisters),
1117         * src/mcs51/main.c,
1118         * src/pic/ralloc.c (pic14_assignRegisters),
1119         * src/pic/main.c,
1120         * src/pic16/ralloc.c (pic16_assignRegisters),
1121         * src/pic16/main.c,
1122         * src/xa51/ralloc.c (xa51_assignRegisters),
1123         * src/xa51/main.c,
1124         * src/z80/ralloc.c (z80_assignRegisters),
1125         * src/z80/ralloc.h,
1126         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
1127         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
1128         * src/SDCCcse.h,
1129         * src/SDCCdflow.c (computeDataFlow),
1130         * src/SDCCdflow.h,
1131         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
1132         * src/SDCCloop.h,
1133         * src/SDCCcflow.c (*),
1134         * src/SDCCcflow.h,
1135         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
1136         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
1137         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
1138         immedDom() returning wrong block; probably fixes bug #1160833)
1139
1140 2005-03-20 Borut Razem <borut.razem AT siol.net>
1141
1142         * support/scripts/inc2h.pl: WIN32 port
1143
1144 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
1145
1146         * device/lib/makefile.in: added abs.c and labs.c
1147
1148 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
1149
1150         * device/include/stdint.h: added
1151         * device/lib/abs.c: added
1152         * device/lib/labs.c: added
1153         * device/include/stdlib.h: added abs() and labs() prototypes
1154         * device/lib/libsdcc.lib: added abs and labs
1155         * device/include/float.h,
1156         * device/lib/_fsmul.c,
1157         * device/lib/printf_fast.c,
1158         * device/lib/printf_tiny.c: updated comments
1159
1160 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1161
1162         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
1163         bug #1164313
1164
1165 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1166
1167         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
1168         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
1169
1170 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
1171
1172         * device/lib/printf_large.c: removed inline assembly for portability and
1173           readability. Use printf_fast if speed or size are more important.
1174         * src/pic16/gen.c: removed conditions around use of DEBUGpc
1175         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
1176
1177 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
1178
1179         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
1180         prevent compiler warning
1181
1182 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1183
1184         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
1185         moved to level 0 and declared as static. Also they are explicit
1186         placed in access bank. This was necessery because some times they
1187         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
1188         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
1189         optimizations. Currently only compare to unsigned char is implemented,
1190         * src/pic16/gen.c: added fReturnIdx array,
1191         * (struct resolvedIfx) is moved to gen.h and made public,
1192         * (struct _G): added sregsAlloc and sregsAllocSet fields,
1193         * (aopForSym): added an optimization to directly store in stack of
1194         the operand of a SEND iCode,
1195         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
1196         but as registers instead (AOP_REG) using the fReturnIdx array,
1197         * (pic16_freeAsmop): remove the freed register from the
1198         _G.sregsAlloc field,
1199         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
1200         a compare of 'WREG',
1201         * (pic16_popGetTempRegCond): changed function prototype, now
1202         function takes also a bitVector argument v which holds the current
1203         set of registers that are allocated for stack access by aopForSym,
1204         registers allocated in aopForSym for accessing stack symbols are not
1205         any more part of the functions usedRegs field,
1206         * (genCall): some times aopOp is called for a stack variable to be
1207         send, aopForSym might perform the push, if this is true make sure
1208         that genCall doesn't push the variable twice by testing _G.resDirect,
1209         * (genFunction): changed testing for unspecified interrupt number
1210         from 256 to INTNO_UNSPEC,
1211         * modified selection scheme of frame pointer generation. Previously
1212         if function did use local registers a frame pointer was generated,
1213         now a frame pointer is generated only if function has arguments
1214         (that need PLUSW2 register access), or has stack arguments, or the
1215         compiler is not instructed to omit the frame pointer,
1216         * (genEndFunction): before restoring local registers that were saved
1217         in the function preamble, also restore the registers that *might*
1218         have been allocated for stack access,
1219         * (genRet): removed some old comments,
1220         * (genCmp, the active (RN's) version): added a call to the
1221         pic16_genCmp_special function to perform the compare with a more
1222         robust and optimized way,
1223         * (genInline): a feature has been added in inline code generation,
1224         which allows a wildcard variable substitution when writing inline
1225         assembly. Code is incomplete and experimental therefore undocumented,
1226         * (genCast): changed order of aopOp for result and right to allow
1227         aopForSym to directly load the result if possible,
1228         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
1229         perform an optimized compare on some selected special occasions,
1230         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
1231         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
1232         generate an IVT any more,
1233         * src/pic16/main.c (pic16_optionsTable): added command line option
1234         --optimize-cmp,
1235         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
1236         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
1237         macros,
1238         * src/pic16/NOTES: Raphael Neider added in list of active developers
1239         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
1240         jumptable_end to prevent bug #,
1241         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
1242         inCond and outCond fields,
1243         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
1244         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
1245         turn off register spilling,
1246         * (packRegsForOneUse): synced with other ports' versions although it
1247         is not used currently,
1248         * (pic16_packRegisters): added an optimization while reading
1249         structure bitfields, some registers may be saved (malloc code is
1250         decreased by 80 bytes)
1251
1252 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
1253
1254         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
1255         left is a bitfield, if yes, then don't optimize assignment. Perhaps
1256         this can be optimized more?
1257
1258 2005-03-10 Raphael Neider <rneider AT web.de>
1259
1260         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
1261           genNearPointerGet): (hopefully) fixed access to bitfields via
1262           pointers (p->bitN = x; and x = p->bitN; failed)
1263
1264 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
1265
1266         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
1267
1268 2005-03-09 Raphael Neider <rneider AT web.de>
1269
1270         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
1271
1272 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
1273
1274         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
1275         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
1276           (regTypeNum): set REG_BIT type if necessary
1277         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
1278         * support/regression/tests/critical.c: check bug 1144613
1279
1280 2005-03-02 Raphael Neider <rneider AT web.de>
1281
1282         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
1283
1284 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1285
1286         * src/avr/ralloc.c (serialRegAssign),
1287         * src/ds390/ralloc.c (serialRegAssign),
1288         * src/hc08/ralloc.c (serialRegAssign),
1289         * src/mcs51/ralloc.c (serialRegAssign),
1290         * src/pic/ralloc.c (serialRegAssign),
1291         * src/pic16/ralloc.c (serialRegAssign),
1292         * src/xa51/ralloc.c (serialRegAssign),
1293         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
1294
1295 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
1296
1297         * src/SDCCast.c (decorateType): fixed bug 1124787
1298
1299 2005-02-20 Hubert Sack <sack AT digiplan.de>
1300         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1301
1302         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
1303         patch #1121755
1304
1305 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1306
1307         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
1308         to keep the correct label reference count when adding/removing references
1309         to labels. A peephole file using this is appended to patch #1144962.
1310
1311 2005-02-14 Raphael Neider <rneider AT web.de>
1312
1313         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
1314         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
1315         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
1316           retrievals of result operand's value on assignment
1317
1318 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
1319
1320         * device/include/pic16/string.h: modified prototype for memccpy()
1321         to memccpy(void *, void *, char, size_t)
1322         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
1323         check whether to omit frame pointer or not,
1324         * (genInline): convert all occurences of "\n" to LF in inline
1325         assembler blocks, this helps formatting the inline text,
1326         * (pic16_loadFSR0): modified prototype,
1327         * (genNearPointerGet, genNearPointerSet): reorganization of code,
1328         removed some 8051 legacy code,
1329         * (genPackBits): enabled handling bitfields exceeding one byte in size,
1330         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
1331         before allocating temporary registers in functions,
1332
1333 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1334
1335         * support/regression/tests/bitvars.c: corrected the "fix"
1336
1337 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1338
1339         * support/regression/tests/bitvars.c,
1340         * support/regression/tests/bitwise.c,
1341         * support/regression/tests/rotate.c: "fixed" problems on Alpha
1342
1343 2005-02-10 Raphael Neider <rneider AT web.de>
1344
1345         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
1346           different size for Alpha
1347         * src/pic16/gen.c (genCmpEq) : improved compare with 0
1348
1349 2005-02-09 Raphael Neider <rneider AT web.de>
1350
1351         * src/SDCC.lex(doPragma) : save and restore warning options as well
1352           (also added new stack plus clone- and copyAndFreeSDCCERRG())
1353         * have #pragma less_pedantic set the errorlevel to WARNING
1354           (fixes #1117001)
1355         * (cloneOptimize) : fixed wrong malloc's size
1356         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
1357           facilitate correct handling of #pragma (save|restore)
1358
1359 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1360
1361         * src/mcs51/gen.c: removed non-standard C nameless struct/union
1362
1363 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
1364
1365         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
1366
1367 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
1368
1369         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
1370
1371 2005-02-02 Raphael Neider <rneider AT web.de>
1372
1373         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
1374         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
1375         * (pic16_storeForReturn): fixed to allow returning function pointers
1376         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
1377         * device/include/pic16/{stddef.h,stdbool.h}: added
1378
1379 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
1380
1381         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
1382
1383 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
1384
1385         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
1386         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
1387          appeared to be required
1388
1389 2005-01-31 Borut Razem <borut.razem AT siol.net>
1390
1391         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
1392           include/mcs51 and include/z80 directories to the package
1393
1394 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1395
1396         * src/hc08/gen.c (genFunction): fixed bug #1112752
1397
1398 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1399
1400         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
1401
1402 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1403
1404         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
1405
1406 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
1407
1408         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
1409
1410 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
1411
1412         * device/include/c8051fxxx.h: removed these 6 files
1413         * device/include/mcs51/c8051fxxx.h: added these 11 new files
1414
1415 2005-01-26 Raphael Neider <rneider AT web.de>
1416
1417         * src/pic16/gen.c (genAssign): fixed assignment from longs
1418           in codespace (were cut to three bytes)
1419         * (genDummyRead): implemented (except for CODESPACE...),
1420           fixed bug #1108575
1421         * src/pic16/glue.c (emitStatistics): beautified
1422         * device/lib/pic16/libm/Makefile: added include path
1423
1424 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1425
1426         * src/z80/gen.c (aopPut): fixed bug #1103902
1427
1428 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1429
1430         * device/lib/expf.c: fixed bug #1095792
1431
1432 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
1433
1434         * device/lib/pic16/libm: added Math library sources
1435
1436 2005-01-24 Raphael Neider <rneider AT web.de>
1437
1438         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
1439           to enable upcast to pCodeOpReg2 (there is no type tag to
1440           differenciate the two and pic16_popGet2p cast into PCOR2)
1441         * src/pic16/main.c (_process_pragma): fixed another malloc bug
1442           (sizeof(sectNames) changed to sizeof(sectName))
1443           Both patches fix segfaults under MinGW.
1444
1445 2005-01-23 Raphael Neider <rneider AT web.de>
1446
1447         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
1448           Safe_[mc]?alloc()'ed variables
1449         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
1450           of (byte sized) temporaries (assign them to WREG for now)
1451         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
1452           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
1453           this might fix SIGSEGVs on MinGW...
1454         * src/SDCCopt.c (killDeadCode): restored original behaviour
1455           (volatile operands might get thrown away though)
1456
1457 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
1458
1459         * src/pic16/gen.c: fixed bug #1106975,
1460         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
1461         pointer update, INTCON is saved, global interrupts are disabled and
1462         restored after updateing TOS.
1463         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
1464         * added function attribute 'shadowregs' to take advantage of shadow
1465         registers,
1466         * added function attribute 'wparam' as an alternative to the wparam
1467         pragma,
1468         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
1469         user declares a non-ISR function as 'shadowregs',
1470         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
1471
1472 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
1473
1474         * .version: bumped version number to 2.4.8
1475         * device/lib/pic16/pics.all: list of PIC18F devices supported by
1476         pic16 port,
1477         * device/lib/pic16/libio/i2c/: I2C module support library,
1478         * device/include/pic16/i2c.h: I2C support library header,
1479         * device/lib/pic16/libc/stdio/: standard IO support sources,
1480         * (printf_small.c): printf_small() source, supports float print,
1481         * (printf_tiny.c): printf_tiny() source, does not support floats,
1482         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
1483         enable global optimizations for entire library source, other
1484         Makefiles in the source tree are also modified to reflect this,
1485         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
1486         function,
1487         * doc/sdccman.lyx: updated to reflect new changes,
1488         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
1489         sym->onStack if-case,
1490         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
1491         sbit, idata, _idata, xdata, _xdata,
1492         * added pragma library, to link an external library, (see doc),
1493         * removed command line options, --pomit-config-words, --pomit-ivt,
1494         --pleave-reset-vector,
1495         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
1496         when calling assembler to reflect memory model used, also define
1497         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
1498         reflect stack model used,
1499         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
1500         on stack return NULL,
1501
1502 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1503
1504         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
1505           of the operands is volatile. Fixes #1020220
1506
1507 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1508
1509         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
1510         * (OptimizeRegUsage): make sure that there is really no other flow where
1511           the first pCode is used
1512
1513 2005-01-22 Raphael Neider <rneider AT web.de>
1514
1515         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
1516           to fix #1106967 (pCode->seq are not set up correctly)
1517
1518 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1519
1520         * src/SDCCglue.c (glue): make sure code area is declared before the
1521         static initialization area.
1522
1523 2005-01-21 Raphael Neider <rneider AT web.de>
1524
1525         * device/lib/Makefile.in: fixed test for pic16 install dir
1526         * device/lib/pic16/*/Makefile*: modified compile flags to enable
1527           optimizations
1528         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
1529           added --optimize-goto compiler switch and pragma wparam documentation
1530         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
1531         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
1532           and PRODH closing bug #1071770 (peephole optimizer)
1533
1534 2005-01-19 Raphael Neider <rneider AT web.de>
1535
1536         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
1537           cmdLine buffers (used when calling sdcpp...) are large enough
1538           (MAX_PATH=256 truncates arguments leading to system halts when
1539           used in MinGW...)
1540         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
1541         * (genUminus): rewritten to for efficiency
1542         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
1543           used uninitialized in some cases)
1544         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
1545           copy the third byte from the int -- now assumes 0x80 (data memory)
1546         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
1547           operands (genAddLit expects the iCode's operands to swapped as
1548           well), fixed leftover bytes (crashed for short left operands)
1549         * (pic16_genMinusDec): performance improvements, removed false
1550           PIC14 emitSKPNCs
1551         * (pic16_genMinus): fixed to cope with differently sized operands
1552         * src/pic16/glue.c (pic16_glue): added new banksel optimization
1553           for --obanksel > 1
1554         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
1555         * src/pic16/graph.[ch]: implementation of directed graphs, used by
1556           new banksel optimization
1557         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
1558           analysis for temporary registers (segfaults...)
1559         * src/pic16/peeph.def: added rule
1560
1561 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
1562
1563         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
1564         which converts a float number to its ASCII representation
1565         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
1566         functions to convert the fractional and integer part of a float to ASCII,
1567         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
1568         realloc.c): added _MALLOC_SPEC to explicit place variables in data
1569         ram
1570         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
1571         _STATMEM macros,
1572         * device/include/pic16/adc.h: added GPL info,
1573         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
1574         a pCodeOp as tested operand,
1575         * (genNearPointerGet): optimized bit testing, does not use
1576         intermediate register for bit value, test directly instead with
1577         BTFSS, BTFSC, works only for single bits,
1578         * (genpic16Code): dump the name of the iCode in the asm,
1579         * src/pic16/ralloc.c (decodeOp): removed static declaration and
1580         renamed to pic16_decodeOp,
1581         * (serialRegAssign): do not allocate a temporary register for iCode
1582         sequences that test a single bit for 1/0
1583
1584 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
1585
1586         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
1587         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
1588         access stack and frame pointers. They are initially assigned to
1589         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
1590         accessing SFRs. Updated all occurences of modification of stack or
1591         frame pointer in gen.c and pcode.c,
1592         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
1593         assigning of a literal value to pointers,
1594         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
1595         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
1596         selected
1597
1598 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
1599
1600         * doc/sdccman.lyx: update documentation about stack pragma, added
1601         some info for stack memory models
1602
1603 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1604
1605         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
1606
1607 2005-01-08 Raphael Neider <rneider AT web.de>
1608
1609         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
1610           udata sections to fix bug #1097823
1611
1612 2005-01-05 Raphael Neider <rneider AT web.de>
1613
1614         * src/pic16/gen.c (genGenericShift): added handling of differently
1615           sized left operand and result
1616
1617 2005-01-04 Raphael Neider <rneider AT web.de>
1618
1619         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
1620         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
1621           to hold the condition bit)
1622         * added new version of genCmp (old code available via #define)
1623         * added new version of genShiftLeft/genShiftRight in a generic
1624           way, now supports shifting by negative values
1625         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
1626           shiftCount (expected by genGenericShift)
1627         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
1628         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
1629           dump
1630         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
1631           is an invalid literal too...)
1632
1633 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
1634
1635         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
1636         from Raphael Neider,
1637         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
1638         for 8-bit literals. This fixes some literal operands which are sign
1639         extended to 16-bits ints when instruction needs only 8-bits.
1640
1641 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
1642
1643         * device/lib/logf.c: added mcs51 assembly version
1644         * device/lib/expf.c: added mcs51 assembly version
1645         * device/lib/_logexpf.c: new shared asm code for expf and logf
1646         * device/include/math.h: add defines for assembly math library
1647         * device/lib/Makefile.in: build new _logexpf.c
1648         * device/lib/libfloat.lib: use new _logexpf.c
1649
1650 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1651
1652         * src/pic/device.c
1653         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
1654           device types which have less than 0x7f registers.
1655
1656 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1657
1658         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
1659
1660 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
1661
1662         * device/lib/printf_fast.c: only build on supported arch.
1663         * device/lib/printf_tiny.c: only build on supported arch.
1664         * device/lib/printf_fast_f.c: only build if asm float lib
1665         * device/lib/_fsget1arg.c: only build if asm float lib
1666         * device/lib/_fsget2args.c: only build if asm float lib
1667         * device/lib/_fsnormalize.c: only build if asm float lib
1668         * device/lib/_fsreturnval.c: only build if asm float lib
1669         * device/lib/_fsrshift.c: only build if asm float lib
1670         * device/lib/_fsswapargs.c: only build if asm float lib
1671         * device/include/stdio.h: don't provide print_fast,
1672           print_fast_f, print_tiny prototypes if --xstack used
1673
1674 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
1675
1676         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
1677         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
1678           to the SOURCES
1679
1680 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
1681
1682         * device/lib/printf_fast_f.c: same as printf_fast, but
1683           with floating point enabled
1684         * device/lib/printf_fast.c: minor tweaks
1685         * device/include/stdio.h: add printf_fast_f
1686
1687 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
1688
1689         * src/SDCCmain.c: make --float-reent default for mcs51
1690         * device/lib/_fsadd.c: added mcs51 assembly version
1691         * device/lib/_fssub.c: added mcs51 assembly version
1692         * device/lib/_fsmul.c: added mcs51 assembly version
1693         * device/lib/_fsdiv.c: added mcs51 assembly version
1694         * device/lib/_fseq.c: added mcs51 assembly version
1695         * device/lib/_fsneq.c: added mcs51 assembly version
1696         * device/lib/_fsgt.c: added mcs51 assembly version
1697         * device/lib/_fslt.c: added mcs51 assembly version
1698         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
1699         * device/lib/Makefile.in: add _fscmp to build
1700         * device/lib/libfloat.lib: add _fscmp to build
1701
1702 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
1703
1704         * device/lib/_fs2slong.c: added mcs51 assembly version
1705         * device/lib/_fs2sint.c: added mcs51 assembly version
1706         * device/lib/_fs2schar.c: added mcs51 assembly version
1707         * device/lib/_fs2ulong.c: added mcs51 assembly version
1708         * device/lib/_fs2uint.c: added mcs51 assembly version
1709         * device/lib/_fs2uchar.c: added mcs51 assembly version
1710         * device/lib/_slong2fs.c: added mcs51 assembly version
1711         * device/lib/_sint2fs.c: added mcs51 assembly version
1712         * device/lib/_schar2fs.c: added mcs51 assembly version
1713         * device/lib/_ulong2fs.c: added mcs51 assembly version
1714         * device/lib/_uint2fs.c: added mcs51 assembly version
1715         * device/lib/_uchar2fs.c: added mcs51 assembly version
1716         * device/include/float.h: added #define to select asm vs c
1717
1718 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
1719
1720         * device/lib/printf_fast.c: improvements to float output
1721         * device/include/float.h: add defines for assembly float library
1722         * device/lib/_fsget1arg.c: receive 1 float arg
1723         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
1724         * device/lib/_fsnormalize.c: normalize a float
1725         * device/lib/_fsreturnval.c: return float, various helper routines
1726         * device/lib/_fsrshift.c: right shift a float's mantissa
1727         * device/lib/_fsswapargs.c: swap 2 floats
1728         * device/lib/Makefile.in: build these 6 new files for mcs51
1729         * device/lib/libfloat.lib: add these 6 files to the library
1730
1731 2004-12-26 Borut Razem <borut.razem AT siol.net>
1732
1733         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
1734           built by gcc 3.4.2
1735
1736 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
1737
1738         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
1739           and fully reentrant and register bank neutral.
1740         * device/lib/printf_fast.c: added float (not enabled by default),
1741           added compact/slower integer (also not enabled by default),
1742           improved size/speed of fast integer code, other minor changes
1743         * device/include/stdio.h, device/lib/Makefile.in,
1744           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
1745
1746 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
1747
1748         * src/pic16/pcode.c: declaring variables other than at the start of a
1749           block is not supported in C by VC6.
1750
1751 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
1752
1753         * applied a previous patch from Raphael Neider that wasn't included
1754         in the previous commits, which fixes infinite loops within jumptable
1755         improvements,
1756         * made some fixes that previous patches introduced
1757
1758 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
1759
1760         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
1761         that fixes an issue with AOP_PCODE asmop's offset,
1762         * (pic16_popCopyReg): update instance field too,
1763         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
1764         function of pic port,
1765         * (genCmp, genAnd, genAssign),
1766         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
1767
1768 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
1769
1770         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
1771         variables initial values to idata section,
1772         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
1773         variables in some functions. This utilizes parmBytes field of iCode
1774         structure to hold the offset of the variable in stack. (might be
1775         able to use the stack field too?)
1776         * applied patch from Raphael Neider # ### , # ###
1777         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
1778         variable initial values in idata section,
1779         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
1780         for static variables with initial value
1781         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
1782         applied fix in while loop from Raphael Neider.
1783
1784 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
1785
1786         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
1787         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
1788         * src/ds390/ralloc.c (serialRegAssign): spill bits
1789         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
1790         * support/Util/SDCCerr.c,
1791         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
1792         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
1793         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
1794
1795 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
1796
1797         * device/include/sdcc-lib.h: inserted LGPL, added includes
1798           asm/ds390/features.h and asm/mcs51/features.h
1799         * device/include/asm/default/features.h,
1800         * device/include/asm/gbz80/features.h,
1801         * device/include/asm/z80/features.h: added empty _AUTOMEM
1802           and _STATMEM
1803         * device/include/asm/ds390/features.h,
1804         * device/include/asm/mcs51/features.h: added files with defines for
1805           _AUTOMEM and _STATMEM indicating automatic and static storage class
1806         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
1807         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
1808         * src/SDCCicode.c (geniCodeCast),
1809         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
1810         * src/SDCCloop.c (loopInduction): removed unused variable lr
1811         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
1812           to convertToFcall to include char modulo (RFE 1065037), added check
1813           if left operand is unsigned and use abs of literal value
1814         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
1815           as it doesn't work after conversion from peephole.def to peephole.rul
1816         * src/mcs51/gen.c (toBoolean): added check for size,
1817           (genModOneByte): optimized code for signed char modulo a literal
1818           power of 2 (thanks to Hubert Sack),
1819           (genRRC): removed unnecessary "clr c",
1820           (genRLC): replaced "add a,acc" with cheaper "rlc a"
1821         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
1822           jump optimization,
1823           swapped rules 256.c and 256.d,
1824           extended 256.d by using new multiple checks (thanks Erik),
1825           added rules 256.e and 256.f,
1826           updated rule 261.a and 261.b to new generated code
1827         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
1828
1829 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1830
1831         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
1832           induction related bugs, including first part of bug #1074377
1833
1834 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
1835
1836         * applied patch from bug-report #1076292,
1837         * applied patches for genAnd and Goto-optimizations for Raphael
1838         Neider,
1839         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
1840         dump a less iCode information,
1841         * src/pic16/device.h (pic16_options_t): added field debgen,
1842         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
1843         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
1844         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
1845         puclic,
1846         * (various functions): added macros FENTRY and FENTRY2 to functions,
1847         to emit function prologue,
1848         * (various functions): fixed indentation,
1849         * (genNearPointerGet): fixed loading of FSR0,
1850         * (genPackBits): applied patch from Raphael Neider to fix updating
1851         of FSR0 and touching only the modified bits,
1852         * src/pic16/genarith.c (various functions): added macros FENTRY to
1853         emit function prologue in comments,
1854         * src/pic16/pcode.h: added functions debugf2, debugf3,
1855         * src/pic16/ralloc.c: partial fix for packForPush caused
1856         segmentation fault,
1857
1858 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1859
1860         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
1861           <stsp AT users.sourceforge.net> with reversed byte order
1862         * support/regression/tests/rotate.c: added (ds390 skips some tests)
1863
1864 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1865
1866         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
1867           bug #1074377
1868         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
1869         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
1870
1871 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
1872
1873         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
1874
1875 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1876
1877         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
1878           conditions,
1879           (setFromConditionArgs): friendly operand parser for peephole rules,
1880           (operandBaseName, operandsNotRelated): new peephole condition
1881           "operandsNotRelated" -- similar to "operandsNotSame", but takes
1882           architecture specific register naming into account, handles n-way
1883           comparisons, and supports quoted literals
1884         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
1885
1886 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1887
1888         * src/mcs51/peeph.def: fixed bug #1076940
1889
1890 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
1891
1892         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
1893
1894 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1895
1896         Adding support for replacing ljmps with sjmps in jumptables
1897         generated for switch statements. For now you need to set the
1898         environment variable SDCC_SJMP_JUMPTABLE to enable this.
1899         Now 4 algorithms for mcs51 jumptable generation are used:
1900         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
1901         addresses loaded pc-relative for up to 112 cases and stack-pushing
1902         target addresses loaded with offset from dptr for up to 256 cases.
1903
1904         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
1905         * src/mcs51/main.c: adapted constants for switch table generation
1906         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
1907
1908 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
1909
1910         * device/lib/printf_large.c (_print_format): fixed bug 1073386
1911         * support/regression/tests/bug1057979.c: added test for bug 1073386
1912
1913 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
1914
1915         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
1916         compilers
1917
1918 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
1919
1920         * src/pic16/device.h,
1921         * src/pic16/genarith.c,
1922         * src/pic16/glue.c,
1923         * src/pic16/main.c,
1924         * src/pic16/pcode.c: applied patches #1068154 and #1070213
1925
1926 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
1927
1928         Large cummulative patch for pic16 port.
1929         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
1930         to call when a stack overflow occurs,
1931         * (malloc.h): added CVS Id tag,
1932         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
1933         variable,
1934         * added libc directory. The current version of LibC contains string
1935         functions, ctype functions and macros and some functions of the
1936         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
1937         be extensively tested in the future. Standard disclaimer here.
1938         Library is not automatically build yet. But one can build it by
1939         invoking 'make' inside the libc directory.
1940         * added ADC library under libio. Preliminary version yet.
1941
1942         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
1943         * src/pic16/gen.c (aopForRemat): asmop size is filled by
1944         aopForRemat() now and not by pic16_aopOp(),
1945         * (pic16_popGetTempReg): removed warning messgae when allocating
1946         temporary registers, its a buggy feature and will be removed,
1947         * (pic16_popGet): set register instance field in AOP_CRY,
1948         * (pic16_outBitC): fixed for results in size greater than 1,
1949         * (genUminusFloat): fixed for pic16, ported code from mcs51,
1950         * (pic16_storeForReturn): optimized return of 0,
1951         * (genCmp): experimental code for new genCmp which uses PIC18's
1952         special compare&skip instructions. Initial tests fail some times
1953         with variables grater than 1 byte in size, so new code is disabled,
1954         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
1955         a single bit,
1956         * (genCast): began a fix to optimize the casting of a bit to another
1957         bit, now assigning a bitfield to another bitfield will fail, sorry,
1958         * src/pic16/main.c: disabled the use of lr-support feature,
1959         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
1960         * added some function prototypes, added function _debugf prototype,
1961         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
1962         bits with offset (case PO_GPR_BIT),
1963         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
1964         command line,
1965         * (isBankInstruction): modified to return 0 for no banking instruction,
1966         and 1 for banking instruction,
1967         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
1968         caused stop processing pCodes after a inline assembly block,
1969         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
1970         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
1971         registers when it shouldn't,
1972         * src/pic16/ralloc.c (allocReg): add preliminary support for
1973         supporting a limited set of temporary registers,
1974
1975 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1976
1977         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
1978           genDataPointerSet): ensure assignments always copy in MSB to LSB
1979           order,
1980           (loadRegFromAop): recognize CLRH optimization,
1981           (genFunction): optimize RECEIVE iCodes in reentrant functions
1982
1983 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1984
1985         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
1986           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
1987           selected.
1988         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
1989         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
1990           contiguous with data
1991
1992 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1993
1994         * device/lib/_gptrget.c (_gptrget),
1995         * device/lib/_gptrgetc.c (_gptrgetc),
1996         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
1997           instead of sjmp to ret
1998         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
1999           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
2000
2001 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
2002
2003         * .version: bumped version to 2.4.7
2004         * device/lib/_gptrget.c (_gptrget): is now _naked
2005         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
2006         * device/lib/_gptrput.c (_gptrput): is now _naked
2007         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
2008           (createFunction): fixed xstack
2009         * src/SDCCglue.c (emitMaps): set allocation required for bit area
2010         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
2011           or bit either,
2012           (geniCodeCritical): store original interrupt state in an iTemp bit
2013           var unless stack-auto
2014         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
2015         * src/SDCCmain.c (setIncludePath): added include/target to search path
2016         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
2017         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
2018           prototype,
2019           (processFuncArgs): put bit vars in bit area
2020         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
2021           unsaveRBank): fixed xstack,
2022           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
2023           (genFunction, genEndFunction): fixed xstack,
2024           (genAssign): optimization don't walk backwards through mem
2025         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
2026         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
2027         * support/regression/Makefile: also make library (for stack-auto) when
2028           making "all" and added "test-mcs51-xstack-auto"
2029         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
2030         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
2031         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
2032         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
2033         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
2034           make-library by MAKE_LIBRARY
2035         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
2036           regression tests for xstack
2037         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
2038         * support/regression/tests/critical.c: test for critical on mcs51
2039
2040 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2041
2042         * support/regression/ports/ucz80/spec.mk: use include and lib files from
2043           built version of sdcc instead of installed version
2044
2045 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
2046
2047         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
2048         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
2049           vprintf.c now
2050         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
2051         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
2052           WARNING: remove device/lib/build/z80/printf.o by hand when
2053           updating from previous build!
2054         * device/lib/z80/printf.c: updated comment
2055         * support/regression/tests/bug1057979.c: test all ports now
2056         * support/regression/tests/bug1065458.c: file added
2057
2058 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2059
2060         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
2061           *_start and *_end symbols for static functions
2062
2063 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
2064
2065         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
2066           and search crt0.o in all library paths,
2067           (setIncludePath): proper handling of --nostdinc,
2068           (setLibPath): proper handling of --nostdlib
2069         * support/regression/Makefile,
2070         * support/regression/ports/ds390/spec.mk,
2071         * support/regression/ports/gbz80/spec.mk,
2072         * support/regression/ports/hc08/spec.mk,
2073         * support/regression/ports/mcs51/spec.mk,
2074         * support/regression/ports/mcs51-large/spec.mk,
2075         * support/regression/ports/mcs51-stack-auto/spec.mk,
2076         * support/regression/ports/z80/spec.mk: use include and lib files from
2077           built version of sdcc instead of installed version
2078         * doc/sdccman.lyx: fixed typo in --nostdinc
2079
2080 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
2081
2082         * src/pic/pcode.c,
2083         * src/pic/device.c,
2084         * src/pic/ralloc.c,
2085         * src/pic/gen.c : added support to generate code for struct bit fields.
2086
2087 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
2088
2089         * as/xa51/xa_version.h,
2090         * device/include/errno.h,
2091         * device/include/regc515c.h,
2092         * device/lib/_itoa.c,
2093         * device/lib/_ltoa.c,
2094         * device/lib/ser_ir_cts_rts.c,
2095         * sim/ucsim/xa.src/glob.cc,
2096         * sim/ucsim/xa.src/inst_gen.cc,
2097         * sim/ucsim/xa.src/xa_bit.cc,
2098         * sim/ucsim/xa.src/xa_sfr.cc,
2099         * sim/ucsim/z80.src/inst_dd.cc,
2100         * sim/ucsim/z80.src/inst_fdcb.cc,
2101         * support/scripts/keil2sdcc.pl,
2102         * src/pic16/pic16.dsp,
2103         * src/pic16/pic16a.dsp: corrected cvs line endings
2104         * device/lib/printf_large.c: fixed bug 1057979
2105         * src/pic16/gen.c: fixed non-C standard code
2106         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
2107         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
2108         * support/regression/ports/mcs51/support.c: reload T1 asap
2109         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
2110           pdata use and clear idata startup behaviour
2111         * support/regression/tests/bug1057979.c: added
2112
2113 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
2114
2115         * device/examples/ds390/ow390/ad26.h,
2116         * device/examples/ds390/ow390/cnt1d.h,
2117         * device/examples/ds390/ow390/crcutil.c,
2118         * device/examples/ds390/ow390/ownet.h,
2119         * device/examples/ds390/ow390/owsesu.c,
2120         * device/examples/ds390/ow390/swt12.h,
2121         * device/examples/ds390/ow390/swtoper.c,
2122         * device/examples/ds390/ow390/temp10.h,
2123         * device/examples/ds390/ow390/thermodl.c,
2124         * device/examples/ds390/tinitalk/tinitalk.dsp,
2125         * device/examples/ds390/tinitalk/tinitalk.dsw,
2126         * device/examples/mcs51/clock/hw.h,
2127         * device/examples/mcs51/simple2/go.bat,
2128         * device/examples/serialcomm/windows/serial.h,
2129         * device/examples/xa51/dummy.c,
2130         * device/examples/xa51/hello.c,
2131         * device/include/80c51xa.h,
2132         * device/include/at89x051.h: corrected cvs line endings
2133
2134 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
2135
2136         * src/pic16/main.c (options): added command line --gstack, to trace
2137         stack over/under flows,
2138         * added pragma 'wparam' to allow passing first byte of function
2139         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
2140         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
2141         call to __gstack_test function and sets up the symbol as extern,
2142         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
2143         * popaop): added call to pic16_testStackOverflow,
2144         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
2145         wparamList list,
2146         * (genCall, genPcall): now all parameters are passed via stack
2147         except in functions that are pass to wparam pragma in which WREG is
2148         used too,
2149         * (genPcall): REENTRANT flag is checked to see if variable prototype
2150         contains reentrant keyword, don't call a non-reentrant function, via
2151         a reentrant function pointer or vice versa, functions are never
2152         passed via WREG,
2153         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
2154         D.Winkler,
2155         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
2156         SIGSEGV when accessing a NULL register stucture,
2157         * (pic16_printGPointerType): modified to handle UPPER modifier for
2158         function initializers, changed prototype of function to simpler one,
2159         * (pic16_printIvalFuncPtr): check to see if function is already
2160         added in externs list,
2161         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
2162         optimized a move from W to SFR with a move to the same register
2163         later after a CALL,
2164         * device/lib/pic16/debug: NEW directory, contains debug features
2165         which are enabled when linking with libdebug.lib, currently command
2166         line option --gstack enables stack pointer tracing for over/under
2167         flow, corresponding sources are in debug/gstack
2168
2169 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
2170
2171         * doc/sdccman.lyx: updated SDCC version,
2172         * (PIC16 port): update list of command line options,
2173         * src/pic16/device.h (structure pic16_options_t): added field gstack
2174         to enable stack overflow tracing on push/pops,
2175         * src/pic16/device.c (statistics structure): added statistics
2176         structure,
2177         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
2178         pic16_dump_int_registers): increase statistics counters for each
2179         * variable which is encountered
2180         * (pic16_dump_usection): emit each .udata variable to its own udata
2181         section,
2182         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
2183         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
2184         parameters via stack, otherwise use old scheme,
2185         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
2186         assembler output file,
2187         * src/pic16/main.c: added command line options --gstack to enable
2188         push/pop tracing for stack overflow,
2189         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
2190         instructions): added size of each instruction,
2191         * (pic16_countInstruction): estimate size of instructions in
2192         the_pFile list, inline assembly blocks are not counted,
2193         * (pic16_FixRegisterBanking): trace previous register usage, when
2194         banksel optimizations is greater than 0, don't emit a redudant
2195         banksel directive,
2196
2197 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
2198
2199         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
2200         * src/pic16/ralloc.c : applied same fix for pic16.
2201         * src/pic/gen.c : tidied it up a little.
2202
2203 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2204
2205         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
2206         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
2207
2208 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2209
2210         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
2211
2212 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2213
2214         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
2215         non-reentrant function __modsint in the interrupt function (thus
2216         corrupting math operations during serial I/O)
2217         * device/lib/ser_ir.c: as above, changed buffersize
2218         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
2219         256.c,d for zeroing
2220         * doc/Makefile: added option -t for rsync
2221
2222 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2223
2224         * src/SDCCast.h (struct ast),
2225         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
2226
2227 2004-10-20 Borut Razem <borut.razem AT siol.net>
2228
2229         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
2230         package
2231
2232 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
2233
2234         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
2235         makefile targets,
2236         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
2237         support functions to replace long sequences of MOVFF's from access
2238         bank registers to stack and vice versa,
2239         * src/pic16/device.h: added new field opt_flags, where optimization
2240         flags can be set to enable certain features,
2241         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
2242         * pBlock, (genFunction, genEndFunction): surroung loop for
2243         saving/loading used registers in stack with PC_INFO pCodes,
2244         INF_LREGS. Code in between can then be optimized by pCode optimizer
2245         to support function calls,
2246         * (genDataPointerSet): fixed bug which loaded float fields in
2247         structures with corrupt data,
2248         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
2249         in a standard way debug info on stderr. Feature used for developing
2250         and debugging only,
2251         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
2252         obsolete chunks of code,
2253         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
2254         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
2255         * pic16/src/pcode.c (pic16_newpCodeInfo,
2256         * (pic16_newpCodeOpLocalRegs),
2257         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
2258         feature,
2259         * (pic16_pCodeConstString): printing of the initial value of a
2260         symbol as a comment is inhibited since parsing was already done by
2261         copyStr and output is corrupt,
2262         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
2263
2264 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2265
2266         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
2267
2268 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
2269
2270         * as/mcs51/lkarea.c: removed old K&R style,
2271           (lnksect): changed check on boundary error,
2272           (lnksect2): changed check on boundary error,
2273           (lnksect2): extend XSTK to end of page if size = 1
2274         * as/mcs51/lkmain.c: removed old K&R style,
2275           (Areas51): create l_IRAM symbol
2276         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
2277         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
2278           model-mcs51-stack-auto, added model-mcs51-xstack-auto
2279         * device/lib/_mullong.c: added version to be compiled with xstack
2280         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
2281         * device/lib/mcs51/crtxclear.asm: clear pdata as well
2282         * device/lib/mcs51/crtxstack.asm: fixed comment
2283         * src/SDCCglue.c: maxInterrupts defaults to 0,
2284           (emitMaps): added pdata,
2285           (createInterruptVect): (re)moved default,
2286           (glue): added pdata,
2287           (glue): moved __start__xstack to XSTK with default size 1
2288         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
2289           and options.float_rent when options.stackAuto is set,
2290           (linkEdit): only write XDATA_NAME if provided on command line
2291         * src/SDCCmem.h,
2292         * src/SDCCmem.c: added pdata
2293         * src/port.h: added pdata_name to PORT
2294         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
2295           (saveRegisters, unsaveRegisters): removed usage of B,
2296           (genMinus): fixed accumulator clash,
2297           (genJumpTab): added comment, this needs another look
2298         * src/mcs51/gen.c: added check for "B in use" paranoia,
2299           added pushB() and popB()
2300         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
2301           chance
2302         * src/avr/main.c,
2303         * src/ds390/main.c,
2304         * src/hc08/main.c,
2305         * src/mcs51/main.c,
2306         * src/pic/main.c,
2307         * src/pic16/main.c,
2308         * src/xa51/main.c,
2309         * src/z80/main.c: (reset_regparms) made void parameter explicit and
2310           added PSEG (PAG,XDATA) or NULL to port specifier
2311         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
2312         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
2313           (_mcs51_genInitStartup): removed __start__xstack equ,
2314           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
2315         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
2316         * src/z80/gen.c (_rleAppend): fixed warnings
2317         * support/regression/tests/zeropad.c: added pdata test
2318         * .version: bumped to 2.4.6
2319
2320 2004-10-17 Borut Razem <borut.razem AT siol.net>
2321
2322         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
2323         as a part of nightly build
2324
2325 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
2326
2327         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
2328         WREG holds the first byte function parameters,
2329         * (aopForSym): take special case for symbols which are in FARSPACE
2330         but in CODESPACE too,
2331         * (assignResultValue): modified to take into account _G.useWreg,
2332         * (genCall): don't use wreg for parameter passing when function is
2333         declared as reentrant, too, added optimization INCF to stack
2334         pointer when stack parameter count is 1,
2335         * (genFunction, genEndFunction): refurnished and fixed to not using
2336         wreg for passing parameters when function has varargs or is
2337         reentrant, fixed bug with symbol name compare for generating
2338         functions in absolute address,
2339         * (pic16_storeForReturn): refurnished,
2340         * (genCmp): began writing a new version of the function, not ready
2341         yet, therefore it is disabled,
2342         * (genAssign): do not read code memory when assigning a function to
2343         a pointer function,
2344         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
2345         array of characters, not pointer,
2346         * (pic16initialComments): in debug mode emit an .ident directive for
2347         the assembler,
2348         * (_process_pragma): emit a new warning type (internal to pic16)
2349         when setting stack to default length, emit a similar warning when
2350         placing a function at absolute address and address is not word aligned
2351         * (_pic16_parseOptions): added 'return TRUE' statement,
2352         * (_pic16_linkEdit): if compiling a source, then add the source's
2353         file object, first in the list of objects to link,
2354
2355 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
2356
2357         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
2358         * src/pic/main.c : removed VC warning.
2359         * src/pic/gen.c : changed comment.
2360
2361 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
2362
2363         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
2364         reference to a deprecated symbol _GPTRREG was causing failure to
2365         link. Thanks G. M. Gallant for the info.
2366
2367 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
2368
2369         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
2370         comments for Bugs item #954788.
2371
2372 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
2373
2374         * src/pic16/device.c (pic16_dump_gsection,
2375         * pic16_groupRegistersInSection): handle symbols declared to be in
2376         access bank differently,
2377         * src/pic16/gen.c (struct _G): added field resDirect,
2378         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
2379         send values read from stack directly to result and don't allocate
2380         temporary values,
2381         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
2382         same registers,
2383         * (pic16_sameRegsOfs): NEW,
2384         * (freeAsmop): if _G.resDirect is set then do not mark registers as
2385         free because they were not allocated from temporary pool,
2386         * pic16_popRegFromString): workaround to fix a problem with
2387         allocating variables twice or never,
2388         * (genGenPointerGet): using PRODL instead of FSR0H,
2389         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
2390         instead of FSR0H,
2391         * (genAssign): take advantage of the _G.resDirect flag,
2392         * (genCast): around line 11844, use mov2f instead of directly
2393         MOVFF'ing between operands to account for literal values,
2394         * src/pic16/genutils.c: some new debug functions for gpsim have been
2395         added,
2396         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
2397         float with integer part only,
2398         * src/pic16/main.c (_process_pragma): handle pragma udata access to
2399         place variables in access bank
2400         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
2401         updated sources to reflect recent changes in gen.c
2402
2403 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
2404
2405         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
2406         sources that searched for headers in installation path, now the
2407         device/include/pic16 is used,
2408         * src/pic16/glue.c (pic16glue),
2409         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
2410         .line directives if not in debug mode, this suppresses assembler's
2411         warnings for ignored directives
2412
2413 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2414
2415         * src/port.h: made reset_regparms prototype void parameter explicit.
2416         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
2417         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
2418         * doc/sdccman.lyx: documented warning disabling and how to use
2419           printf_large to make it print floats.
2420         * device/include/stdbool.h: NEW
2421         * device/lib/_atof.c,
2422         * device/lib/_divuint.c,
2423         * device/lib/_divulong.c,
2424         * device/lib/expf.c,
2425         * device/lib/printf_large.c,
2426         * device/lib/sincosf.c,
2427         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
2428         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
2429           a completely reentrant lib.
2430
2431 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
2432
2433         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
2434         * device/include/pic16/stdio.h: fixed bug with colon
2435
2436 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
2437
2438         * device/include/pic16/stdio.h,
2439         * device/include/pic16/stdlib.h,
2440         * device/include/pic16/math.h: NEW
2441         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
2442         declared as _naked to reduce overhead
2443         * device/lib/Makefile.in (target port-specific-objects-pic16):
2444         changed * to *.* so to ignore the CVS directory,
2445         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
2446         stacked variables back in stack,
2447         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
2448         corruption
2449
2450 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
2451
2452         * .version: bumped version number to 2.4.5
2453         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
2454         * support/Util/SDCCerr.c (messages structure): added entry for
2455         W_POSSBUG2
2456
2457         Large cumulative patch for pic16 port and libraries.
2458         * device/include/pic16/sdcc-lib.h,
2459         * device/include/pic16/stdarg.h,
2460         * device/include/asm/pic16/features.h,
2461         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
2462         * device/include/pic16/float.h: changes reentrant keyword with
2463         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
2464         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
2465         updated target build-libraries to include objects from gptr,
2466         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
2467         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
2468         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
2469         all function headings,
2470         * src/SDCCmain.c: added global parameter userIncDirsSet,
2471         * (parseCmdLine): when option -I is encountered add directory to
2472         userIncDirsSet too,
2473         * src/version.awk: added space between control and long,
2474         * src/pic16/NOTES: added some notes for the port,
2475         * src/pic16/gen.c: added prototype for mov2fp function,
2476         * (fReturnpic16[]): properly named return value registers,
2477         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
2478         * (aopForSym): added code to handle symbols with onStack flag set,
2479         symbols onStack are allocated PTRSIZE bytes,
2480         * (aopFreeAsmop): handles special case where asmops are stack objects,
2481         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
2482         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
2483         added argument lock to trace flaws in allocating temporary registers
2484         when developing port,
2485         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
2486         * (pic16_popRegFromString): reenabled allocating a direct register
2487         from string,
2488         * (assignResultValue): various beautifications,
2489         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
2490         referenced function argument,
2491         * (genIpush): reenabled to allow stacked arguments, handles only
2492         ic->parmPush iCodes,
2493         * (genCall, genPcall): major changes to allow for variable argument
2494         functions, fixed a bug with falsely restoring stack pointer after
2495         returning from call,
2496         * (genFunction): pending code for critical function,
2497         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
2498         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
2499         * (genNearPointerGet): fixed bug with indirect reading, was always
2500         reading from INDF0
2501         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
2502         pointers,
2503         * (genAddrOf): rewrote code to take address of a stacked function parameter
2504         * (genCast): fixed casting to generic pointer type,
2505         * src/pic16/gen.h: added AOP_STA,
2506         * (struct asmop): added field stk,
2507         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
2508         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
2509         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
2510         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
2511         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
2512         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
2513         generic pointers,
2514         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
2515         and library paths,
2516         * (pic16_port structure): generic pointer size is set to 3,
2517         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
2518         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
2519         compiler warning,
2520         * src/pic16/ralloc.c (allocReg): prevent allocating register when
2521         operand is an iTemp,
2522
2523 2004-09-24 Martin Helmling <mh AT octo-soft.de>
2524
2525         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
2526         * debugger/mcs51/simi.c: addapt new syntax of s51
2527
2528 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
2529
2530         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
2531         * src/pic16/pcode.c: commented out some calls to free() in order to
2532         fix bug #989576,
2533
2534 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2535
2536         * src/SDCCicode.h,
2537         * src/SDCCicode.c (isiCodeInFunctionCall),
2538         * src/avr/ralloc.c (selectSpil),
2539         * src/pic/ralloc.c (selectSpil),
2540         * src/pic16/ralloc.c (selectSpil),
2541         * src/ds390/ralloc.c (selectSpil),
2542         * src/hc08/ralloc.c (selectSpil),
2543         * src/xa51/ralloc.c (selectSpil),
2544         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
2545         stack in the middle of a function call sequence (fixes bug #1020268)
2546         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
2547         costs associated with the minimum switch case.
2548
2549 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2550
2551         * src/SDCC.lex: fixed bug #1030549
2552
2553 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2554
2555         * src/SDCCcse.h (struct cseDef),
2556         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
2557         over a function call if the CSE is derived from a symbol whose
2558         address has been taken (fixes bug #1029883)
2559         * support/regression/tests/bug-1029883: a new regression test for
2560         this bug
2561
2562 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2563
2564         * src/hc08/gen.c (emitinline): fixed bug #1029778
2565         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
2566         to a cast object is no longer a syntax error ("fixes" bug #1030006,
2567         and starts toward RFE #905167)
2568
2569 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
2570
2571         * src/pic16/gen.c (mov2f): New function to move an operand to
2572         another without considering if it is a literal or a register,
2573         * (pic16_sameRegs): don't check if they are both AOP_REG,
2574         * (AccRsh): removed andmask=0 lines,
2575         * (genLeftShift): duplicated to be improved in future versions,
2576         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
2577         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
2578         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
2579         * (pic16initMnemonics): added initialization for POC_INFSNZW,
2580         * (insertBankSwitch): fixed inserting banksel directives algorithm
2581         for instructions that follow a skip instruction, this fixes a report
2582         for broken subtraction code generation,
2583         * src/pic16/ralloc.c (deassignLRs): do not free register if current
2584         iCode is a left op, just in case result and right share the same
2585         registers
2586
2587 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2588
2589         * src/hc08/main.c,
2590         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
2591         preservation of HX
2592         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
2593         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
2594         on 2004-09-12; it was buggy
2595
2596 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
2597
2598         * src/SDCCsymt.h: removed RESULT_CHECK
2599         * src/SDCCast.c,
2600         * src/SDCCglue.c,
2601         * src/SDCCval.c,
2602         * src/pic/glue.c,
2603         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
2604
2605 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
2606
2607         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
2608         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
2609         configuration values no more rejected by compiler, they are assigned
2610         to configuration registers with a warning message instead,
2611         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
2612         the for-loop so last conf register is emitted too,
2613         * (_pic16_initPaths): link library libsdcc.lib by default,
2614         * (_hasNativeMulFor): modified test for multiplication according to
2615         Raphael Neider's remarks. Integer multiplication is also done with
2616         support functions,
2617         * device/include/pic16/pic18fregs.h: corrected type error in while
2618         testing and including 18f6720 header file
2619
2620 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
2621
2622         * src/pic16/device.h (pic16_options): removed field use_crt,
2623         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
2624         until an optimization to handle single bits is added,
2625         * (pic16_loadFSR0): moved before genUnpackBits,
2626         * (genAnd): some white lines removed,
2627         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
2628         leave_reset flags in pic16_options when using crt modules,
2629
2630 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
2631
2632         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
2633           for bugs 898889 & 979599. Also used some safer print instructions.
2634
2635 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
2636
2637         * src/pic16/device.h (pic16_options_t): added field use_crt,
2638         crt_name, no_crt,
2639         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
2640         catch a probable future bug,
2641         * src/pic16/gen.c: aopIdx function commented out,
2642         * (genAssign): commented out old code which used aopIdx,
2643         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
2644         code, added if conditionals to take into account the --use-crt
2645         command line options,
2646         * src/pic16/main.c (pic16_optionsTable): added new command line
2647         options, --use-crt= and --no-crt,
2648         * (_pic16_linkEdit): now the proper crt object is added in the
2649         linker command line except than when --no-crt is specified,
2650         * src/pic16/pcode.c,
2651         * src/pic16/pcode.h: added some structures and functions for a new
2652         optimization scheme to compansate for instruction overhead between
2653         same iCodes, this scheme is currently under development and is not
2654         working in any way,
2655         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
2656         to && operator,
2657         * device/lib/pic16/startup/crt0i.c,
2658         * device/lib/pic16/startup/crt0iz.c: added global char variable
2659         __uflags to force the generation of an idata section
2660
2661 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
2662
2663         * doc/Makefile,
2664         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
2665         * doc/sdccman.lyx: updated sdcc version to 2.4.4
2666
2667 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2668
2669         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
2670         Frieder) and clarified the default code optimization mode
2671
2672 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2673
2674         * src/SDCC.lex (doPragma, process_pragma),
2675         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
2676         "opt_code_size", and "opt_code_balanced"
2677         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
2678         regrouped options by category, added support for category headers
2679         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
2680         and "--opt-code-size"
2681         * doc/sdccman.lyx: documented these new options and pragmas
2682         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
2683         preference into account
2684
2685 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2686
2687         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
2688           geniCodePreDec): Fixed bug 904237 by generating a warning
2689         * src/SDCCerr.h,
2690         * src/SDCCerr.c: added warning W_SIZEOF_VOID
2691
2692 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
2693
2694         * src/pic/device.c : When no max ram set validate full memory range.
2695         * src/pic/pcode.c,
2696         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
2697
2698 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2699
2700         * device/lib/_gptrget.c,
2701         * device/lib/_gptrput.c: updated comment
2702         * device/lib/calloc.c,
2703         * device/lib/free.c,
2704         * device/lib/malloc.c,
2705         * device/lib/realloc.c: added LGPL, made them reentrant-safe
2706         * src/SDCCcse.c (cseBBlock),
2707         * src/SDCCicode.c (printOperand, geniCodeArray),
2708         * src/SDCCicode.h (struct operand): fixed bug 868103
2709         * support/regression/tests/bug-868103.c: added
2710         * src/SDCCast.c (searchLitOp),
2711         * src/SDCCcse.h (struct cseDef),
2712         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
2713         * src/SDCCicode.h (struct operand),
2714         * src/SDCCsymt.h (struct sym_link),
2715         * src/avr/gen.c (hasInc),
2716         * src/ds390/gen.c (hasInc),
2717         * src/hc08/gen.c (genPlusIncr, hasInc),
2718         * src/mcs51/gen.c (hasInc),
2719         * src/pic16/glue.c (pic16_printIvalChar),
2720         * src/pic16/ralloc.c (regWithIdx),
2721         * src/xa51/gen.c (hasInc) : removed warnings
2722         * src/SDCCast.c (createBlock): added comment ???
2723         * src/hc08/ralloc.c: updated comments
2724
2725 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2726
2727         * doc/sdccman.lyx: updated section on switch statements, added
2728         section about semaphore locking
2729         * doc/Makefile: added option -info for latex2html
2730         * device/lib/_gptrget.c,
2731         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
2732
2733 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
2734
2735         * src/pic/device.h,
2736         * src/pic/device.c,
2737         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
2738          maxram is less than 0x100.
2739
2740 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
2741
2742         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
2743
2744 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2745
2746         * src/port.h,
2747         * src/mcs51/main.c,
2748         * src/ds390/main.c,
2749         * src/z80/main.c,
2750         * src/hc08/main.c,
2751         * src/pic/main.c,
2752         * src/pic16/main.c,
2753         * src/avr/main.c,
2754         * src/xa51/main.c
2755         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
2756         a jump table is the best form for a switch statement, including
2757         automatic insertion of missing cases to make the case range
2758         continuous. Developed in collaboration with Frieder Ferlemann.
2759
2760 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2761
2762         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
2763         accumulator result if it needs sign extension
2764
2765 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2766
2767         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
2768
2769 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2770
2771         * device/lib/gbz80/printf.c,
2772         * device/lib/z80/printf.c: removed define for NULL
2773
2774 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2775
2776         * as/xa51/xa_link.c,
2777         * device/examples/ds390/ow390/ad26.c,
2778         * device/examples/ds390/ow390/cnt1d.c,
2779         * device/examples/ds390/ow390/counter.c,
2780         * device/examples/ds390/ow390/ds2480.h,
2781         * device/examples/ds390/ow390/ds2480ut.c,
2782         * device/examples/ds390/ow390/findtype.c,
2783         * device/examples/ds390/ow390/gethumd.c,
2784         * device/examples/ds390/ow390/owllu.c,
2785         * device/examples/ds390/ow390/ownetu.c,
2786         * device/examples/ds390/ow390/swt12.c,
2787         * device/examples/ds390/ow390/swtloop.c,
2788         * device/examples/ds390/ow390/temp.c,
2789         * device/examples/ds390/ow390/temp10.c,
2790         * device/examples/ds390/ow390/thermo21.c,
2791         * device/examples/ds390/ow390/tinilnk.c,
2792         * device/examples/ds390/ow390/tstfind.c,
2793         * device/examples/serialcomm/windows/serial.cpp,
2794         * device/examples/serialcomm/windows/test_serialcomm.cpp,
2795         * device/include/reg51.h: fixed line endings for cvs
2796
2797 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2798
2799         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
2800         packRegsForAccUse, packRegisters): new accumulator register
2801         packing algorithm
2802         * support/regression/ports/hc08/support.c (_putchar): suppress
2803         warning of unused variable
2804         * src/SDCCicode.c: added SWAP entry to codeTable
2805
2806 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
2807
2808         * device/lib/sprintf.c: forgot to add this file before previous commit
2809
2810 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
2811
2812         * src/pic16/gen.c (genPackBits): added operand right in function
2813         parameters, load result directly if p_type is POINTER (that is
2814         called by genNearPointerSet)
2815         * (genUnPackBits): added operand left in function parameters,
2816         * (genNearPointerGet, genNearPointerSet): prevent the loading of
2817         FSR0 if accessing bitfields,
2818
2819 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
2820
2821         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
2822           _print_format; updated printf, sprintf, vsprintf
2823         * device/include/asm/default/features.h: corrected comment/define
2824         * device/lib/Makefile.in: added sprintf.c
2825         * device/lib/libsdcc.lib: added sprintf module
2826         * device/lib/printf_large.c,
2827         * device/lib/vprintf.c,
2828         * device/lib/sprintf.c: totally refactored printf_large and vprintf
2829           into these 3 files
2830         * support/regression/Makefile: changed ALL_PORTS into a usefull default
2831         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
2832         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
2833           hc08 test
2834         * support/regression/tests/zeropad.c: define idata as data for hc08
2835
2836 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2837
2838         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
2839         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
2840         labels are referenced at least once (even if a reference is not found)
2841         * src/hc08/gen.c (emitcode): set isComment flag for comments
2842         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
2843         loads), rules 6a..6b (optimize jumps to return)
2844
2845 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2846
2847         * device/lib/acosf.c (acosf),
2848         * device/lib/asinf.c (asinf),
2849         * device/lib/atanf.c (atanf),
2850         * device/lib/ceilf.c (ceilf),
2851         * device/lib/cosf.c (cosf),
2852         * device/lib/coshf.c (coshf),
2853         * device/lib/cotf.c (cotf),
2854         * device/lib/fabsf.c (fabsf),
2855         * device/lib/floorf.c (floorf),
2856         * device/lib/log10f.c (log10f),
2857         * device/lib/logf.c (logf),
2858         * device/lib/sinf.c (sinf),
2859         * device/lib/sinhf.c (sinhf),
2860         * device/lib/sqrtf.c (sqrtf),
2861         * device/lib/tanf.c (tanf),
2862         * device/lib/tanhf.c (tanhf),
2863         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
2864         replaced all instances of "reentrant" in the library functions
2865         defined in math.h with this macro.
2866         * support/regression/tests/float_trans.c: reenabled test for hc08
2867
2868 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
2869
2870         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
2871         erroneously deleted
2872
2873 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2874
2875         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
2876         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
2877         multi-byte volatile operands are used
2878         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
2879         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
2880         initialization to area GSINIT0 so that it would always precede
2881         any static initializers in GSINIT
2882         * support/regression/tests/zeropad.c: fixed idata define for hc08
2883         * support/regression/tests/bug-927659.c,
2884         * support/regression/tests/float_trans.c: disabled tests for hc08
2885         pending missing library routines
2886         * .version: increased version number to 2.4.4 - hc08 port now passes
2887         regression tests
2888
2889
2890 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
2891
2892         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
2893         * Makefile.common.in,
2894         * as/Makefile,
2895         * as/hc08/Makefile.in,
2896         * as/mcs51/Makefile.in,
2897         * as/z80/Makefile.in,
2898         * debugger/mcs51/Makefile.in,
2899         * device/include/Makefile.in,
2900         * device/lib/Makefile.in,
2901         * doc/Makefile,
2902         * link/Makefile,
2903         * link/z80/Makefile.in,
2904         * packihx/Makefile.in,
2905         * sim/ucsim/main_in.mk,
2906         * sim/ucsim/avr.src/Makefile.in,
2907         * sim/ucsim/doc/Makefile.in,
2908         * sim/ucsim/gui.src/serio.src/Makefile.in,
2909         * sim/ucsim/hc08.src/Makefile.in,
2910         * sim/ucsim/s51.src/Makefile.in,
2911         * sim/ucsim/xa.src/Makefile.in,
2912         * sim/ucsim/z80.src/Makefile.in,
2913         * src/Makefile.in,
2914         * support/cpp2/Makefile.in,
2915         * support/librarian/Makefile,
2916         * support/makebin/Makefile: added DESTDIR to the install path proposed
2917         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
2918         * doc/sdccman.lyx: added DESTDIR documentation
2919
2920 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
2921
2922         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
2923         instruction for interrupt handlers, use fast returns when returning
2924         from high priority interrupts
2925
2926 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2927
2928         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
2929         code generation
2930         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
2931         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
2932         bugs, ported much of Bernhard's code from mcs51
2933         * src/mcs51/gen.c (genSend),
2934         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
2935         than one when calling a reentrant function
2936         * device/lib/_mullong.c: defined an alternate struct layout for big
2937         endian ports (hc08)
2938
2939 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2940
2941         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
2942         test
2943
2944 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2945
2946         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
2947         are sane and complete before asking the port its prefered parameter
2948         passing method (fixes bug #1017633)
2949         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
2950         and _ret3
2951
2952 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2953
2954         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
2955         problem in bitfields >= 8 bits.
2956
2957 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
2958
2959         * src/SDCCsymt.c: undid changes that were not meant to be committed
2960
2961 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
2962
2963         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
2964
2965 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
2966
2967         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
2968           copied and wrong bit got inverted
2969
2970 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2971
2972         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
2973         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
2974         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
2975         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
2976         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
2977         assignments to bitfields at known addresses
2978         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
2979         reads from bitfields at known addresses
2980         * src/hc08/ralloc.c (packRegisters),
2981         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
2982         genhc08Code): optimize pointer get values used as conditionals
2983         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
2984         and branch
2985
2986 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2987
2988         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
2989         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
2990         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
2991         as conditionals
2992
2993 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2994
2995         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
2996
2997 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2998
2999         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
3000         related problems
3001
3002 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
3003
3004         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
3005
3006 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3007
3008         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
3009         mcs51 port
3010
3011 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
3012
3013         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
3014
3015 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3016
3017         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
3018         cases use more compact code.
3019
3020 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
3021
3022         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
3023
3024 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3025
3026         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
3027
3028 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3029
3030         * src/SDCCsymt.h,
3031         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
3032         parameter of changePointer() from symbol* to sym_link*
3033         * src/SDCCast.c (decorateType): call changePointer() for CAST op
3034         * src/SDCCsymt.c (compareType): void* type is castable to other
3035         pointers, but not necesarily an exact match.
3036         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
3037         is no longer blindly treated as an exact match.
3038         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
3039
3040 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
3041
3042         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
3043
3044 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
3045
3046         * src/pic/gen.c,
3047         * src/pic/pcode.c,
3048         * src/pic/ralloc.h,
3049         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
3050
3051 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
3052
3053         * src/pic/device.c,
3054         * src/pic/device.h,
3055         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
3056
3057 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3058
3059         * src/mcs51/gen.c (emitcode): fixed bug #992819
3060
3061 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
3062
3063         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
3064           there's no need to make it worse
3065
3066 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3067
3068         * src/mcs51/ralloc.c (deassignLR),
3069         * src/ds390/ralloc.c (deassignLR),
3070         * src/hc08/ralloc.c (deassignLR),
3071         * src/z80/ralloc.c (deassignLR),
3072         * src/pic/ralloc.c (deassignLR),
3073         * src/pic16/ralloc.c (deassignLR),
3074         * src/avr/ralloc.c (deassignLR),
3075         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
3076         rlivePoint): fixed another part of bug #971834
3077
3078 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3079
3080         * src/z80/main.c: enabled "critical" keyword
3081         * src/z80/mappings.i,
3082         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
3083         functions (fixes bug #979646)
3084         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
3085
3086 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3087
3088         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
3089           such as c:\mydir.
3090
3091 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
3092
3093         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
3094           doesn't disable too much optimizations
3095
3096 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3097
3098         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
3099
3100 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
3101
3102         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
3103
3104 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
3105
3106         * src/pic/gen.c tidied up tabs
3107         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
3108         * src/pic/main.c tidied up tabs
3109         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
3110         * src/pic/pcoderegs.c tidied up tabs
3111         * src/pic/ralloc.c tidied up tabs
3112
3113 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
3114
3115         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
3116         to S_FIXED for pic16 port and when symbol is not in level 0,
3117         allocate for S_REGISTER storage class and pic16 port, too,
3118         * src/pic16/device.h: prototype for checkSym,
3119         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
3120         * (pic16_assignConfigWordValue): test the value and the mask to
3121         validate that the value is suitable for the configuration word,
3122         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
3123         collect extern declared symbols, don't emit symbol twice, check
3124         first if symbol is in publics set first,
3125         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
3126         * added command line '--fstack' which enables an experimental
3127         feature for stack access, too buggy to be used yet...
3128         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
3129         * (pic16_allocDirReg): when register has storage class S_REGISTER
3130         allocate in pic16_dynAccessRegs,
3131         * device/include/pic16/pic18f????.h: modified configuration word
3132         naming convention, words started as CONFIG0H but should be CONFIG1H
3133
3134 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3135
3136         * device/include/mcs51reg.h: fixed bug 970993
3137
3138 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
3139
3140         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
3141         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
3142         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
3143         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
3144         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
3145         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
3146           error/warning numbers,
3147           added function setWarningDisabled()
3148         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
3149         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
3150           _memcmp.c _memmove.c calloc.c realloc.c free.c
3151         * support/regression/tests/malloc.c: added tests for new functionality
3152         * support/regression/tests/zeropad.c: added tests for truncated initializers
3153           and initialized char arrays starting with '\x0'
3154         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
3155
3156 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
3157
3158         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
3159
3160 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3161
3162         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
3163         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
3164         peephole 177.e. Thanks to anonymous
3165
3166 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
3167
3168         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
3169         function isn't used in the source but referenced as a
3170         variable initializer then declare it as extern in .asm file
3171
3172 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
3173
3174         * .version: increased version number to 2.4.3
3175
3176         Adding version extension according to ChangeLog CVS revision
3177         * src/Makefile.in (target all): added dependency 'version.h'
3178         * (rule version.h): added rule to create version.h from ChangeLog,
3179         * (rule dep): added dependency version.h,
3180         * src/version.awk: AWK script to create version.h
3181         * src/SDCCdwarf2.c (dwWriteModule),
3182         * src/SDCCglue.c (initialComments),
3183         * src/SDCCmain.c (printVersionInfo): modified to write after
3184         version string the version extension number,
3185         * src/SDCCutil.c: included "version.h"
3186         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
3187         number,
3188         * src/SDCCutil.h: added prototype for getBuildNumber
3189
3190         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
3191         includeDirsSet, too,
3192         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
3193         const char [] is found in function prototype...
3194
3195         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
3196         moving to WREG with source is already in WREG,
3197         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
3198         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
3199         * (aopForSym): stack'ed symbols are partially supported, added
3200         if-clause to support symbols in FARSPACE,
3201         * (sameRegs): added test for AOP_ACC to see if registers are same,
3202         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
3203         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
3204         * (pic16_popRegFromString): will not allocate a new register if it
3205         doesn't find one by name, bug may have introduced...
3206         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
3207         * (genIpush): revived to use pic16 port's stack,
3208         * (genAddrOf): added incomplete case for stack'ed operand,
3209         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
3210         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
3211         can handle multibyte operands,
3212         * src/pic16/glue.c (pic16_printIval*): some debug info added,
3213         * (pic16initialComments): added message for MPLAB compatibility
3214         mode enabled,
3215         * src/pic16/main.h: prototype for pic16_mplab_comp,
3216         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
3217         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
3218         * (_pic16_linkEdit): NEW, handles link stage, transferred here
3219         because of increased complexity of procedure,
3220         * (_process_pragma): stack pragma changed to format 'stack pos len',
3221         emit symbol '_stack_end' to conform with gplink,
3222         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
3223         to search for register,
3224         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
3225         PO_GPR_REGISTER,
3226         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
3227         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
3228         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
3229         case for PO_GPR_REGISTER,
3230         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
3231         dies, the new era is ahead !...
3232         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
3233         pic16_dynInternalRegs,
3234         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
3235         * (pic16_allocDirReg): minor optimizations and bug fixes,
3236         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
3237
3238         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
3239         load stack and frame pointer with address of 'stack_end' symbol
3240
3241 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
3242
3243         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
3244         without source code but only variable initializers
3245
3246 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
3247
3248         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
3249         external are not declared as extern to reduce overhead while linking
3250
3251 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
3252
3253         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
3254
3255 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
3256
3257         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
3258           Yee Keat for the patch
3259         * src/SDCCast.c (decorateType): fixed bug #979599
3260         * src/ds390/gen.h: removed local fReturnSizeDS390
3261         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
3262         * src/ds390/gen.c (genAnd, genOr, genXor),
3263         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
3264
3265 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
3266
3267         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
3268         add relFilesSet to $3, manipulate $2 to handle linking of object
3269         files without source files in command line,
3270         * device/include/pic16 (all headers): added ID location macros,
3271         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
3272         entries for ID location bytes,
3273         * (pic16_assignIdByteValue): NEW,
3274         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
3275         added field dumpcalltree to pic16_options_t,
3276         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
3277         is used instead of pic16_Gstack_base_addr, check if (ifx) before
3278         emitting rFalseIfx label after check_carry label,
3279         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
3280         pic16_emitDIRegs), NEW
3281         * (pic16glue): dump .calltree file when option --calltree found,
3282         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
3283         * (_pic16_genAssemblerPreamble): emit ID locations after
3284         configuration registers,
3285         * (pic16_linkCmd): modifications of the link command,
3286         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
3287         * (pic16_pCodeInitRegisters): don't init stack registers,
3288         * (pic16_findPrevInstruction): fixed bug,
3289         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
3290         bug with immediate registers,
3291         * (buildCallTree): traces stack push and pop,
3292         * (pct2): dump also stack usage for each function,
3293         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
3294         * (pic16_allocDirReg): various modifications,
3295         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
3296         fixed to 1,
3297
3298 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
3299
3300         * src/pic16/pcode.c: removed buggy double colon
3301
3302 2004-07-01 Borut Razem <borut.razem AT siol.net>
3303
3304         * support/scripts/sdcc.nsi: added include/pic16 to setup
3305
3306 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
3307
3308         * device/lib/Makefile.in: fixed bug in target objects-pic16,
3309         * device/lib/pic16/Makefile: prefixed with dash (-) command under
3310         target 'clean',
3311         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
3312         specific command line arguments. Also added sample lkr script
3313         for placing a variable at a specific memory bank.
3314         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
3315         at a specific memory bank,
3316         * (pic16_dump_isection): fixed bug which caused string literals to
3317         be omitted when dumping idata section,
3318         * (pic16_groupRegistersInSection): added code to handle registers
3319         in specific memory banks,
3320         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
3321         public, all references are renamed too,
3322         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
3323         AOP_DPTR2,
3324         * (pic16_storeForReturn): added case to handle when dest is WREG,
3325         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
3326         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
3327         pic16_rel_udata, check to see if that register is marked as being
3328         a member of a specific memory bank,
3329         * (pic16_printIvalCharPtr): added code to add string literals either
3330         to code or the idata sections,
3331         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
3332         also accept the 'udata' pragma,
3333         * src/pic16/main.h: new structure types sectName and sectSym
3334         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
3335         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
3336         * (pic16_findPrevInstruction): fixed, it returned nothing,
3337         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
3338         instruction combinations,
3339         * (pic16_FixRegisterBanking): heavily reorganised,
3340         * (pic16_AnalyzeBanking): if generating banksel directives is
3341         disabled, then don't call FixRegisterBanking at all,
3342         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
3343         completely removed,
3344         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
3345
3346 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
3347
3348         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
3349         Phuah Yee Keat <yk.phuah AT nestac.com>
3350
3351 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3352
3353         * src/pic16/glue.c (pic16createInterruptVect): function now emits
3354         correctly the IVT even if it is relocated to some other location
3355
3356 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3357
3358         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
3359         * device/include/pic16/pic18f2220.h: NEW,
3360         * device/lib/pic16/libdev/pic18f2220.c: NEW,
3361         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
3362         * src/pic16/device.c (struct Pics16): added info for 18f2220,
3363         * src/pic16/device.h (struct pic16_options): added ivt_loc and
3364         nodefaultlibs, ivt_loc is the location of the interrupt vector
3365         table, and nodefaultlibs signs that default libraries should not be
3366         linked in link stage,
3367         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
3368         according to --ivt-loc argument,
3369         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
3370         when pragma stack is found,
3371
3372 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3373
3374         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
3375         256 (range check), 257 (do while), 258.a-f (bit banging
3376         f.e. on 3-wire SPI bus)
3377
3378 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3379
3380         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
3381         variables used exclusively within a loop
3382
3383 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
3384
3385         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
3386
3387 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3388
3389         * src/SDCClrange.c (computeClash): fixed bug #971834
3390
3391 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3392
3393         * src/mcs51/gen.c (genCmp): fixed bug #975903
3394         * src/hc08/gen.c (operandsEqu),
3395         * src/ds390/gen.c (operandsEqu),
3396         * src/z80/gen.c (operandsEqu),
3397         * src/pic/gen.c (operandsEqu),
3398         * src/pic16/gen.c (operandsEqu),
3399         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
3400         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
3401
3402 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3403
3404         * src/SDCCcse.c (cseBBlock): fixed bug #966963
3405
3406 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
3407
3408         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
3409         default case in switch statement,
3410         * glue.c (pic16_initPointer): expr is initialised via decoarteType
3411         to eliminate problem with initialisation of pointers, but problem
3412         still exists,
3413         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
3414         * (emitStaticSegment): removed various lines emitting debug info,
3415         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
3416         added processor registers for utilizing EEPROM,
3417         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
3418         configurable and set 8
3419
3420 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
3421
3422         * .version: increased version number to 2.4.2,
3423
3424         Cumulative patch for pic16 port
3425         * src/pic16/device.c: changed scheme to dump initial values for
3426         variables in idata segment, all print_idata* functions were removed,
3427         now the pic16_printIval* will be called,
3428         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
3429         * _pic16_printPointerType, pic16_printPointerType,
3430         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
3431         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
3432         NEW, similar to the respective functions in SDCCglue.c,
3433         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
3434         way, emitting hex bytes,
3435         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
3436
3437 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3438
3439         * src/avr/ralloc.c (serialRegAssign),
3440         * src/xa51/ralloc.c (serialRegAssign),
3441         * src/pic/ralloc.c (serialRegAssign),
3442         * src/pic16/ralloc.c (serialRegAssign),
3443         * src/hc08/ralloc.c (serialRegAssign),
3444         * src/z80/ralloc.c (serialRegAssign),
3445         * src/ds390/ralloc.c (serialRegAssign),
3446         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
3447
3448 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3449
3450         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
3451         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
3452
3453 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
3454
3455         Cumulative patch for pic16 port:
3456         * src/pic16/device.h (typedef PIC16_device) modified fields for
3457         defining microcontrollers,
3458         * src/pic16/device.c: added new info for all devices in Pics16 array,
3459         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
3460         to be optimised out by the pCode optimiser,
3461         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
3462         specially, bug reported by G.M. Gallant,
3463         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
3464         as force'd so that cannot be optimised out by pCode optimiser,
3465         * src/pic16/pcode.c,
3466         * src/pic16/pcodepeeph.c,
3467         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
3468         they are disabled by default, but can be enabled explicit with
3469         command argument --denable-peeps, for testing,
3470         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
3471         --pomit-ivt in COMPILE_FLAGS
3472
3473 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3474
3475         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
3476           compilation on MSVC
3477
3478 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3479
3480         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
3481
3482 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3483
3484         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
3485         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
3486
3487 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
3488
3489         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
3490         would only assign 0x300001 register.
3491
3492 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
3493
3494         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
3495         in COMPILE_FLAGS. Thanks to G. Gallant for report.
3496
3497 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3498
3499         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
3500         for ds80c400
3501         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
3502         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
3503         added peephole 254 (left shift), 255 (jump table)
3504
3505 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
3506
3507         * device/lib/Makefile.in: removed comment line with model-pic16,
3508         * (target port-specific-objects-pic16): the libraries and objects
3509         are copied to the build directory form the device/lib/pic16/bin
3510         directory
3511
3512         Cumulative patch concerning pic16 port:
3513         * library directory has been re-organized,
3514         * added support for PIC18F1220,
3515         * added headers and library sources for chips 18f1220,18f6520,
3516         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
3517
3518         * configuration registers setting has changed, now each supported
3519         device has a complete description of the registers it uses,
3520         * all initialisations are moved to idata sections, these section
3521         can be absolute or relocatable,
3522         * fixed initialisation of codespace variables,
3523         * fixed warning about PCLATU and gpsim,
3524         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
3525         * (genAssign): use table reads when assigning from variables in codespace,
3526         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
3527         char/int variables placed in codespace,
3528         * (pic16_emitConfigRegs): NEW, emits a list with configuration
3529         registers set in .asm file, no need for --pomit-config-words anymore,
3530         * (pic16glue): some 8051 legacy segments are commented out
3531         (to be removed completely),
3532         * added support for alternative assembler and linker with --asm=
3533         and --link= command line arguments,
3534         * peepholes are disabled automatically in the port, no need to
3535         specify on command line,
3536         * port supports natively char/int/long multiplication, but converts
3537         all divisions to support functions,
3538         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
3539         to the file set in variable $2,
3540         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
3541         strings in ASCII format and not in hex,
3542         * ralloc.c (serialRegAssign): added a triplet of conditional calls
3543         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
3544         allocate proper register if iCodes aren't temporary,
3545
3546 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
3547
3548         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
3549
3550 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
3551
3552         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
3553         is commented out
3554
3555 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3556
3557         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
3558         computed address is reused
3559         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
3560         multi-byte bitfields
3561
3562 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3563
3564         * src/z80/gen.c: (genArrayInit): must check for pointers too
3565
3566 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3567
3568         * support/regression/tests/zeropad.c: never meant to commit the
3569           nestedstruct test: removed, added check for GCC version
3570
3571 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
3572
3573         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
3574         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
3575         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
3576           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
3577           bugs 928906 and 954082 half-empty initializers
3578         * src/SDCCsymt.h,
3579         * src/SDCCsymt.c (getAllocSize): added for above fix
3580         * src/z80/gen.c (genArrayInit): fixed bug 741044
3581         * support/regression/tests/zeropad.c: added tests
3582
3583 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
3584
3585         * src/pic16/device.c (pic16_dump_section): corrected bug which
3586         caused some symbols of the libraries to be misplaced
3587
3588 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3589
3590         * src/pic16/glue.c,
3591         * src/pic16/ralloc.h,
3592         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
3593         to fix conflict with pic port
3594
3595 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3596
3597         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
3598         externs configuration variables,
3599         * src/pic16/ralloc.h,
3600         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
3601         prototype in header, commented out some debug messages
3602
3603 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
3604
3605         * src/pic16/glue.c,
3606         * src/pic16/main.c,
3607         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
3608         for gpasm COFF object generation. Thanks to D. Hawkins for
3609         his patch info
3610
3611 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3612
3613         * src/ds390/main.c,
3614         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
3615         Brock for spotting this)
3616         * src/ds390/gen.c (genEndFunction),
3617         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
3618         interrupt handler and critical. Disable push/pop optimizations when
3619         peephole optimizations disabled.
3620
3621 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3622
3623         Updated pic16 library sources and headers.
3624         * device/lib/pic16/pic18f*/ ,
3625         * device/include/pic16/*.h: modified to handle structured SFR
3626         definitions
3627
3628 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3629
3630         * src/port.h (PORT structure): added hook initPaths, now each
3631         port can declare its own default search paths,
3632         which can been seen with the --print-search-dirs option,
3633         see pic16 port for example,
3634         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
3635         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
3636         * (doPrintSearchDirs): NEW, replaces in a central manner the
3637         printing of search dirs which was split in set*Paths functions,
3638         * (main): added call to port->initPaths and doPrintSearchDirs,
3639         * src/avr/main.c,
3640         * src/ds390/main.c,
3641         * src/hc08/main.c,
3642         * src/izt/i186.c,
3643         * src/izt/tlcs900h.c,
3644         * src/mcs51/main.c,
3645         * src/pic/main.c,
3646         * src/pic16/main.c: modified port structures to reflect addition of
3647         initPaths hook,
3648
3649         * src/pic16/device.c (regCompare): registers are finally sorted by name,
3650         * (pic16_dump_section): for registers in same address reserve memory once,
3651         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
3652         to no_banksel,
3653         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
3654         result is greater in size than right or left,
3655         * (pic16_genUMult8X8_8): there are some cases where the result can
3656         be 16 bits size, so handle these,
3657         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
3658         * (pic16_outBitC): modified to emit pcodes,
3659         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
3660         or not,
3661         * (genDivOneByte): implemented algorithm to divide 8-bits,
3662         * (genCmp): uncommented goto, but issues still exist,
3663         * (genAnd): fixed a bug with variables >8bits,
3664         * (genPackBits): optimization added that uses BCF/BSF to change a
3665         single bit,
3666         * (genAssign): fixed bug when assigning floating point literals,
3667         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
3668         __sdcc_gsinit_startup label,
3669         * src/pic16/main.c (_pic16_init): removed search directory
3670         initialisations,
3671         * (_pic16_initPaths): NEW, used to initialise search directories,
3672         * (_hasNativeMulFor): support functions for all except char/int
3673         multiplication, and char division,
3674         * (PIC16_port struct): modified entry for native mul support,
3675         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
3676         no_banksel option,
3677         * (buildCallTree): call to register_usage is ifdef'ed out,
3678
3679 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3680
3681         * device/include/string.h: applied Stas Sergeev's patch to make this
3682         header file compatible with the preprocessor -Wundef option
3683         * src/SDCCmain.c (main): abort compilation if preprocessor reports
3684         failure (fixes bug #941458)
3685
3686 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3687
3688         * src/SDCCopt.c (killDeadCode): fixed bug #907733
3689         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
3690         that the variable, not the function, should be static
3691         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
3692         to be consistent with non-literal case
3693
3694 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3695
3696         * src/SDCCast.c (isConformingBody): fixed bug #949967
3697         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
3698         convilong): fixed bug #952086
3699
3700 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3701
3702         * src/SDCCmem.c (allocVariables): fixed bug #955321
3703
3704 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3705
3706         * src/hc08/main.c (_hc08_genAssemblerEnd),
3707         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
3708         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
3709         completely eliminated the use of a temporary file
3710         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
3711         when more than one file linked
3712         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
3713
3714 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3715
3716         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
3717         which fixes bug #543481
3718         * support/regression/tests/bug-751703.c: fixed comments left from a
3719         cut and paste error
3720         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
3721         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
3722         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
3723         scopes
3724         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
3725         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
3726         are now changed to underscores in moduleName
3727
3728 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3729
3730         * as/mcs51/lkmem.c: better fix for bug #954173
3731
3732 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
3733         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3734
3735         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
3736         * device/include/c8051f000.h,
3737         * device/include/c8051f120.h,
3738         * device/include/c8051f300.h,
3739         * device/include/c8051f310.h,
3740         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
3741         PWM16) and detab'ed
3742
3743 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3744
3745         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
3746         and mailing lists, doc'ed --no-peep-comments, removed reference
3747         to knoppix (newest version has no LyX/LaTeX), other minor changes
3748         * src/SDCCglue.c (glue): save 2 bytes stack space with
3749         option --main-return. The ljmp could probably be avoided too
3750
3751 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3752
3753         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
3754
3755 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3756
3757         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
3758         * src/SDCCopt.c (isLocalWithoutDef),
3759         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
3760         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
3761         (credit to Maarten Brock for patch #949363, on which this is based)
3762         * support/regression/tests/bug-751703.c: some test cases of extern used
3763         within inner scopes.
3764
3765 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3766
3767         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
3768         SPEC_STRUCT
3769         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
3770         struct definitions
3771         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
3772         dwWriteLabel): fix to create valid debugger symbols even when
3773         the module name has non-alphanumeric symbols in it
3774         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
3775         when a variable's allocation has been optimized away
3776
3777
3778 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3779
3780         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
3781         * src/hc08/main.c,
3782         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
3783         * src/mcs51/main.c,
3784         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
3785         * src/ds390/main.c,
3786         * src/z80/gen.c (z80_emitDebuggerSymbol),
3787         * src/z80/main.c,
3788         * src/pic/gen.c (pic14_emitDebuggerSymbol),
3789         * src/pic/main.c,
3790         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
3791         * src/pic16/main.c,
3792         * src/avr/gen.c (avr_emitDebuggerSymbol),
3793         * src/avr/main.c,
3794         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
3795         * src/xa51/main.c,
3796         * src/SDCCdebug.c (emitDebuggerSymbol),
3797         * src/SDCCdebug.h,
3798         * src/port.h: added a debugger struct to the port struct. Added a
3799         callback for defining debugger symbols
3800
3801         * src/SDCCast.c (createLabel),
3802         * src/SDCC.y (labeled_statement): mark all compiler generated labels
3803         with isitmp = 1
3804         * src/SDCCicode.h,
3805         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
3806         iCode back to the ast for the function
3807
3808         * src/hc08/ralloc.c (hc08_assignRegisters),
3809         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
3810         unneeded fields from the regs struct.
3811         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
3812         pushReg() & pullReg() functions instead of emitcode()
3813
3814         * src/hc08/gen.c (genLabel, genhc08Code),
3815         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
3816
3817         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
3818         debugger hooks
3819
3820         * src/hc08/gen.c (genEndFunction, genhc08Code),
3821         * src/hc08/gen.h,
3822         * src/mcs51/gen.c (genEndFunction, gen51Code),
3823         * src/mcs51/gen.h,
3824         * src/ds390/gen.c (genEndFunction, gen390Code),
3825         * src/ds390/gen.h,
3826         * src/z80/gen.c (genEndFunction, genZ80Code),
3827         * src/z80/gen.h,
3828         * src/z80/z80.h,
3829         * src/pic/gen.c (genEndFunction, genpic14Code),
3830         * src/pic/gen.h,
3831         * src/pic16/gen.c (genEndFunction, genpic16Code),
3832         * src/pic16/gen.h,
3833         * src/avr/gen.c (genEndFunction, genAVRCode),
3834         * src/avr/gen.h,
3835         * src/xa51/gen.c (genEndFunction, genXA51Code),
3836         * src/xa51/gen.h,
3837         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
3838         specific code to cdbFile.c and out of the backend code generators
3839
3840         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
3841         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
3842         starting address is now 0
3843
3844         * as/hc08/asm.h,
3845         * as/hc08/m08pst.c,
3846         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
3847         assembler directive for DWARF support
3848         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
3849
3850         * src/src.dsp,
3851         * src/Makefile.in,
3852         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
3853
3854 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3855
3856         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
3857         and inappropriate peephole optimization in jump tables
3858
3859 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3860
3861         * as/hc08/m08pst.c,
3862         * src/SDCCglue.c: sdccopt works for the hc08 port now
3863
3864 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
3865
3866         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
3867
3868 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3869
3870         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
3871
3872 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3873
3874         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
3875         rules
3876         * src/SDCCmain.c,
3877         * src/SDCCglobl.h,
3878         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
3879         comments from the peephole optimizer replacement rules
3880         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
3881         symbols
3882         * src/SDCCcse.c (updateSpillLocation),
3883         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
3884         equivalents
3885         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
3886         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
3887         objects far pointers
3888
3889 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3890
3891         * src/SDCCsymt.h: a missing part of my last change
3892         * src/pic/ralloc.c (regTypeNum),
3893         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
3894
3895 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3896
3897         * src/SDCCicode.h,
3898         * src/SDCCicode.c (aggrToPtrDclType),
3899         * src/SDCCptropt.h,
3900         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
3901         ptrPseudoSymConvert),
3902         * src/pic/ralloc.c (regTypeNum),
3903         * src/pic16/ralloc.c (regTypeNum),
3904         * src/hc08/ralloc.c (regTypeNum),
3905         * src/ds390/ralloc.c (regTypeNum),
3906         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
3907         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
3908
3909 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3910
3911         * link/z80/lkmain.c (afile),
3912         * as/hc08/lkmain.c (afile),
3913         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
3914         prevent a pointer problem when a filename has no directory and
3915         no extension specified.
3916
3917 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3918
3919         * link/z80/lkmain.c (afile): allow periods in directory names
3920         * link/z80/lkmain.c (afile),
3921         * as/mcs51/lkmain.c (afile),
3922         * as/hc08/lkmain.c (afile): allow linker script file to have an
3923         extension other than ".lnk"
3924         * link/z80/lklex.c (getfid),
3925         * link/z80/lkmain.c (parse),
3926         * as/mcs51/lklex.c (getfid),
3927         * as/mcs51/lkmain.c (parse),
3928         * as/hc08/lklex.c (getfid),
3929         * as/hc08/lkmain.c (parse): Support comments in the linker script
3930         file on lines by themselves and after filenames
3931
3932 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3933
3934         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
3935
3936 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3937
3938         * src/z80/peeph-z80.def: removed some peephole rules that don't
3939         work with multibyte arithmetic (fixed bug #937126)
3940         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
3941         to registers and not global variables
3942         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
3943         geniCodePreInc, geniCodePostDec, geniCodePreDec,
3944         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
3945         checking for assignments not internally generated (fixed bug #931895)
3946         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
3947         structure member (fixed bug #930072)
3948
3949 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3950
3951         * src/SDCCmain.c (linkEdit),
3952         * src/hc08/main.c (_hc08_parseOptions),
3953         * as/hc08/Makefile.in,
3954         * as/hc08/aslink.h,
3955         * as/hc08/asm.h,
3956         * as/hc08/m08pst.c,
3957         * as/hc08/lkrloc.c (relr, rele),
3958         * as/hc08/lkarea.c (lnkarea)
3959         * as/hc08/lkmain.c (afile, parse),
3960         * as/hc08/lkelf.c: support for ELF output
3961         * as/hc08/lks19.c (s19),
3962         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
3963
3964 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3965
3966         * as/mcs51/lkihx.c: Fixed bug #899105.
3967
3968 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3969
3970         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
3971         .dsp files from Unix to DOS.
3972
3973 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3974
3975         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
3976         function pointers; we have been compliant for several months now.
3977         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
3978         change that was accidently commented out
3979         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
3980         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
3981         bug #922319
3982
3983 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3984
3985         * src/hc08/gen.c: output of all of the internal debugging information
3986         is now controlled by the D() macro; it is disabled by default
3987
3988 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3989
3990         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
3991         harder to keep the same registers during a CAST iCode
3992         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
3993         long via int can be done in a single cast, if the signedness is
3994         correct.
3995         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
3996         putchar() in tinibios.c in ds390's library
3997
3998 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
3999
4000         * src/SDCCast.c (decorateType): fixed bug #898889,
4001         cast result of a literal complement too
4002         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
4003         fixed check for bitfields
4004
4005 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
4006
4007         * src/SDCCicode.c (geniCodeLogic): made it static,
4008         (geniCodeLogicAndOr): added in order to fix bug #905492,
4009         (ast2iCode): fixed bug #905492
4010         * support/regression/tests/bug-905492.c: added
4011         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
4012         (processParms): fixed bug #927659: don't copy parms, this will clear
4013         decorated flag
4014         * support/regression/tests/bug-927659.c: added
4015
4016 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
4017
4018         * src/SDCCast.c (addCast): don't cast float to char
4019         * device/lib/libsdcc.lib: added _memmove
4020
4021 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
4022
4023         * device/lib/large/Makefile: fixed parallel execution by
4024         replacing `make` by `$(MAKE)`
4025
4026 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4027
4028         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
4029         offsets (fixes bug #923936)
4030
4031 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
4032
4033         * device/lib/small/Makefile: fixed parallel execution by
4034         replacing `make` by `$(MAKE)`
4035
4036 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4037
4038         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
4039
4040 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
4041
4042         * src/pic/gen.c (genCpl): multi-byte complements were not working.
4043         * src/regression/Makefile: Regression test was not running.
4044
4045 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
4046
4047         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
4048         complement if possible
4049         * src/SDCCval.c (valComplement),
4050         * src/SDCCicode.c (operandOperation): fixed complement of literal
4051         * support/regression/tests/onebyte.c (testComplement): added
4052
4053 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
4054
4055         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
4056         return an optimized tree; actually replace actParm with the new tree
4057         * src/SDCCast.h: added some parantheses to remove side effects
4058         * support/regression/tests/bug-920866.c
4059
4060 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
4061         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
4062         Bit operands were not being handled properly in the pic14 port.
4063         (now src/regression/add.c passes again).
4064
4065 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4066
4067         * src/SDCC.y (labeled_statement): case and default no longer require
4068         a following statement (RFE #893037)
4069
4070 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4071
4072         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
4073         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
4074         disabled (fixes bug #916294)
4075         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
4076         "mov a,acc"; patch provided by Lenny Story
4077         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
4078
4079 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4080
4081         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
4082         functions
4083         * src/ds390/gen.c (genFunction, genEndFunction),
4084         * src/ds390/ralloc.c (ds390_assignRegisters),
4085         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
4086         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
4087         pushed if there are parameters passed on the stack. Also, a cleaner
4088         way to decide if r0/r1 should be pushed/popped. (Together they fix
4089         bug #918693)
4090
4091 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4092
4093         * doc/sdccman.lyx,
4094         * device/lib/mcs51/crtpagesfr.asm,
4095         * device/lib/mcs51/crtxinit.asm,
4096         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
4097         to avoid confusion with Si Lab's SFRPAGE register.
4098
4099 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4100
4101         * src/SDCCglue.c (emitMaps): allow public sfr variables
4102         * src/SDCCglue.c (initialComments): include compiler build date
4103         with compiler version and put the timestamp of the generated
4104         assembly file on a serperate line to be less confusing.
4105         * src/port.h: added genInitStartup hook
4106         * src/avr/main.c,
4107         * src/ds390/main.c,
4108         * src/hc08/main.c,
4109         * src/pic/main.c,
4110         * src/pic16/main.c,
4111         * src/xa51/main.c,
4112         * src/z80/main.c: genInitStartup initialize as NULL (default to
4113         historical behaviour)
4114         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
4115         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
4116         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
4117         library instead of hard coding it into the compiler.
4118         * support/regression/ports/mcs51-stack-auto/spec.mk,
4119         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
4120         * device/lib/mcs51/Makefile,
4121         * device/lib/small/Makefile,
4122         * device/lib/large/Makefile,
4123         * device/lib/mcs51/crtpagesfr.asm,
4124         * device/lib/mcs51/crtstart.asm,
4125         * device/lib/mcs51/crtxclear.asm,
4126         * device/lib/mcs51/crtxinit.asm,
4127         * device/lib/mcs51/crtclear.asm,
4128         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
4129         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
4130         and into user configurable files.
4131         * device/lib/clean.mk: clean mcs51 directory too
4132         * support/regression/tests/longlit.c: added static to T1 declaration
4133         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
4134         accesses in the initialization code
4135
4136 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4137
4138         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
4139         OSCTRIMVAL as noted in bug #916008
4140
4141 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4142
4143         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
4144         in loops with multiple exits (reported as incorrect registers
4145         used by Martin Helmling in Sdcc-user list)
4146
4147 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4148
4149         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
4150         made ds390 register extensions look less like error messages
4151
4152 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4153
4154         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
4155         reported by Adam Wozniak in Sdcc-user list
4156
4157 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
4158
4159         * src/SDCCast.c (decorateType): fixed with bug and promotion in
4160         arithmetic optimizations, added debug output
4161
4162 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
4163
4164         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
4165         * sdcc.spec: updated and split sdcc into 3 rpms
4166         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
4167         needed for literals of LEFT_OP and '+'
4168         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
4169         introduced RESULT_TYPE_NOPROM
4170         (geniCodeMultiply): fixed logic for decision if mul is optimized to
4171         left shift
4172         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
4173         limited promotion to int only for '*'
4174         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
4175
4176 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
4177
4178         * src/pic16/gen.c (genSkip),
4179         (genc16bit2lit), (gencjneshort): commented out
4180         (is_LitOp): new helper function, checks operand type
4181         (genCmpEq): rewritten
4182
4183 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
4184
4185         * support/regression/tests/bug-908454.c: added
4186
4187 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
4188
4189         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
4190         * src/SDCCicode.c (usualBinaryConversions): op needs int type
4191         (geniCodeCast): cosmetic, don't preserve bit storage class
4192         (geniCodeLeftShift): added promotion
4193         (geniCodeLogic): fixed regression
4194         * src/SDCCsymt.c (computeTypeOr): accept bits too
4195         (compareType): 2nd part of fix for bug #908454, needed for bitfields
4196
4197 2004-03-07  Borut Razem <borut.razem AT siol.net>
4198
4199         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
4200
4201 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
4202
4203         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
4204         version of pic16_genPackRegisters which does not check if ic is a
4205         CAST operator,
4206         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
4207         function cause string1.c regression test fails
4208
4209 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
4210
4211         * sim/ucsim/configure.in,
4212         * sim/ucsim/configure,
4213         * sim/ucsim/doc/Makefile.in: use docdir
4214         * src/SDCC.y: fixed sbit atrributes
4215         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
4216         * src/SDCCast.c (decorateType): |^& need special promotion handling
4217         * src/SDCCast.h,
4218         * src/SDCCsymt.h: moved definition of RESULT_TYPE
4219         * src/SDCCsymt.h (computeType),
4220         * src/SDCCicode.c: computeType() needs op
4221         * src/SDCCsymt.c (checkTypeSanity),
4222         * doc/sddman.lyx: "plain" bitfields are unsigned
4223         * src/SDCCsymt.c (computeTypeOr): added
4224         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
4225         |^& ops
4226         * src/SDCCval.c (val*): computeType() needs op
4227         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
4228         * support/regression/tests/onebyte.c: added tests for |^&
4229
4230 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
4231
4232         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
4233         for writing icode into asm output.
4234
4235 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
4236
4237         * src/pic16/device.c: added some debug lines enabled
4238         with macro DEBUG_CHECK,
4239         * src/pic16/genarith.c: more debug in genPlus,
4240         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
4241         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
4242         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
4243         * (aopForSym): onStack symbols are re-placed in data memspace,
4244         and onStack flag is cleared,
4245         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
4246         copy temporary pcodeop,
4247         * (genPcall): added warning for not updating PCLATU,
4248         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
4249         always true for pic16 port,
4250         * (genMultOneWord): NEW, supports integer multiplication,
4251         * (genMult): modified to call genMultOneWord,
4252         * (ifxForOp): added warning when return NULL,
4253         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
4254         flag is set before call to operandFromSymbol for implicit
4255         added structures,
4256         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
4257         options.intlong_rent are set by default,
4258         * (_hasNativeMulFor): modified to allow port generation of integer
4259         multiplication,
4260         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
4261         set regtype to REG_SFR for all registers, restricting seting the
4262         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
4263
4264 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4265
4266         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
4267         more than 500 times in the regression tests
4268
4269 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4270
4271         * support/Util/SDCCerr.h,
4272         * support/Util/SDCCerr.c,
4273         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4274         enumerator_list),
4275         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
4276         for symbol conflicts.
4277         * support/valdiags/tests/enum.c,
4278         * support/valdiags/tests/tentdecl.c,
4279         * support/valdiags/tests/struct.c: expect possible error messages
4280         referring to original symbol definitions.
4281         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
4282         * src/SDCCsymt.h,
4283         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
4284
4285 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
4286
4287         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
4288
4289 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
4290
4291         * src/pic16/ralloc.c (newReg): fixed bug #908929
4292
4293 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4294
4295         * src/ds390/gen.c: added missing #include "main.h"
4296
4297 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
4298
4299         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
4300         checking if symbol is already in set,
4301         * src/pic16/device.h: prototype for checkAddSym,
4302         * src/pic16/gen.c: (_G): added entry interruptvector,
4303         * (assignResultValue): removed some commented out lines,
4304         * (genFunction): check for ISR via sym->type, absolute section for
4305         interrupt code is created via a new pBlock, the goto instruction is
4306         placed now correctly at the interrupt vector position, changed all
4307         references from ivec to _G.interruptvector,
4308         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
4309         is the interrupt is a high priority one, same for return from ISR,
4310         * src/pic16/glue.c: changed all calls of addSetHead for publics and
4311         externs to calls of checkAddSym,
4312         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
4313         pic16_pcode_verbose flag is set,
4314         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
4315         * src/pic16/pcoderegs.c: message about how many registers are saved
4316         will only be emitted if pic16_pcode_verbose flag is set,
4317
4318 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4319
4320         * src/ds390/ralloc.h,
4321         * src/ds390/ralloc.c (ds390_regWithIdx),
4322         * src/ds390/gen.c (emitcode),
4323         * src/ds390/main.h,
4324         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
4325         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4326         ds390operandCompare, getRegsRead, getRegsWritten,
4327         initializeAsmLineNode): customized instruction size calculation for
4328         ds390, started basis for some register optimizations
4329         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
4330         corresponding assembly output
4331         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
4332         missing push/pop of r0/r1. Optimized push/pops
4333
4334 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4335
4336         * src/mcs51/main.c (instructionSize): fixed ACALL size
4337         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
4338
4339 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
4340
4341         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
4342         the sorting of rlist with NULL elements
4343         * (print_idataType, print_idata): NEW to create idata sections
4344         * src/pic16/device.h: idataSymSet new variable
4345         * src/pic16/gen.c (genFunction): fixed some bugs in string
4346         comparing, improved the absolute section creation for ISRs,
4347         added FSR0L/FSR0H in registers that are saved in an ISR,
4348         * (genInline): fixed the processing of inline snippets,
4349         now they undergo no process by the peephole optimizer
4350         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
4351         are placed in idataSymSet,
4352         * (pic16emitStaticSeg): extern symbols are added in externs,
4353         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
4354         switching when aboslute variables are placed in access bank memory
4355         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
4356         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
4357         commented out with #if,
4358         * (pic16_packRegisters): reintroduce the check for CAST because some
4359         symbols are not correctly handled,
4360         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
4361         pCodeInstruction instead of pCode,
4362         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
4363         pCodeAsmDir definition,
4364         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
4365         directive, then the argument directive is emitted without the leading
4366         tab, hack for inline labels which must be in the first column,
4367         * (compareLabel,pic16_findNextInstruction),
4368         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
4369         * (insertBankSwitch): modified for the new pCodeAsmDir,
4370
4371 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4372         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
4373
4374         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
4375         instance,
4376         * (pushSide): commented out with #if,
4377         * (assignResultValue): fixed some typos in saving
4378         registers,
4379         * (genPcall): FIXED and sync'ed with genCall,
4380         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
4381         * (genNearPointerGet): fixed to handle some more cases,
4382         implementation scheme via table reads,
4383         * (genConstPointerGet): modified to access code memory correct,
4384         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
4385         and improved to handle some cases
4386         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
4387         instead of "RETLW" for init data
4388         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
4389         not IN_DIRSPACE, work around to reduce bank switching when aboslute
4390         variables are placed in access bank memory (<0x80 and >=0xf80),
4391         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
4392         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
4393         TBLWT_POSTDEC,TBLWT_PREINC
4394         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
4395         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
4396         directives
4397         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
4398         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
4399         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
4400         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
4401
4402 2004-02-29  Borut Razem <borut.razem AT siol.net>
4403
4404         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
4405         support/Util/findme.h, support/Util/system.h: enhance binary relative
4406         search for lib and include by using findProgramPath()
4407
4408 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4409
4410         * src/SDCCpeeph.h,
4411         * src/SDCCpeeph.c (pcDistance),
4412         * src/port.h,
4413         * src/mcs51/ralloc.h,
4414         * src/mcs51/ralloc.c (mcs51_regWithIdx),
4415         * src/mcs51/main.h,
4416         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
4417         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4418         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
4419         size calculation port specific, started basis for some register
4420         optimizations
4421         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
4422         missing push/pop of r0/r1. Optimized push/pops
4423         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
4424         * device/lib/_modsint.c (_modsint),
4425         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
4426         and stack version so regression tests pass
4427
4428 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
4429
4430         * src/Makefile.in (dep): include SLIBOBJS in dependency check
4431         * src/SDCCast.c (decorateType): catch another small optimization
4432         with '?' operator
4433         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
4434         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
4435         modified to finally use computeType() all over SDCC,
4436         see Feature Request #877103
4437         * src/SDCCval.h: cosmetic
4438         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
4439         valCompare(); regression tested in muldiv.c
4440         * support/regression/tests/muldiv.c (testMod): mod sign follows
4441         dividend only
4442
4443 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
4444
4445         * src/SDCCast.c (decorateType): fixed bug #902362
4446         * doc/INSTALL.txt: fixed install instructions for win32
4447
4448 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
4449
4450         * device/include/Makefile.in (install): fixed by replacing spaces
4451         by tabs
4452         * doc/README.txt,
4453         * doc/INSTALL.txt: updated for release
4454         * doc/sdccman.lyx: added warning for --xstack being buggy
4455
4456 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
4457
4458         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
4459         to eliminate build warnings.
4460         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
4461
4462 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
4463            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4464
4465         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
4466         removed -penable-stack, added comment for stack pragma, added
4467         warning for not initializing the stack/frame registers, removed
4468         comment at interrupts section
4469
4470         Stack is made permanent, there is no ability to disable stack usage.
4471         * src/pic16/device.h,
4472         * src/pic16/device.c: removed all references to USE_STACK macro,
4473         * src/pic16/device.c (pic16_dump_section): when no elements in
4474         rlist, free rlist before return,
4475         * (pic16_dump_int_registers): NEW, internal registers are a new set
4476         of general purpose registers reused by each function,
4477         * (checkAddReg): returns 1 if registers is added to set,
4478         * (pic16_groupRegistersInSection): when a registers is of type
4479         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
4480         * src/pic16/device.h: memRange and Assigned Memory are deleted,
4481         SRCASECMP macro is moved here from device.c
4482         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
4483         PO_PCLATU, PO_PRODL, PO_PRODH,
4484         * (pic16_pCodeOpType, genMinus,
4485         changed compares to "a" register, with AOP_ACC,
4486         * (pic16_genPlus): fixed some bugs and indented properly,
4487         * (pic16_addSign): changed size to size+offset in the MOVWF
4488         instruction,
4489         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
4490         multiply 8-bit operand by literal, result is 8-bit,
4491         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
4492         multiply 2 8-bit operand, result is 8-bit,
4493         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
4494         genUMult8X*_16,
4495         * src/pic16/gen.c: changed accUse to contain WREG only,
4496         * (pic16_emitcomment): renamed to pic16_emitpcomment,
4497         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
4498         true, do not use immediate addressing any more unless sym is a
4499         pointer in codespace,
4500         * (aopForRemat): do not use immediate addressing when symbol not in
4501         codespace and when symbol's address is requested,
4502         * (aopOp): for-loop in if(sym->accUse) is modified for the new
4503         accUse size (= 1),
4504         * (aopGet): added case for AOP_ACC and don't return "accumulator
4505         bug" but WREG instead,
4506         * (popGetTempReg): pushes contents of temporary register in stack,
4507         * (popReleaseTempReg): pops contents of temporary register from
4508         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
4509         * (pic16_popGet): separated case AOP_ACC to return register WREG
4510         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
4511         or PO_IMMEDIATE and initializes their instance/offset appropriately,
4512         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
4513         the use of immediate pointers to certain cases only.
4514
4515         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
4516         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
4517         * (assignResultValue, genCall, genRet): modified to use the new
4518         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
4519         genPcall is still broken,
4520         * (genFunction): added code to create 'A' type pBlocks when
4521         interrupt functions are generated, code not extensively tested yet,
4522         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
4523         * (genEndFunction): modified so ISRs pop stored registers from stack,
4524         * (genMultOneByte): cleanup,
4525         * (AccRsh): added flag andmask, to and result with appropriate mask,
4526         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
4527         * (genDataPointerGet): fixed and reenabled its use,
4528         * (genNearDataPointerGet): bugs fixed,
4529         * (genDataPointerSet): bugs fixed,
4530         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
4531         pic16_DumpSymbol, pic16_DumpOp,
4532         * src/pic16/genutils.h: function prototypes for the above functions,
4533         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
4534         pointers,
4535         * (pic16emitRegularMap): many many many improvements, but needs a
4536         major cleanup,
4537         * src/pic16/main.c: enable_stack in pic16_options is removed,
4538         * (_pic16_parseOptions): removed command line options -penable-stack,
4539         * (_process_pragma): emit stack symbol only when stack pragma is
4540         processed,
4541         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
4542         redirected to FSR0L/FSR0H pair,
4543         * (pic16_get_op, pic16_get_op2): modifications and improvements,
4544         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4545         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
4546         for immediates,
4547         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
4548         * (dumpPicOptype): NEW,
4549         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
4550         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
4551         with movff instruction,
4552         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
4553         added pic16_int_regs, some packRegsFor* functions are commented out,
4554         because produce errors,
4555         * src/pic16/NOTES: minor modifications
4556
4557 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4558
4559         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
4560         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
4561         --pack-iram.
4562         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
4563         * as/mcs51/lkaomf51.c: fixed bug #895763
4564
4565 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
4566
4567         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
4568
4569 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4570
4571         * doc/sdccman.lyx: added details about the HC08 storage classes and
4572         interrupts, fixed the register usage info for z80 & gbz80
4573
4574 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
4575
4576         * doc/sdccman.lyx: added more pic16 port documentation
4577         * device/include/pic16/: added header pic18fregs.h
4578
4579 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
4580
4581         * doc/sdccman.lyx: added Vangelis' contribution
4582
4583 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4584
4585         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
4586         extend to the next CALL or PCALL, not just to the next CALL.
4587
4588 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
4589
4590         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
4591
4592 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4593
4594         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
4595         bug #895752 and a better fix for bug #716790
4596
4597 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4598
4599         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
4600
4601 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4602
4603         * doc/sdccman.lyx: minor changes, minor changed
4604
4605 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
4606
4607         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
4608         which can't handle SDCC_NEWONEBYTEOPS,
4609         (geniCodeMultiply): removed conversion from mult to shift for pic14
4610         and pic16
4611
4612 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4613
4614         * src/hc08/gen.h,
4615         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
4616         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
4617         thus fixing bug #895406
4618
4619 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
4620
4621         * device/lib/_modsint.c,
4622         * device/lib/_modslong.c: sign follows divisor only
4623         * src/hc08/gen.c (genMultOneByte): if result size is 1,
4624         signs or signedness can be ignored
4625         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
4626         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
4627         added optimization for IFX,
4628         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
4629         arguments;
4630         reenabled optimization for IFX, which was removed on 2004-01-11
4631         * src/SDCCast.h: added return type IFX
4632         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
4633         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
4634         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
4635         SDCC_OLDONEBYTEOPS selects the old behaviour
4636         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
4637         changed again and commented promotion rule
4638         * src/SDCCval.c (valDiv): promotion no longer necessary
4639         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
4640         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
4641         rewritten
4642         * support/regression/tests/onebyte.c: added
4643
4644 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
4645
4646         * gen.c (genInline): reverted to old code for assemnling inline
4647         code because of bug reported James Chadd
4648
4649 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
4650
4651         * ralloc.h: missing declarations from previous patch,
4652         seems that patch for ralloc.h was never applied, fixed
4653
4654 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4655            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
4656
4657         * pcode.c,
4658         * pcode.h,
4659         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
4660         indirect addressing. Marked FSR0 as deprecated
4661         * gen.c (pointerCode): commented out, not needed now
4662         (pic16_popGet2p): new MOVFF helper function
4663         (genGenPointerGet),
4664         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
4665         (shiftRLong): removed duplicate debugging info
4666
4667 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4668
4669         * src/ds390/gen.c (genNearPointerGet),
4670         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
4671         optimization with bits, but not bitfields.
4672         * src/ds390/ralloc.c (packRegisters),
4673         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
4674
4675 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
4676
4677         * src/SDCCcse.c (algebraicOpts): copy operands before modification
4678
4679 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4680
4681         * src/SDCCsymt.h,
4682         * src/SDCCicode.c (operandFromSymbol),
4683         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
4684         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
4685         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
4686         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
4687         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
4688         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
4689         bug #892038
4690         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
4691         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
4692         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
4693         * src/SDCCsymt.c (newSymbol),
4694         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4695         enumerator_list),
4696         * src/SDCCval.h,
4697         * src/SDCCval.c (newiList): fixed bug #885705
4698
4699 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4700
4701         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
4702         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
4703
4704 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4705
4706         * device/include/c8051f120.h,
4707         * device/include/c8051f300.h,
4708         * device/include/c8051f310.h: added/updated header files for Silicon
4709         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
4710         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
4711         in new section Submitting patches
4712
4713 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4714
4715         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
4716         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4717         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4718         genGenPointerSet),
4719         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
4720         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4721         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4722         genGenPointerSet),
4723         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
4724         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4725         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4726         genGenPointerSet),
4727         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
4728         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4729         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4730         genGenPointerSet): fixed bug #892400
4731         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
4732         to eliminate build warnings.
4733         * src/SDCCast.c (processParms),
4734         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
4735         fixed bug 751859
4736         * support/valdiag/valdiag.py: added GCC to the list of defines active
4737         when compiling with gcc
4738
4739 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4740
4741         * support/Util/SDCCerr.h,
4742         * support/Util/SDCCerr.c,
4743         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
4744         with an incomplete type (fixed bug #883734)
4745         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
4746
4747 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4748
4749         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
4750
4751 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4752
4753         * src/SDCCast.c (decorateType),
4754         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
4755         function pointer implementation
4756         * support/regression/tests/funptrs.c: added tests to verify both forms
4757         of function pointers work correctly. Added tests to verify parameters
4758         are passed in the correct order.
4759
4760 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
4761
4762         * device.c (regCompare): registers are sorted by ascending
4763         address and increasing size,
4764         * main.c (_pic16_finaliseOptions): removed the declaration
4765         of compiler macro MCU. Now a macro of the format pic18fxxxx
4766         will be defined from the command line
4767
4768 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4769             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
4770
4771         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
4772         PCOP_RLCF was overwritten!
4773         * gen.c (genSkip): commented out calls to pic16_emitcode,
4774         * (genCmpEQ): fixed "long" compares, only high word did get compared,
4775         * (genlshTwo),
4776         * (genRRC): added debugging info,
4777         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
4778         overwritten while shifting,
4779         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
4780         overwritten while shifting,
4781         * (AccLsh),
4782         * (AccRsh),
4783         * (shiftLLeftOrResult),
4784         * (shiftRLeftOrResult),
4785         * (shiftRLong),
4786         * (shiftLLong): Implemented with pic16_emitpcode
4787         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
4788         * (genLeftShift): Fixed bug, operand for shift by variable always
4789         was "and"ed with 0x0f,
4790         * (genLeftShiftLiteral),
4791         * (genrshTwo),
4792         * (genRightShiftLiteral): added debugging info,
4793         * (genrshFour): added comment,
4794         * (genRightShift): determined signedness from operand "left"
4795         instead of "result"
4796
4797 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4798
4799         * src/SDCCicode.c (geniCodeParms),
4800         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
4801         function pointers, fixed function pointer bugs #861242 and #861896
4802
4803 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4804
4805         * device/include/c8051f000.h,
4806         * device/include/c8051f120.h,
4807         * device/include/c8051f300.h: added header files for Silicon
4808         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
4809
4810 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
4811
4812         * src/SDCCast.c (processParams): added new type flow and restructured
4813         (gatherAutoInit): added new type flow
4814         (addCast): cosmetic changes
4815         (getLeftResultType): added new type flow for array indices, patch
4816         provided by Stas, see FR #877103
4817         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
4818         array index patch by Stas
4819         * src/SDCCast.h: added prototype getResultTypeFromType()
4820         * src/SDCCval.h,
4821         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
4822         * src/pic/glue.c (pic14emitStaticSeg),
4823         * src/pic16/glue.c (pic16emitStaticSeg),
4824         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
4825         for initialization of symbols
4826         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
4827         * support/Util/SDCCerr.h:
4828         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
4829         * .version: bumped version number to 2.3.8
4830         * device/include/Makefile.in (install),
4831         * doc/Makefile (install): changed to 'rm `find ...`' construct to
4832         avoid warnings
4833
4834 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
4835
4836         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
4837         Slade Rich fixed an optimization bug
4838         * src/pic/pcodepeep.c,
4839         * src/pic/pcoderegs.c
4840         * doc/Makefile (install): added test for directory
4841
4842 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4843
4844         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
4845         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
4846         * src/pic/ralloc.c (getRegPtr, getRegGpr),
4847         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
4848         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
4849         * as/mcs51/asexpr.c (term),
4850         * as/hc08/asexpr.c (term): fixed bug #887146
4851
4852 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4853
4854         * src/z80/gen.c (genMult): handle single byte result product
4855         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
4856         DUMMY_READ_VOLATILE (fixed bug #886367)
4857
4858 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
4859
4860         * support/regression/tests/libmullong.c: fixed logic, on little endian
4861         hosts we ended without a mullong_wrapper()
4862
4863 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4864
4865         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
4866         virus/worm forged address usage.
4867
4868 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
4869
4870         Fixed promotion, it should be done on AST level:
4871         * src/SDCCast.c (addCast): added promotion to int
4872         (decorateType): updated call to upCast()
4873         * src/SDCCicode.c (geniCodeLeftShift): removed call to
4874         usualUnaryConversions()
4875
4876 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
4877
4878         * support/regression/tests/literalop.c (mulWrapper): Added a
4879         wrapper to remove integer overflow warnings.
4880
4881         * support/regression/tests/float_trans.c: Made work on host.
4882
4883         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
4884         location of sz80.
4885
4886         * support/regression/generate-cases.py (main): Changed from inline
4887         to a main method.
4888
4889         * doc/Makefile (install): Changed to depth first to get rid of
4890         missing directory install warning.
4891
4892         * as/Makefile (install-doc): Made work on Mac.
4893
4894 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
4895
4896         * src/SDCCast.c: added an additional type flow in decorateType() of
4897         opposite direction, see feature request #860006; it's enabled at runtime
4898         by setting the environment variable SDCC_NEWTYPEFLOW
4899         * src/SDCCast.h: changed prototype of decorateType()
4900         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
4901         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
4902         'char' to 'int' can be omitted, if both operands are 'unsigned char';
4903         see feature request #877103
4904         * src/SDCCval.c: updated call of decorateType()
4905         (valBitwise): fixed bug #882876
4906         (valMinus): added promotion
4907         (valLogicAndOr): result is unsigned
4908         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
4909         * src/SDCCsymt.c (computeType),
4910         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
4911         must not cause an unsigned operation
4912         * src/pic/glue (pic14emitRegularMap),
4913         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
4914
4915 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
4916
4917         * src/pic/pcode.c (PCodeID): commented out left over debug code
4918
4919 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
4920
4921         * support/valdiag/tests/overflow.c: added shift tests
4922         * src/pic/device.c,
4923         * src/pic/gen.c,
4924         * src/pic/gen.h,
4925         * src/pic/glue.c,
4926         * src/pic/main.c,
4927         * src/pic/pcode.c,
4928         * src/pic/pcode.h,
4929         * src/pic/pcodepeep.c,
4930         * src/pic/pcoderegs.c,
4931         * src/pic/ralloc.c,
4932         * src/pic/ralloc.h: applied patch from Slade Rich;
4933         added support for multiple code pages and multiple RAM banks on the
4934         PIC 14 port. The ASM files now no longer simply assume all the
4935         code / RAM are in the same page / bank. This means the linker can
4936         safely allocate code/RAM of separate ASM files to different pages/banks.
4937         * doc/sdccman.lyx: added Slade's tips
4938         * src/mcs51/peeph.def: fixed bug #880768
4939
4940 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4941
4942         * src/hc08/ralloc.c (rematStr): fixed bug #879282
4943         * src/SDCCast.c (decorateType): fixed bug #880197
4944
4945 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
4946
4947         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
4948         getopt.h.
4949
4950         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
4951         strtof is not part of C89 and isn't included with Mac OS X.
4952
4953 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4954
4955         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
4956         shiftL2Left2Result): fixed bug #879326
4957         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
4958         (genMultOneByte): fixed bug in signed vs unsigned multiplication
4959         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
4960         address fetch for clr instruction
4961         * device/lib/hc08/_mulint.c: created optimized assembly version
4962         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
4963
4964 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
4965
4966         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
4967         proposed in FR #877103
4968
4969 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
4970
4971         * src/SDCCval.c (cheapestVal): added missing checks
4972         * src/SDCCicode.c (usualBinaryConversions): fixed condition
4973         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
4974
4975 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
4976
4977         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
4978         equal operands
4979
4980 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
4981
4982         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
4983         loaded with the linker search paths (-L arguments) and the libraries
4984         to be linked with the current source (-l arguments). Changes
4985         currently will affect only the pic16 port.
4986         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
4987         include path the port specific paths and port specific libraries,
4988         * gplink command now contains the $3 argument,
4989         * src/pic16/device.h,
4990         * src/pic16/device.c,: structure PIC_device is made public and
4991         renamed to PIC16_device, the same for variable Pics which is renamed
4992         to Pics16. Updated all references to them.
4993         * src/pic16/glue.c (pic16glue): corrected bug with code
4994         initialization which bypassed the variable initializations block.
4995
4996         * device/lib/pic16/Makefile.rules: removed --penable-stack from
4997         COMPILE_FLAGS and added the --nostdinc option
4998
4999 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5000
5001         * device/include/mc68hc908jb8.h: Register defs for another member
5002         of the hc08 family. Contributed by Bjorn Bringert - thanks!
5003
5004 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
5005
5006         Documenting changes from previous commits.
5007         * configure.in (version 1.56),
5008         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
5009         when generating output files to configure the pic16 library,
5010         but now I've commented it out, since gputils aren't installed in the
5011         SF compile farm, so library won't compile
5012
5013         * device/lib/Makefile.in (version 1.56): initially I've added in
5014         target 'all' the prerequestive 'model-pic16' so it compiled the
5015         pic16 library, but now I've commented it out for the same reasons
5016         above,
5017         * added targets 'model-pic16' and 'objects-pic16' to compile the
5018         library
5019         * added target 'port-specific-objects-pic16' to handle the
5020         generated libraries and copy them into the build/ directory
5021         * added target 'clean-intermediate-pic16' to clean intermediate
5022         files into pic16 directory
5023         * in target 'installdirs' added line to create directory pic16 in
5024         the installation path
5025
5026         * device/include/Makefile.in (version 1.11): in target 'install'
5027         added lines to copy all header files to installation path,
5028         * in target 'installdirs' added line create directory for pic16
5029         headers in the installation path
5030
5031 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
5032
5033         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
5034          a function call
5035
5036 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
5037
5038         * configure,
5039         * device/lib/configure.in,
5040         * device/lib/configure: fixed for autoconf 2.57
5041
5042 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5043
5044         * src/z80/main.c (_parseOptions): fixed the portmode= command line
5045         option so that it actually works. Made it specific to the z80, since
5046         the gbz80 doesn't have these kinds of I/O ports.
5047
5048 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5049
5050         * device/include/z180.h,
5051         * device/lib/_memcpy.c,
5052         * device/lib/_memmove.c,
5053         * device/lib/_mulint.c,
5054         * device/lib/ser_ir.c,
5055         * device/lib/ser_ir_cts_rts.c,
5056         * device/lib/_strcmp.c,
5057         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
5058         * src/z80/main.c (_process_pragma): add support for pragmas bank and
5059         portmode; added deprecation warning for bank= and protmode= forms.
5060         Also, guard against buffer overflow.
5061         * src/z80/gen.c (aopGet): generate better code for sfr banked read
5062
5063 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5064
5065         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
5066         changed interrupt vector table generation to only emit declared vectors.
5067         * device/include/Makefile.in: added missing backslash
5068         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
5069
5070 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5071
5072         Mainly changes to support compilation of the device libraries
5073         * src/pic16/device.c: stack is allocated via symbol and not
5074         via literal number. The symbol is placed in the corresponding
5075         position of the data ram
5076         * (pic16_dump_section): relocatable and absolute uninitialized
5077         data are now emitted in sorted order to reduce section naming,
5078         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
5079         weren't marked as being in the access bank,
5080
5081 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
5082
5083         Added portion of GNU PIC Library under the directory
5084         device/include/pic16 and device/lib/pic16. These files
5085         contain the declarations of SFRs for the PIC18Fxx2 devices.
5086         The directory is initialized via configure from toplevel.
5087
5088 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
5089
5090         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
5091         the spilllocations to be compared correctly
5092
5093 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5094
5095         * src/SDCCast.c (decorateType): fixed bug introduced today
5096
5097 2004-01-12  Borut Razem <borut.razem AT siol.net>
5098
5099         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
5100         doc/sdccman.lyx: upper case pragmas are deprecated
5101
5102 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
5103
5104         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
5105         in simpler and even better code
5106
5107 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
5108
5109         * src/SDCCicode.c (operandOperation): fixed bug #874819
5110         * src/SDCCast.c (decorateType): fixed
5111         char foo (unsigned long ul) { return ul > 0; }
5112
5113 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5114
5115         * doc/sdccman.lyx: Moved and added some sections, small changes
5116         all over. Telling LaTeX to be less strict with word spacing
5117         to better keep the right margin. Changed some notes about
5118         maintainance of the ports in section 3.2.1 - is it OK like this?
5119
5120 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
5121
5122         SDCC source changes:
5123         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
5124         convilong): modified to inform the pic16 port that builtin functions
5125         are external
5126
5127         PIC16 PORT specific changes:
5128         * src/pic16/device.c pic16_dump_equates() added,
5129         processor registers declared internally by the port are emitted in
5130         the translation as equates,
5131         * src/pic16/gen.c: inline code is passed unprocessed to the
5132         translation,
5133         * (pic16_popGetLit2): fnuction modified to take second operand as
5134         pCodeOp pointer and not as literal,
5135         * (popRegFromIdx): prefixed with pic16_,
5136         * (pic16_popCombine2): modified to receive already allocated pCode
5137         operands,
5138         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
5139         * (genFunction): initializes local stack frame and pushes on stack
5140         all the registers used by this function,
5141         * (genEndFunction): restores all registers from stack and restores
5142         stack frame,
5143         * src/pic16/glue.c (pic16emitRegularMap): various changes and
5144         improvements,
5145         * (pic16glue): changed the program startup sequence,
5146         * added new dbName code 'A' for functions placed in absolute section
5147         * src/pic16/main.c: added function attribute _naked,
5148         * added pragma 'code' to place a fnuction at an absolute address,
5149         * added command line arguments --debug-ralloc and --pcode-verbose,
5150         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
5151         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
5152         * (pic16_newpCodeOpLit2): modified to take the second operand as
5153         pCodeOp pointer,
5154         * (pic16_printpBlock): modified to emit each function in a separate
5155         section,
5156         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
5157         UPPER for immediate operands,
5158         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
5159         instruction,
5160         * src/pic16/peeph.def: all peepholes with movff are commented out,
5161         because there is a problem in the pcode peep optimizer,
5162         * src/pic16/ralloc.c: the register allocator can now reuse local
5163         function symbols for another function. This saves register usage.
5164         * src/pic16/ralloc.h: added flag isLocal in structure regs,
5165
5166         Added file src/pic16/NOTES with information about program writing on
5167         the current port version.
5168
5169 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5170
5171         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
5172         and peephole 252 (array access)
5173
5174 2004-01-09  Borut Razem <borut.razem AT siol.net>
5175
5176         * src/SDCCmain.c : fixed #872250: -l command line defined library
5177           files are scanned before standard library files
5178
5179 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5180
5181         * src/SDCCast.c (decorateType): fixed bug #874046
5182
5183 2004-01-09  Borut Razem <borut.razem AT siol.net>
5184
5185         * support/scripts/sdcc.nsi: remove previous installation
5186
5187 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5188
5189         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
5190         bytes for last interrupt vector (mcs51)
5191         * sdcc.spec: fixed typo
5192
5193 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5194
5195         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
5196         gen51Code): more efficient parameter receive for --model-large
5197         ("bug" #845294)
5198
5199 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5200
5201         * src/ds390/main.c,
5202         * src/z80/main.c: added missed needLinkerScript flags (more than
5203         one port structure defined in these file)
5204         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
5205         bug #795325
5206
5207 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
5208
5209         * src/SDCCmain.c: removed various references to DEFAULT_PORT
5210         * src/port.h: added flag needLinkerScript in port->linker
5211         structure to inform whether to create a .lnk file or not,
5212         * src/avr/main.c,
5213         * src/ds390/main.c,
5214         * src/hc08/main.c,
5215         * src/mcs51/main.c,
5216         * src/pic/main.c,
5217         * src/pic16/main.c,
5218         * src/xa51/main.c,
5219         * src/z80/main.c: changed appropriately to configure
5220         needLinkerScript flag
5221         * src/pic/gen.c,
5222         * src/pic16/gen.c (genAddrOf): fixed bug #863624
5223         * src/pic/glue.c: added variable udata_section_name to
5224         override default uninitialized data segment definition for
5225         devices only with SHAREBANK memory (reported from Erik Epetrich)
5226         * (pic14emitOverlay): modified to emit a commented overlay segment
5227         directive when no overlay data exist
5228         * (picglue): modified to emit uninitialized data segment
5229         according to udata_section_name
5230         * src/pic/main.c (_pic14_parseOptions): added command line
5231         options --udata-section-name=[name] to override default
5232         udata definition name
5233         * modified _linkCmd and _asmCmd to include compiler passed
5234         arguments via -W option
5235         * src/pic16/main.c: added $l in _asmCmd, changed extension for
5236         object file from '.rel' to '.o' in port->linker structure,
5237         changed size of fptr from 2 to 3 in port structure
5238
5239 2004-01-07  Borut Razem <borut.razem AT siol.net>
5240
5241         * support/scripts/sdcc.nsi: update PATH
5242         * support/scripts/sdcc.ico: craeted
5243
5244 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
5245
5246         * device/include/Makefile.in: fix install
5247         * doc/Makefile: fix install
5248
5249 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5250
5251         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
5252         in bug #860505
5253         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
5254         how the function variable allocation summary is displayed; also
5255         include information about variables allocated to the overlay
5256         segment
5257
5258 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5259
5260         * as/mcs51/lkmain.c: Help about -Y option
5261         * as/mcs51/lkarea.c: Fixed gcc warnings
5262
5263 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5264
5265         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
5266         fixed warning
5267         * support/valdiag/tests/overflow.c: added
5268         * src/SDCCast.c (decorateType),
5269         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
5270         LEFT_OP (left shift)
5271
5272 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5273
5274         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
5275         (default behaviour).
5276
5277 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5278
5279         A python script to validate compiler diagnostic messages. It can be
5280         used to verify that sdcc complains about bad c source code and
5281         gives a good location of the error.
5282         * support/valdiag/Makefile,
5283         * support/valdiag/valdiag.py,
5284         * support/valdiag/tests/*
5285
5286 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5287
5288         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
5289         * src/SDCCsymt.c (newEnumType),
5290         * src/SDCCsymt.h
5291         * support/Util/SDCCerr.c,
5292         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
5293         enum related bugs.
5294         * support/regression/tests/enum.c: added test for enum values that
5295         require at least 2 bytes of storage.
5296
5297 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5298
5299         * src/common.h: added ifndef/define/endif macros
5300         around the header file.
5301         Bug reported from Jesus Calvino-Fraga
5302
5303 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5304
5305         * sdcc.spec: updated
5306         * device/include/Makefile.in: don't install CVS directories
5307         * device/lib/Makefile.in: added removal of CVS directories after install
5308         * doc/Makefile: fixed install, added local_icons
5309         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
5310         * src/mcs51/gen.c (genRightShift): fixed bug #870788
5311         * src/ds390/gen.c (genRightShift): fixed bug #870788
5312         * src/SDCCast.c (decorateType): fixed bug #870781
5313
5314 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5315
5316         PIC16 port related changes:
5317         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
5318         added variable stackPos,
5319
5320         * gen.c: genCall, assignResultValue: added support for
5321         pushing/retrieving function parameters to/from stack,
5322         genFunction,genEndFunction: setup stack frame for the
5323         generated function,
5324         genAddrOf: will be changed according to bug 863624
5325
5326         * added files genutils.c and genutils.h which contain gen*
5327         debugged and optimised functions extracted from gen.c
5328
5329         * glue.c: added variable 'externs' which holds extern symbols,
5330         pic16emitRegularMap: is modified to properly handle relocatable
5331          symbols under the new scheme,
5332         pic16createInterruptVect: is modified
5333         pic16printPublics: is modified to emit 'global' assembler directives,
5334         added pic16_printExterns to print extern symbols,
5335         pic16glue: initializes stack/frame pointer in the beginning of
5336         the assembly output. Temporary hack, will be corrected later,
5337         because gplink yet does not support stack and SDCC does not
5338         yet support a type of crt0.o object to create the final binary.
5339
5340         * Removed many lines that contain 8051 legacy code.
5341         * The code is finally placed under a 'code' directive.
5342         * Added port specific options.
5343
5344         * _process_pragma: simplified since now we do not need *special*
5345         include file to define SFR registers. But a separate header
5346         will be needed. This will be developed later.
5347         * _pic16_parseOptions: added, parses port specific options:
5348         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
5349         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
5350         --preplace-udata-with=
5351
5352         * _pic16_setDefaultOptions: modified to initialize section names,
5353         but hack is temporarly out of order since it needs improvement.
5354         * _pic16_genAssemblerPreamble: configuration words are emitted by
5355         their address instead of their name. This part is incomplete and
5356         supports only the 18Fxx2 devices. Other devices will emit an error
5357         during assembly since they do not contain the same set of config
5358         registers
5359         * _pic16_genIVT: is modified,
5360
5361         * pcode.c: added definitions for some hardware registers that are needed
5362         for stack support
5363         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
5364         All PCI entries are updated. Now LFSR is supported.
5365         * Removed pic16_pciTRIS is mentioned by mdubuc in source
5366         * added pic16_newpCodeOpLit2 to support instructions with
5367         two literal arguments
5368         * pic16_pCode2str: corrected code that emits assembler instructions
5369         with two literal operands and those that have an access bit modifier
5370         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
5371         this fixes a bug which caused some labels to be lost, when an
5372         assembler directive was added, i.e. banksel,
5373         * pic16_FixRegisterBanking: improved logic that causes the insertion
5374         of bank switching,
5375         * InlineFunction: functions that are called once, are not any more
5376         inlined. This can be a port option in the future,
5377
5378         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
5379
5380         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
5381         hold the corresponding uninitialized symbols,
5382         * pic16_allocProcessorRegister: registers have explicit marked the
5383         accessBank field,
5384         * pic16_allocInternalRegister: registers are explicit marked as
5385         not used,
5386         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
5387         processing list, so bit registers were lost,
5388         *
5389
5390         * ralloc.h: added field 'accessBank' and original symbol operand
5391         in register definition,
5392         * removed the field isMapped from register definition,
5393
5394         ** Several functions have been removed from various sources:
5395         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
5396         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
5397         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
5398         pic16_assignRelocatableRegisters
5399
5400         ** others have been introduced:
5401         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
5402         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
5403
5404 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
5405
5406         * support/scripts/inc2h.pl: changed definition of BIT_AT
5407         to emit 'sbit at' instead of 'bit at'. This was a request.
5408
5409         PIC16 port related preliminary changes:
5410         * gen.c: prefixed function popRegFromString with
5411         pic16_ and all references to it corrected
5412         * pcode.c: all pic16_pc_* hardware registers prefixed
5413         with underscore (_),
5414         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
5415         * ralloc.c: newReg(): when register is REG_SFR then
5416         set address to rIdx,
5417         pic16_allocProcessorRegister(): marks register wasUsed=0
5418         pic16_writeUsedRegs(): added a call to assign processor
5419         registers via pic16_assignFixedRegisters
5420
5421 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5422
5423         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
5424         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
5425         variables in unused register banks.  Also the SSEG is placed
5426         wherever there is enough space for it, and IDATA can be anywhere
5427         in internal RAM.  For now compile using -Wl-Y[stack_size].
5428         The mem file is different for this option as well, since it
5429         makes no sense of talking about DSEG lenght.
5430
5431 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
5432
5433         * src/SDCClrange.c: fixed bug 869095 that caused segfault
5434         in certain cases, e.g. when ROM assignment, patch provided
5435         from Albert den Haan.
5436
5437 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
5438
5439         Many signedness and type propagation fixes:
5440         * src/SDCCicode.c: made geniCodeCast() static
5441         replaced SPEC_ by IS_ (cosmetic)
5442         (operandOperation): fixed div and mod operation
5443         (usualBinaryConversions): added support for promotion of char
5444         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
5445         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
5446         (geniCodeAdd): an array index will stay unsigned, even if promoted
5447         from char to int
5448         (geniCodeArray): ditto
5449         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
5450         * src/SDCCsymt.c (computeType): added more support for char;
5451         promotion of char is selectable by promoteCharToInt, fixed signedness
5452         for all cases
5453         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5454         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5455         * src/SDCCval (val*): replaced signedness calculation by
5456         computeType()
5457         rearranged if-branches (cosmetic)
5458         (valShift): added warning W_SHIFT_CHANGED
5459         (valCompare): fixed problem with different types
5460         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
5461         * support/regression/tests/literalop.c: added many cases
5462         * support/regression/tests/ast_constant_folding.c: changed finally to
5463         'unsigned int'
5464         * .version: new year, new version: 2.3.7
5465         * src/SDCCmain.c (main): applied patch #866468
5466         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
5467         provided by Scott Bronson
5468         * doc/sdccman.lyx: updated documentation for sdcdb
5469         updated and added chapter tips
5470
5471 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5472
5473         * src/SDCCsymt.h: missing from yesterday's commits
5474
5475 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5476
5477         * src/SDCC.y (struct_or_union_specifier),
5478         * support/Util/SDCCerr.c,
5479         * support/Util/SDCCerr.h: verify that struct & union tags are used
5480         as declared.
5481
5482 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5483
5484         * src/SDCCglobl.h: missing from yesterday's commits
5485
5486 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5487
5488         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
5489         sft_attributes, struct_declaration, parameter_declaration,
5490         type_name, start_block, declaration_list),
5491         * src/SDCC.lex (check_type): support redefinition of typedef names
5492
5493 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5494
5495         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
5496         aligned xdata arrays. Erik helped me with the if clause.
5497
5498 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5499
5500         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
5501         warning
5502
5503 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5504
5505         * src/SDCCast.h,
5506         * src/SDCCast.c (newAst_),
5507         * src/SDCCicode.h,
5508         * src/SDCCicode.c (ast2iCode, newiCode),
5509         * src/SDCCglobl.h,
5510         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
5511         expr, statement, expression_statement, selection_statement,
5512         iteration_statement, expr_opt, jump_statement): foundation for tracking
5513         sequence points
5514         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
5515         point code too)
5516
5517 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5518
5519         * support/Util/SDCCerr.c,
5520         * src/SDCCast.h,
5521         * src/SDCCast.c (createCase, createDefault, decorateType),
5522         * src/SDCClabel.c (labelUnreach),
5523         * src/SDCC.y (labeled_statement, jump_statement): More improvements
5524         to error messages.
5525         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
5526         (with thanks to Stas Sergeev)
5527         * device/include/time.h,
5528         * device/lib/time.c (CheckTime): suppress unreachable code warning
5529
5530 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5531
5532         * src/SDCCast.c (createIvalCharPtr),
5533         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
5534         bug #753752)
5535         * support/regression/tests/nullstring.c: tests for these two bugs
5536
5537 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5538
5539         * support/Util/SDCCerr.h,
5540         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
5541         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
5542         about storage class and 'at' used inside struct or union
5543         * src/SDCCBBlock.c (iCodeFromeBBlock),
5544         * src/SDCCcse.c (ifxOptimize),
5545         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
5546         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
5547         printIval, emitStaticSeg, emitOverlay),
5548         * src/SDCClabel.c (deleteIfx),
5549         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
5550         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
5551         gatherAutoInit, processParms),
5552         * support/Util/SDCCerr.h,
5553         * support/Util/SDCCerr.c (werrorfl): Support for better error location
5554         reporting for post-parse errors.
5555
5556 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5557
5558         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
5559         implicit casts via union; they don't work on big endian systems
5560         (possible fix for bug #861138)
5561
5562 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5563
5564         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
5565         * src/mcs51/main.c: fixed the fix for bug #737001
5566
5567 2003-12-15  Borut Razem <borut.razem AT siol.net>
5568
5569         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
5570
5571 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5572
5573         * support/makebin/makebin.c: put output in binary mode
5574
5575 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5576
5577         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
5578         xdata and data memory on startup. Set the environment variable
5579         SDCC_NOGENRAMCLEAR to disable this.
5580         * src/mcs51/peephole.def,
5581         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
5582         (allows non-interrupt and interrupt code to safely compete for a resource
5583         without the non-interrupt code having to disable interrupts)
5584
5585 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5586
5587         * src/SDCCicode.c (geniCodeAdd),
5588         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
5589         with valFromType if type might be a pointer and host is big endian).
5590         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
5591         types, not just integer types.
5592         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
5593         multiply defined with mismatching "at" address.
5594
5595 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5596
5597         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
5598         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
5599         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
5600         with embedded nulls (fixed bug #753752)
5601
5602 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5603
5604         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
5605         Apparently this did not see much testing (endless loop)
5606
5607 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5608
5609         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
5610
5611 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5612
5613         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
5614         gracefully handle NULL memmap pointers
5615
5616 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5617
5618         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
5619         instead of deleting the iCode when an operand is volatile
5620         * src/z80/gen.c (genDummyRead),
5621         * src/mcs51/gen.c (genDummyRead),
5622         * src/ds390/gen.c (genDummyRead),
5623         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
5624         not just IC_RIGHT
5625         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
5626         * src/SDCC.y: fixed bug #850420
5627
5628 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5629
5630         Applied z80 i/o port patch from Peter Townson and fixed some operators
5631         to better handle operands in A register.
5632         * device/include/z180.h
5633         * src/SDCC.y
5634         * src/SDCCglue.c
5635         * src/z80/gen.c
5636         * src/z80/gen.h
5637         * src/z80/main.c
5638         * src/z80/peeph-z80.def
5639         * src/z80/peeph.def
5640         * src/z80/z80.h
5641
5642 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5643
5644         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
5645
5646 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5647
5648         * device/lib/hc08/_mullong.c: Removed extra #endif
5649
5650 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5651
5652         * sim/ucsim/hc08.src/inst.cc,
5653         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
5654         carries from x to h
5655         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
5656         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
5657         * device/include/stdarg.h: fixed varargs for hc08
5658         * device/lib/Makefile.in,
5659         * device/lib/hc08/Makefile,
5660         * device/lib/hc08/_mulint.c,
5661         * device/lib/hc08/_mullong.c: fixed some endian problems
5662
5663 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5664
5665         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
5666         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
5667         * device/lib/_gptrget.c,
5668         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
5669
5670 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5671
5672         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
5673         * src/SDCCast.c (astErrors): fixed bug #846007
5674         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
5675
5676 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5677
5678         * src/SDCCast.c (decorateType): disabled a transformation I added in
5679         revision 1.188 (access to fields of a structure at an absolute address);
5680         it breaks with bitfields, extern declarations, and gcse analysis.
5681         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
5682         could be assigned through a pointer, so don't complain.
5683         * src/SDCCast.c (astErrors),
5684         * src/SDCCast.h,
5685         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
5686
5687 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
5688
5689         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
5690         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
5691         output of __config directives, since gpasm now supports them
5692         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
5693         pre-processor macro, i.e. -DMCU=p18f452
5694         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
5695         and modified to handle 'cast' icode similarly to '=' icode
5696         * src/pic16/device.h (typedef struct PIC_device): added field
5697         'extMIface' to indicate that chip has external memory interface
5698         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
5699         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
5700         18F8720
5701
5702 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5703
5704         * src/SDCC.y (pointer): fixed bug #846006
5705         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
5706         * src/SDCCast.c (decorateType): fixed bug #846009
5707         * src/ds390/peeph.def,
5708         * src/ds390/gen.c (genAnd, genOr),
5709         * src/mcs51/peeph.def,
5710         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
5711
5712 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5713
5714         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
5715         * src/SDCCdflow.c
5716         * src/SDCCcse.c
5717         * src/SDCCcse.h
5718         * src/SDCCBBlock.h
5719         * src/SDCCBBlock.c
5720
5721 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
5722
5723         fixed bug #845089
5724         * src/SDCCbitv.h,
5725         * src/SDCCbitv.c: added function to free a bitvector
5726         * src/SDCClrange.h,
5727         * src/SDCClrange.c: added function to recompute the liveranges
5728         * src/avr/ralloc.c,
5729         * src/ds390/ralloc.c,
5730         * src/hc08/ralloc.c,
5731         * src/mcs51/ralloc.c,
5732         * src/pic/ralloc.c,
5733         * src/pic16/ralloc.c,
5734         * src/xa51/ralloc.c,
5735         * src/z80/ralloc.c: recompute the liveranges after register packing
5736
5737 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
5738
5739         * src/SDCCloop.c (newInduction): fixed bug #845630
5740
5741 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5742
5743         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
5744         inadvertantly left behind from my 2003-11-12 change
5745
5746 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5747
5748         Updated headers I neglected to commit yesterday.
5749         * src/SDCClrange.h,
5750         * src/SDCCicode.h
5751
5752 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5753
5754         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
5755         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
5756         * src/SDCCopt.c (eBBlockFromiCode),
5757         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
5758         the creation of the key hash table from the sequencing so it can be used
5759         earlier (for some GCSE bug fixes still pending)
5760
5761 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5762
5763         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
5764         * support/regression/tests/addsub.c: testing genPlus shortcut
5765
5766 2003-11-15  Borut Razem <borut.razem AT siol.net>
5767
5768         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
5769
5770 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5771
5772         * src/SDCCcse.c (cseBBlock): fixed bug #527779
5773         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
5774         ordering is immaterial.
5775         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
5776
5777 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5778
5779         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
5780         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
5781         (SIGSEV) of bug #840381
5782         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
5783         unlink new file before rename if new and old filenames are the same)
5784
5785 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5786
5787         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
5788         uninitialized variables) for the mcs51. Set environment variable
5789         SDCC_GENRAMCLEAR to test.
5790         xdata initialization slightly shorter
5791
5792 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5793
5794         * src/SDCCsymt.h,
5795         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
5796         #838241 & 780691 (basicly the same bug)
5797         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
5798         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
5799
5800 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
5801
5802         * src/SDCCmain.c (linkEdit): "fix" #834252
5803
5804 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5805
5806         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
5807         * src/SDCCast.h,
5808         * src/SDCC.y: fixed bug #819403
5809
5810 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5811
5812         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
5813         the reentrant attribute.
5814         * src/hc08/gen.c (genPackBits): added missing stack readjustment
5815         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
5816         simulation
5817         * src/SDCCast.c (decorateType): fixed bug with storage class not being
5818         updated during pointer dereference; f.e. ~(((char *)1)*) was being
5819         erroneously reduced to a literal.
5820         * src/hc08/ralloc.c (packRegisters, rematStr),
5821         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
5822         some cases
5823
5824 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5825
5826         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
5827         * doc/sdccman.lyx: changed from 'article' to 'book'
5828         * doc/Makefile: readded test_suite_spec and cdbfileformat
5829
5830 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
5831
5832         * device/include/stdlib.h: include malloc.h to comply with ANSI
5833         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
5834
5835 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5836
5837         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
5838         * doc/clean.mk: also remove *.out files
5839         * doc/sdccman.lyx: some additions, larger top/bottom margins
5840
5841 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5842
5843         * src/SDCC.y: fixed bug #837365
5844         * support/regression/tests/bitopcse.c
5845         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
5846         a symbol (might be valop instead)
5847         * device/lib/Makefile.in: added errno.c to HC08SOURCES
5848         * device/lib/clean.mk: added hc08 to the cleaning list
5849
5850 2003-11-04  Borut Razem <borut.razem AT siol.net>
5851
5852         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
5853           made 2003-11-04
5854         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
5855           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
5856           malloc is declared in standard stdlib.h
5857
5858 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5859
5860         * device/lib/hc08/Makefile: need to clean .rel not .o files
5861         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
5862
5863 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5864
5865         * src/port.h,
5866         * src/hc08/main.c,
5867         * src/mcs51/main.c,
5868         * src/ds390/main.c,
5869         * src/z80/main.c,
5870         * src/avr/main.c,
5871         * src/pic/main.c,
5872         * src/pic16/main.c,
5873         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
5874         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
5875         tests (which uses the port's oclsExpense function)
5876         * src/SDCC.y,
5877         * src/SDCCast.c,
5878         * src/SDCCicode.c,
5879         * src/hc08/gen.c,
5880         * src/ds390/gen.c,
5881         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
5882
5883 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5884
5885         * src/SDCCcse.c (ifxOptimize),
5886         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
5887         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
5888         deleting the IFX iCode.
5889         * src/hc08/ralloc.c: reduced unneeded slocs
5890         * src/hc08/gen.c: fixed bug in asmopToBoolean
5891
5892 2003-11-04  Borut Razem <borut.razem AT siol.net>
5893
5894         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
5895           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
5896           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
5897           transferred to configure
5898
5899 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
5900
5901         Use headers defined in the C[++] standards:
5902         * sim/ucsim/gui.src/serio.src/fileio.cc
5903         * sim/ucsim/gui.src/serio.src/frontend.cc
5904         * sim/ucsim/gui.src/serio.src/main.cc
5905         * sim/ucsim/gui.src/serio.src/posix_signal.cc
5906         * support/Util/NewAlloc.c
5907         * as/hc08/lklibr.c
5908         * as/mcs51/lklibr.c
5909         * as/z80/aslist.c
5910         * as/z80/assym.c
5911
5912 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5913
5914         * Added MSVC projects for hc08 assembler and linker:
5915         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
5916         /as/hc08/link_hc08.dsp
5917
5918 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
5919
5920         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
5921
5922 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
5923
5924         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
5925
5926 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5927
5928         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
5929
5930 2003-10-31  Borut Razem <borut.razem AT siol.net>
5931
5932         * support/cpp2/cpplib.h,
5933           support/cpp2/cpplib.c,
5934           support/cpp2/cpplex.c,
5935           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
5936           to switch _asm block preprocessing on / off. Default is
5937           #pragma preproc_asm +
5938
5939 2003-10-31  Borut Razem <borut.razem AT siol.net>
5940
5941         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
5942           when outputting comment blocks (when executed with -C option) and
5943           _asm (SDCPP specific) blocks
5944
5945 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5946
5947         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
5948
5949 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
5950
5951         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
5952
5953 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
5954
5955         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
5956         * src/SDCCast.c (decorateType): fixed bug #832664
5957
5958 2003-10-31  Borut Razem <borut.razem AT siol.net>
5959
5960         * support\cpp2\cpplex.c: fixed for SDCPP:
5961           comments(when executed with -C option) and _asm blocks
5962           were included even if they where in skipped #if block.
5963           Applied solution from GCC cpp 3.3.2
5964
5965 2003-10-31  Borut Razem <borut.razem AT siol.net>
5966
5967         * src/SDCC.lex: sdcc now understands both formats:
5968           '# <line_number> <file_name>' and
5969           '#line <line_number> <file_name>'
5970         * support/cpp2/cppmain.c: sdcpp now generates the standard
5971           '# <line_number> <file_name>' instead of former
5972           '#line <line_number> <file_name>'
5973
5974 2003-10-30  Borut Razem <borut.razem AT siol.net>
5975
5976         * support/cpp2/cpphash.h,
5977         * support/cpp2/cpplib.h
5978         * support/cpp2/cpplex.c,
5979         * support/cpp2/cppmain.c,
5980         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
5981
5982 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5983
5984         Fixed a number of problems revealed by bug #827883.
5985         * src/SDCCloop.c (loopInvariants): Spill location of the
5986         result operand should be recomputed if extracted from
5987         a loop. Also, don't extract assignments of an iTemp
5988         from a literal.
5989         * src/SDCCast.c (isConformingBody): loop reversal should
5990         not occur if the control variable is involved with a
5991         relational operator.
5992
5993 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
5994
5995         * .version: bumped to 2.3.6 to reflect the big improvements
5996         made by Erik and Klaus. Thanks!
5997
5998 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
5999
6000         Replaced the livrange code.
6001         * src/SDCClrange.c: added new LR code
6002         * src/SDCCloop.c,
6003         * src/SDCCBBlock.h: removed remainig parts from old LR code
6004         * src/ds390/ralloc.c,
6005         * src/ds390/gen.c: minor fixes to make it work with new code
6006
6007 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6008
6009         * as/hc08/asm.h,
6010         * as/hc08/lkrloc.c,
6011         * src/hc08/gen.c,
6012         * src/hc08/ralloc.c: Fix various warnings related to the hc08
6013         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
6014         (tweaked fix for bug #818696)
6015
6016 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6017
6018         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
6019
6020 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6021
6022         * src/SDCCmain.c,
6023         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
6024         * src/mcs51/gen.c (gencjneshort),
6025         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
6026         more efficient (per Scott Bronson's suggestion)
6027
6028 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6029
6030         Extended the semantics of the critical keyword to include
6031         individual statements. See RFE #827755 and #799831
6032         * src/SDCC.y
6033         * src/SDCCicode.c
6034         * src/SDCCopt.c
6035         * src/SDCCast.c
6036         * support/Util/SDCCerr.c
6037         * support/Util/SDCCerr.h
6038         * src/mcs51/gen.c
6039         * src/ds390/gen.c
6040         * src/hc08/gen.c
6041
6042 2003-10-19  Borut Razem <borut.razem AT siol.net>
6043
6044         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
6045
6046 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6047
6048         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
6049         Fixed bug #818696
6050         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
6051         and predecrement operand is displayed
6052
6053 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6054
6055         * src/SDCCval.c (valMinus): fixed bug #826041
6056
6057 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6058
6059         Some hc08 related updates that I missed earlier
6060         * sim/ucsim/stypes.h
6061         * support/regression/ports/hc08/spec.mk
6062
6063 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6064
6065         New target "hc08" for the Motorola 68hc08 family of micros
6066
6067         * configure
6068         * configure.in
6069         * Makefile
6070         * src/hc08/*
6071         * src/SDCCmain.c
6072         * src/port.h
6073         * sim/ucsim/hc08.src/*
6074         * sim/ucsim/configure.in
6075         * src/ucsim/configure
6076         * sim/ucsim/packages_in.mk
6077         * as/hc08/*
6078         * as/Makefile
6079         * device/include/mc68hc908qy.h
6080         * device/lib/hc08/*
6081         * device/lib/Makefile.in
6082         * support/regression/ports/hc08/*
6083         * support/regression/Makefile
6084
6085 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6086
6087         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
6088         regression test
6089         * src/ds390/gen.c (genCast): fixed bug #821957
6090
6091 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
6092
6093         * device/lib/logf.c: "fixed" overlay bug
6094         * support/regression/ports/host/spec.mk: added m library
6095         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
6096         * support/regression/tests/float_trans: added (for Eric)
6097
6098 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
6099
6100         * src/mcs51/gen.c (genCpl): fixed bug
6101         http://sf.net/mailarchive/message.php?msg_id=6263915
6102
6103 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
6104
6105         * src/SDCCast.c (decorateType): added extended constant folding
6106         * src/SDCCsymt.c (computeType): cleanup
6107         * src/SDCCval.c (valShift): minor optimization
6108         * support/regression/tests/ast_constant_folding.c: added
6109
6110 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6111
6112         * src/SDCCmain.c: removed some unintended changes
6113
6114 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6115
6116         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
6117         * src/z80/gen.c: fixed part of bug #817589
6118         * src/SDCCsymt.c (checkFunction): fixed bug #817895
6119
6120 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
6121
6122         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
6123         * src/SDCCcflow.c
6124         * src/SDCCcse.c
6125         * src/SDCCdflow.c
6126         * src/SDCClabel.c
6127         * src/SDCClrange.c
6128         * src/SDCCmem.c
6129         * src/SDCCopt.c
6130         * src/SDCCpeeph.c
6131         * src/SDCCset.c
6132         * src/avr/ralloc.c
6133         * src/ds390/ralloc.c
6134         * src/izt/ralloc.c
6135         * src/mcs51/ralloc.c
6136         * src/pic/ralloc.c
6137         * src/pic16/ralloc.c
6138         * src/xa51/ralloc.c
6139         * src/z80/ralloc.c
6140         * src/z80/gen.c: removed unused label "release:"
6141
6142 2003-10-06  Borut Razem <borut.razem AT siol.net>
6143
6144         * src/SDCC.lex: removed definition of unused variables
6145           save_optimize and save_options
6146
6147 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
6148
6149         * clean.mk: removed '=' in "-maxdepth=1"
6150         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
6151         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
6152
6153 2003-10-06  Borut Razem <borut.razem AT siol.net>
6154
6155         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
6156           my_unput() replaced by unput()
6157
6158 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
6159
6160         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
6161         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
6162         type-punned pointer will break strict-aliasing rules"
6163         Old LR behaviour is again default; Klaus' LR can be choosen by
6164         defining the environment variable LRKLAUS
6165         * src/SDCCBBlock.h
6166         * src/SDCCloop.c
6167         * src/SDCClrange.c
6168         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
6169         * clean.mk: fixed removal of files in bin/CVS/
6170         * device/lib/clean.mk: fixed removal of directories small and large
6171         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
6172         * src/SDCCicode.c,
6173         * src/SDCCval.c: removed superflous test for pedantic
6174
6175 2003-10-05  Borut Razem <borut.razem AT siol.net>
6176
6177         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
6178           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
6179           message "unmatched #pragma SAVE and #pragma RESTORE"
6180
6181 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6182
6183         * doc/sdccman.lyx: various additions and updates (interrupts, inline
6184           assembly, critical functions, atomic, nojtbound)
6185
6186 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
6187
6188         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
6189         * src/SDCCBBlock.h
6190         * src/SDCCloop.c
6191         * src/SDCCloop.h
6192         * src/SDCClrange.c
6193
6194 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6195
6196         * src/z80/gen.h,
6197         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6198         * src/mcs51/gen.h
6199         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6200         * src/ds390/gen.h
6201         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6202         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
6203         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
6204
6205 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6206
6207         * src/z80/gen.c (genRet): fixed bug #524753
6208         * src/z80/gen.c (genCast): fixed internal error on cast from
6209         pointer to long
6210         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
6211         fix for bug #477835 to the z80
6212         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
6213         for tracking iCodes in the peephole optimizer for z80
6214
6215 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6216
6217         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
6218         the other part of bug #814548
6219         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
6220
6221 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
6222
6223         * src/SDCCcse.c: fixed part of bug #814548
6224
6225 2003-09-28  Borut Razem <borut.razem AT siol.net>
6226
6227         * src/asm.c: rewrite of printILine() to use temporary file instead
6228           a pipe
6229         * src/xa51/main.c: commented out declaration of int rewinds
6230
6231 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6232
6233         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
6234
6235 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6236
6237         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
6238         * src/asm.c (printILine): Fixed bug #811015
6239
6240 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6241
6242         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
6243         freeing.
6244
6245 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6246
6247         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
6248         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
6249         to correctly handle general case of AOP_PAIRPTR
6250         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
6251
6252 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6253
6254         * src/mcs51/ralloc.c (fillGaps),
6255         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
6256         register positioning bug)
6257
6258 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
6259
6260         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
6261
6262 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6263
6264         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
6265         genCodePointerGet, genGenPointerGet, genFarPointerSet,
6266         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
6267         (ralloc doesn't intentionally do this now, but perhaps later)
6268         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
6269         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
6270         register positioning bugs (Fixed bug #762602 and #795325)
6271         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
6272         (Fixed bug #808779)
6273         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
6274         lines that --i-code-in-asm generates
6275
6276 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6277
6278         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
6279         trying to fclose a FILE* that was already closed.
6280
6281 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6282
6283         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
6284         of const struct should be treated as if const themselves)
6285
6286 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
6287
6288         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
6289
6290 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6291
6292         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
6293         Unix (/n) and DOS (/r/n) line terminations.
6294
6295 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6296
6297         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
6298         bug #613775
6299
6300 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6301
6302         * src/mcs51/gen.c (genFunction, genEndFunction),
6303         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
6304         and restore of EA so that stack offsets to parameters are
6305         correct when using both critical and reentrant/stack-auto.
6306         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
6307         size (can be triggered in error if sloc is shared between
6308         different sized objects)
6309         * device/include/float.h: fixed macros to explicitly use
6310         unsigned long where needed
6311
6312 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
6313
6314         Feature req. 799831: added code to allow nesting of critical functions
6315         * src/mcs51/gen.c (genFunction, genEndFunction)
6316         * src/ds390/gen.c (genFunction, genEndFunction)
6317
6318 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6319
6320         * src/SDCCsymt.c (sclsFromPtr),
6321         * src/SDCCsymt.h,
6322         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
6323         support for standard C idiom of memory mapped variables; for
6324         example, *((xdata int*)0x1234) = 1 is now internally equivalent
6325         to xdata int at 0x1234 tempvar = 1.
6326         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
6327         provided by Akiya ISHIDA
6328
6329 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
6330
6331         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
6332         * src/SDCCval.c (constVal): added reduction from int to char
6333         * src/SDCCval.c (valMult, valDiv): fixed sign handling
6334         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
6335         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
6336         to ignore the sign
6337         * support/regression/tests/shifts.c: fixed
6338
6339 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6340
6341         * src/z80/gen.c (genXor): Fixed bug #805445
6342
6343 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6344
6345         Fixed bug #621531 (const & volatile confusion in the type chain).
6346         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
6347         refer to the const or volatile state of the pointer itself.
6348
6349         * src/SDCCast.c
6350         * src/SDCCglue.c
6351         * src/SDCCicode.c
6352         * src/SDCCsymt.c
6353         * src/SDCCval.c
6354         * src/SDCC.y
6355         * src/SDCCsymt.h
6356         * src/pic/gen.c
6357         * src/pic/ralloc.c
6358         * src/pic16/gen.c
6359         * src/pic16/ralloc.c
6360         * support/regression/tests/const.c
6361
6362 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6363
6364         When checking for duplicated modules, use absolute paths
6365         instead of relative paths.  Files changed:
6366
6367         * as/mcs51/lklib.c
6368         * link/z80/lklib.c
6369
6370 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6371
6372         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
6373
6374 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6375
6376         * device/include/string.h: added size_t typedef, changed
6377         prototypes to use size_t, eliminated separate reentrant and
6378         non-reentrant declarations, added _memmove declaration
6379         * device/lib/_memcpy.c: changed to use size_t instead of int,
6380         changed /4 to >>2 to avoid division library call
6381         * device/lib/_memcmp.c,
6382         * device/lib/_memset.c,
6383         * device/lib/_strncat.c,
6384         * device/lib/_strncpy.c,
6385         * device/lib/_strncmp.c: changed to use size_t instead of int
6386         * device/lib/_memmove.c: new file (fixed bug #772294)
6387         * device/lib/Makefile.in: added _memmove.c
6388         * device/lib/z80/asm_strings.s: fixed bug #772290
6389         * support/regression/tests/bitfields.c: attempt to fix host assertion
6390         failure on amd64-unknown-linux2.2
6391
6392 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6393
6394         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
6395         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
6396         * as/z80/asmain.c (main): fixed bug #801766
6397
6398 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
6399
6400         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
6401         compilers
6402
6403 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6404
6405         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
6406         reported in bug #800609
6407
6408 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
6409
6410         * Top header beautifications in src/pic16 directory:
6411           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
6412           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
6413           pcoderegs.h, ralloc.c, ralloc.h
6414         * main.c: added top header and GPL license notice
6415         * pcode.c: fixed the if-conditional warning
6416
6417 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
6418
6419         * device/lib/_mullong.c: replaced int by short for gcc
6420
6421 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6422
6423         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
6424         and JUMPTABLE iCodes properly now (worked by accident before)
6425         * src/mcs51/gen.c (leftRightUseAcc),
6426         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
6427         iCode properly now. Use getSize instead of nRegs since a & b
6428         aren't part of the nRegs tally.
6429
6430 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
6431
6432         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
6433         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
6434           before instructions that use the _STATUS register
6435
6436 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
6437
6438         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
6439         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
6440         fetching of the pointer
6441         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
6442         copied from genNearPointerSet()
6443         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
6444         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
6445         If they pop r0/r1 they must be called in the opposite order than aopOp().
6446         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
6447         (resp. --stack-auto), prepared for --xstack
6448
6449 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6450
6451         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
6452
6453 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
6454
6455         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
6456         these ports have their own __sdcc_external_start()
6457
6458 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
6459
6460         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6461         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
6462         type for bits was changed. It resulted in bit variables becoming
6463         global, which is not permitted in PIC 14 assembly output.
6464
6465 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6466
6467         * doc/sdccman.lyx: various additions and updates. Rearranged sections
6468
6469 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6470
6471         Z80 and MCS51 linkers complaint if a public symbol is defined
6472         in more than one library module:
6473
6474         * as/mcs51/lklib.c
6475         * link/z80/lklib.c
6476         * as/mcs51/Makefile.in
6477
6478 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6479
6480         A few small changes that speed up the peephole optimizer.
6481
6482         * src/SDCCpeeph.c
6483
6484 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6485
6486         Try to make the peephole optimizer smarter by maintaining
6487         an association between the assembly source code and the
6488         iCodes that originated them. Put this information to use
6489         with a new peephole rule condition "notVolatile" so that
6490         the rules can be aggressive yet still safe.
6491
6492         * src/SDCCpeeph.c
6493         * src/SDCCpeeph.h
6494         * src/mcs51/gen.c
6495         * src/mcs51/peeph.def
6496
6497 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6498
6499         Fixed bug #741761
6500
6501         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
6502         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
6503         if the left or right operand symbols have the accuse flag set.
6504
6505 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6506
6507         Changed the type of the result of the ! (NOT) operator to char;
6508         previously it returned the same type as the source. This allows
6509         us to eliminate all the genFloatNot functions (all of its target
6510         implementations were very buggy) since !float can use the same
6511         code as !long now.
6512
6513         * src/SDCCicode.c (ast2iCode): ! returns char
6514         * src/mcs51/gen.c (genNot, genNotFloat),
6515         * src/ds390/gen.c (genNot, genNotFloat),
6516         * src/z80/gen.c (genNot, genNotFloat),
6517         * src/pic/gen.c (genNot, genNotFloat),
6518         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
6519
6520 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
6521
6522         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6523         1. Interrupt would not compile properly. Ensure PCLATH register is saved
6524            during interrupts. Ensure WSAVE is located at a shared bank address.
6525         2. Fixed page selection in some places
6526         3. Fixed BTFSS/C to where necessary use registers directly and not simply
6527            the registers name strings.
6528         4. Fixed "signed / unsigned compare" compiler warnings.
6529         5. The PIC port manages its own allocation of the general purpose
6530            registers, but makes no attempt to reuse them. As a result when
6531            compiling it soon runs out of general purpose registers. Some
6532            additional code was added to the files pcode.c and device.c to walk
6533            through the function call tree and rename the registers so that they
6534            get reused.
6535
6536         * src/pic/device.c
6537         * src/pic/gen.c
6538         * src/pic/glue.c
6539         * src/pic/pcode.c
6540         * src/pic/pcode.h
6541         * src/pic/ralloc.c
6542         * src/pic/ralloc.h
6543         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
6544         genPlus() & genMinus() when the result is the same as left or right
6545
6546 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6547
6548         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
6549
6550 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6551
6552         Made bitfield a distinct type from bit so that bitfields
6553         convert as per ANSI C and bits retain their traditional
6554         boolean style behaviour. Implemented bitfield support in
6555         the z80 port.
6556
6557         * src/SDCCsymt.h,
6558         * src/SDCCsymt.c,
6559         * src/SDCCast.c,
6560         * src/cdbFile.c,
6561         * src/mcs51/gen.c,
6562         * src/ds390/gen.c: bit v bitfield split
6563         * src/z80/gen.c: New support for bitfields
6564         * support/regression/tests/bitfields.c: reenabled z80,
6565         added more tests
6566
6567 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6568
6569         Rules 246.x, 247.x relate to bitfields, the others speed up
6570         access to xdata mapped I/O devices.
6571
6572         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
6573
6574 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6575
6576         Cleaned up genPackBits and genUnpackBits and added two helper
6577         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
6578         for literal assignments in genPackBits (thanks to Frieder for
6579         reminding me).
6580
6581         * src/mcs51/gen.c
6582         * src/ds390/gen.c
6583
6584 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6585
6586         Fixed bug #748310 (pointer to function type mishandled when the
6587         function name is omitted). Also fixed a SIGSEGV when a function
6588         attribute (reentrant, etc) is used on a non-function or on a
6589         function but misplaced before the parameter list.
6590
6591         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
6592         bug #748310
6593         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
6594         * support/Util/SDCCerr.h,
6595         * support/Util/SDCCerr.c: Added func attr misuse error msg
6596
6597 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6598
6599         Fixed bug #787649 by anonymous
6600         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
6601         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
6602
6603 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6604
6605         Fixed numerous bitfield problems.
6606
6607         * src/SDCC.y: More bitfield related error checking
6608         * src/SDCCsymt.h,
6609         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
6610         * support/Util/SDCCerr.h,
6611         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
6612         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6613         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6614         * support/regression/tests/bitfields.c: tests added
6615
6616 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6617
6618         Made the constant following the "interrupt" keyword optional. If
6619         omitted, the function will not automatically be given an entry
6620         in the interrupt vector table (similar to #pragma NOIV, but
6621         less syntacticly kludgy). The interrupt number is also now
6622         range checked. Also fixed a bug in the high order bit example
6623         in the manual.
6624
6625         * src/SDCC.y
6626         * src/SDCCmem.c
6627         * src/SDCCglue.c
6628         * src/SDCCsymt.h
6629         * support/Util/SDCCerr.c
6630         * support/Util/SDCCerr.h
6631         * doc/sdccman.lyx
6632
6633 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6634
6635         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
6636         * src/SDCCicode.c (operandOperation): rewritten some ops
6637         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
6638         * src/SDCCsymt.c (computeType): literals are handled the same way as any
6639         other type
6640         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
6641         be re-activated by defining REDUCE_LITERALS)
6642         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
6643         unsigned, but are signed by default
6644         * src/SDCCval.c (constVal): rearranged
6645         * src/SDCCval.c (valMod): preliminary fix
6646         * src/SDCCval.c (valCastLiteral): use TYPE_* types
6647         * support/regression/literalop.c: added, work in progress
6648
6649 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6650
6651         Generate warnings for useless declarations like "char data;"
6652         that don't do what new users expect.
6653
6654         * src/SDCC.y
6655         * support/Util/SDCCerr.h
6656         * support/Util/SDCCerr.c
6657
6658 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
6659
6660         * src/SDCCval.c (valMult): fix overflow detection of negative int
6661
6662 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6663
6664         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
6665
6666         Changes to support big endian targets:
6667
6668         * src/ports.h
6669         * src/SDCCglue.c
6670         * src/avr/main.c
6671         * src/ds390/main.c
6672         * src/izt/i186.c
6673         * src/mcs51/main.c
6674         * src/pic/main.c
6675         * src/pic16/main.c
6676         * src/xa51/main.c
6677         * src/z80/main.c
6678
6679 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
6680
6681         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
6682         * device/lib/time.c: fixed warning "integer overflow in expression"
6683
6684 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
6685
6686         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
6687         * src/SDCCval.c (constVal): changed default to signed; hex and octal
6688         constants are unsigned; added recognition of "u" flag for unsigned
6689         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
6690         * src/SDCCval.c (valDiv, valMod): fixed signdness
6691         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
6692         signedness of modulo, left and right shift
6693         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
6694         * support/Util/SDCCerr.h: added warning W_INT_OVL
6695         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
6696         * src/SDCCast.c (ast_print): improved output of constants
6697
6698 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6699
6700         Fixed some warnings when building with MSVC:
6701
6702         * as\mcs51\asdata.c
6703         * as\z80\asdata.c
6704         * as\mcs51\asm.h
6705         * as\z80\asm.h
6706         * link\z80\aslink.h
6707         * link\z80\lkdata.c
6708         * link\z80\lkeval.c
6709         * link\z80\lkgb.c
6710         * link\z80\lkihx.c
6711         * link\z80\lks19.c
6712         * link\z80\lksym.c
6713         * support\cpp2\cpplib.c
6714         * src\ds390\gen.c
6715         * src\mcs51\gen.c
6716
6717 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
6718
6719         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
6720
6721 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6722
6723         * support\librarian\clean.mk: Do not remove Makefile.
6724         * support\librarian\Makefile: added.
6725
6726 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6727
6728         Added librarian to MSVC build:
6729         * all.dsp
6730         * sdcc.dsw
6731         * support\librarian\librarian.dsp
6732
6733         'configure' not needed for librarian, removed:
6734         * support\librarian\configure
6735         * support\librarian\configure.in
6736         * support\librarian\config_in.h
6737         * support\librarian\Makefile.in
6738
6739         Hopefully these ones built the librarian and the rest of sdcc properly:
6740         * Makefile
6741         * Makefile.common.in
6742
6743         Messed up 'configure', so revert to previous version:
6744         * configure
6745         * configure.in
6746
6747 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
6748
6749         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
6750         there, while the mantissa of a double is "only" 53 bits wide.
6751
6752 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6753
6754         Adding sdcclib to the build.  MSVC project coming soon.
6755         Files added/changed:
6756
6757         * support\librarian\clean.mk
6758         * support\librarian\configure
6759         * support\librarian\configure.in
6760         * support\librarian\config_in.h
6761         * support\librarian\Makefile.bcc
6762         * support\librarian\Makefile.in
6763         * support\librarian\sdcclib.c
6764         * Makefile.bcc
6765         * Makefile
6766         * Makefile.common.in
6767         * configure
6768         * configure.in
6769
6770 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6771
6772         Linker now complaints if linked modules have conflicting options, for
6773         example, one compiled using --model-large and another one compiled with
6774         --model-small.  The following files were modified:
6775
6776         * as\mcs51\asdata.c
6777         * as\mcs51\aslink.h
6778         * as\mcs51\asm.h
6779         * as\mcs51\asmain.c
6780         * as\mcs51\asout.c
6781         * as\mcs51\i51pst.c
6782         * as\mcs51\lkdata.c
6783         * as\mcs51\lklibr.c
6784         * as\mcs51\lkmain.c
6785         * as\z80\asdata.c
6786         * as\z80\asm.h
6787         * as\z80\asmain.c
6788         * as\z80\asout.c
6789         * as\z80\z80pst.c
6790         * link\z80\aslink.h
6791         * link\z80\lkdata.c
6792         * link\z80\lklibr.c
6793         * link\z80\lkmain.c
6794         * src\SDCCglue.c
6795
6796 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6797
6798         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
6799         as/mcs51/lklibr.c: Generate a warning when a library is not found.
6800
6801 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
6802
6803         * src/z80/mappings.i: fix _mul[us][int,long] entries
6804
6805 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6806
6807         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
6808
6809 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
6810
6811         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
6812         * support/regression/tests/bitopcse.c: added
6813         fixed warning:
6814         * src/avr/gen.c:
6815         * src/pic/gen.c:
6816         * src/pic16/gen.c:
6817         * src/z80/gen.c:
6818         * src/xa51/gen.c:
6819
6820 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6821
6822         added support for new library format to z80, gbz80 linkers:
6823         *link/z80/aslink.h
6824         *link/z80/lklex.c
6825         *link/z80/lklib.c
6826         *link/z80/lklist.c
6827
6828 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
6829
6830         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
6831         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
6832
6833 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
6834
6835         added DUMMY_READ_VOLATILE:
6836         * src/SDCC.y:
6837         * src/avr/gen.c:
6838         * src/xa51/gen.c:
6839         * src/z80/gen.c:
6840         * src/pic/gen.c:
6841         * src/pic16/gen.c:
6842         * src/mcs51/gen.c:
6843         * src/ds390/gen.c:
6844         * src/SDCCcse.c (algebraicOpts): many improvements
6845         * src/SDCCcse.h: removed algebraicOpts()
6846         * src/SDCCicode.c (picDummyRead): added
6847
6848 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6849
6850         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
6851         "Insufficient space in data memory".
6852
6853 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6854
6855         * src/mcs51/gen.c: fixed bug #771358
6856         * src/z80/gen.c: fixed bug #759087
6857
6858 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
6859
6860         * src/pic16/glue.c: minor cleanup by Vangelis
6861
6862 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6863
6864         * device/include/regc515c.h: fixed #758477
6865         * device/lib/_gptrget.c: saving some cycles in generic pointer get
6866         * device/lib/_gptrput.c: saved a few bytes
6867         * my tab spacing is 8, yours too?)
6868         * device/lib/_ser.c: process RX bytes earlier than TX bytes
6869         * device/lib/serial.c: process RX bytes earlier than TX bytes
6870         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
6871
6872 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6873
6874         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
6875
6876 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6877
6878     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
6879
6880 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
6881
6882         * device/lib/Makefile.in: bad fix, reverted to 1.43
6883
6884 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
6885
6886         * device/lib/Makefile.in: added missing z80 object files
6887
6888 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
6889
6890         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
6891         pic16 progress by Vangelis:
6892         * src/SDCCglobl.h:
6893         * src/SDCCmain.c:
6894         * src/pic/Makefile:
6895         * src/pic:
6896         * pic/Makefile:
6897         * pic16/device.c:
6898         * pic16/device.h:
6899         * pic16/gen.c:
6900         * pic16/gen.h:
6901         * pic16/genarith.c:
6902         * pic16/glue.c:
6903         * pic16/main.c:
6904         * pic16/pcode.c:
6905         * pic16/pcode.h:
6906         * pic16/pcodepeep.c:
6907         * pic16/peeph.def:
6908
6909 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6910
6911     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
6912
6913 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6914
6915     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
6916     added gbz80 build to MSVC project.
6917     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
6918     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
6919     from 8051 stuff and setup so it links using a .lnk file.
6920
6921 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6922
6923     * support/librarian/sdcclib.c: sdcc librarian.
6924     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
6925     with sdcclib.
6926
6927 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6928
6929     * as/mcs51/lkmain.c: properly handle extensions in function afile.
6930
6931 2003-07-02  Borut Razem <borut.razem AT siol.net>
6932
6933         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
6934         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
6935         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
6936         src/xa51/main.c, src/z80/main.c:
6937         virtualization of glue() function: each port has it's own glue function,
6938         which is accessed by do_glue function pointer in PORT.general structure
6939
6940 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
6941
6942         * DS800C400 fun, improved ROM interface and tinibios.
6943
6944 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
6945
6946         * More support for DS80C400. Now includes beginning of interface to ROM.
6947
6948 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
6949
6950         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
6951
6952 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6953
6954         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
6955
6956 2003-06-19  Borut Razem <borut.razem AT siol.net>
6957
6958         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
6959
6960 2003-06-19  Borut Razem <borut.razem AT siol.net>
6961
6962         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
6963         fixed Z80 port - crt0.o: cannot open.
6964
6965 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
6966
6967         * support/Util/MySystem.c (merge_command): revert bad fix
6968
6969 2003-06-18  Borut Razem <borut.razem AT siol.net>
6970
6971         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
6972
6973 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6974
6975         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
6976         option --use-stdout sends errors to stdout instead of stderr.
6977
6978 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
6979
6980         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
6981
6982 2003-06-15  Borut Razem <borut.razem AT siol.net>
6983
6984         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
6985         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
6986         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
6987         fixed width array of pointers replaced with sets;
6988         multiple include and lib paths ared transferred to preprocessor and linker
6989         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
6990         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
6991         fixed width array of pointers
6992         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
6993         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
6994         fixupPath(), getPathDifference()
6995         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
6996         fixed width array of pointers
6997
6998 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
6999
7000         * src/pic16/ralloc.c: fix warnings
7001         * src/pic16/pcode.c: fix warning
7002
7003 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
7004
7005          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
7006         know all the details, but essentially this set of changes enable
7007         the pic16 port to generate movff instructions and generate assembler
7008         directives,
7009         * src/SDCCmain.c:
7010         * src/pic16/gen.c:
7011         * src/pic16/glue.c:
7012         * src/pic16/pcode.c:
7013         * src/pic16/device.c:
7014         * src/pic16/main.c:
7015         * src/pic16/pcode.h:
7016         * src/pic16/pcoderegs.c:
7017         * src/pic16/ralloc.c:
7018         * src/pic16/ralloc.h:
7019
7020 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7021
7022         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
7023         added option --vc, so sdcc errors and warnings are compatible with
7024         Microsoft Visual Studio.
7025
7026 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7027
7028         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
7029           device/lib/libfloat.lib: added atof function.
7030
7031 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
7032
7033         * doc/sdccman.lyx: updated to Lyx 1.3
7034         * doc/cdbfileformat.lyx: updated to Lyx 1.3
7035         * doc/test_suite_spec.lyx: updated to Lyx 1.3
7036         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
7037
7038 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
7039
7040         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
7041
7042 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7043
7044         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
7045           additions to the "related tools/documentation" section
7046
7047 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
7048
7049         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
7050
7051 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
7052
7053         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
7054         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
7055
7056 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
7057
7058         * doc/sdccman.lyx: fix double dash and other minor things
7059         * doc/Makefile: fix double dash
7060
7061 2003-05-28  Karl Bongers(patches from Martin Helmling)
7062         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
7063           condition and ignore commands.
7064
7065 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7066
7067         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
7068           is in parts still quite out of date, I did changes as far as I felt makes sense
7069           for a non-native english speaker.
7070           Please feel free to add to the manual or to correct my changes.
7071         * doc/Makefile: undid touching the date of intermediate tex files.
7072
7073 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7074
7075         * doc/sdccman.lyx: Manual has an index now
7076
7077 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
7078
7079         Finalize muluint/mulsint and mululong/mulslong merging:
7080         * device/lib/_mulint.c
7081         * device/lib/_mullong.c
7082         * device/lib/gbz80/mul.s
7083         * device/lib/gbz80/stubs.s
7084         * device/lib/z80/mul.s
7085         * device/lib/z80/stubs.s
7086         * src/SDCCsymt.c (initCSupport)
7087
7088 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7089
7090         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
7091         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
7092           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
7093           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
7094           instead of /Zm500.
7095
7096 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7097
7098         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
7099           the regression tests I'm not brave enough to enable 245.b, 245.c
7100         * doc/sdccman.lyx: added latex preamble for hyperref package.
7101           Using pdflatex this will give you a hyperlinked pdf file with
7102           bookmarks. (prepend '%' before /usepackage if this breaks something)
7103
7104 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7105
7106          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
7107
7108 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
7109
7110         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
7111
7112 2003-05-21    <johan AT balder>
7113
7114         * src/SDCCglue.c (printIval): fixed bug #739934
7115
7116 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7117
7118         Applied patch from bug 737905 (renamed yylineo to mylineno):
7119         * src/altlex.c
7120         * src/SDCCast.c
7121         * src/SDCglobl.h
7122         * src/SDCC.lex
7123         * src/SDCCsymt.c
7124         * src/SDCCval.c
7125         * src/pic16/pcode.c: Cleaned warnings
7126         * src/pic16/pcodeflow.c: Cleaned warnings
7127         * src/pic16/pcoderegs.c: Cleaned warnings
7128
7129 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
7130
7131         * src/pic16/pcode.c: Cleaned warnings
7132         * src/pic16/pcodepeep.c: Cleaned warnings
7133         * src/pic16/ralloc.c: Cleaned warnings
7134
7135 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7136
7137         * doc/sdccman.lyx: fixed bug 739745
7138         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
7139
7140 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
7141
7142         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
7143         it can be defined with CFLAGS when running configure
7144         * src/SDCCmain.c: fixed compiling + linking with object files
7145
7146 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
7147
7148         * configure.in: configure for pic16 port,
7149             added --disable-pic16-port
7150         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
7151         * src/SDCCmain.c: linkOptions is changed to set *,
7152             added if/endif conditional macros to remove options help
7153             messages from optionsTable when a port is not configured, added
7154             support for the PIc16 port in the ports table, when executing
7155             the compiler with no port specified on command line, a default
7156             port is selected with the new macro DEFAULT_PORT which is
7157             defined in port.h, in setDefaultOptions() linkOptions is removed
7158             from initialization assignment, since now it is a set,
7159             parseCmdLine uses setParseWithComma for linkOptions, in
7160             linkEdit() linkOptions are accessed with new function indexSet()
7161             which returns the i'th item of a set variable. See SDCCset.c, in
7162             linkEdit() when calling buildCmdLine(), added linkOptions as
7163             last argument. Now users can pass arguments to gplink via the
7164             -Wl option, main() uses pic16glue() to glue up pic16 programs
7165         * src/SDCCpeeph.c: various changes to support pic16
7166         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
7167             return the i'th item of the set
7168         * src/SDCCset.h: added function prototype for indexSet()
7169         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
7170         * src/clean.mk: added pic16 in CLEANALLPORTS variable
7171         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
7172             added macro DEFAULT_PORT
7173         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
7174         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
7175             generated
7176         * src/pic16/glue.c: commented out some error producing lines
7177         * src/pic16/main.c: __config directives are commented out to stop
7178             gpasm complaining and test the linkage with gplink, _linkCmd and
7179             _asmCmd changed to be more gplink and gpasm friendly
7180         * src/pic16/peeph.def: peep rule 3 is commented out, since it
7181             produced an error when parsed, peep rule 12 is added to utilize
7182             movff, but it is commented out since the pCode does not support
7183             yet a command with 2 address arguments
7184
7185 2003-05-18    <johan AT balder>
7186
7187         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7188         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7189 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
7190
7191         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
7192   Added feature to script commands from file.
7193
7194 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
7195
7196         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
7197         * src/SDCCutil.c: include ctype.h for win32
7198
7199 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
7200
7201         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
7202
7203 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
7204
7205         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
7206   Fixed so you can set breakpoints prior to run, run does not stop
7207   on entry now.  Add tbreak.  Other enhancements and fixes for use
7208   with ddd.
7209
7210 2003-05-12  Borut Razem <borut.razem AT siol.net>
7211
7212         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
7213
7214 2003-05-11  Borut Razem <borut.razem AT siol.net>
7215
7216         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
7217         the path of bin directory, so that PATH is the only env. variable, which has to be set
7218         in case of standard installation.
7219         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
7220         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
7221         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
7222
7223 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7224
7225         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
7226         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
7227         temp files are in the port dir; clean the gen/test directory when
7228         generating new test.c
7229         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
7230         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
7231         * support/regression/tests/zeropad.c: added
7232
7233 2003-05-09    <johan AT balder>
7234
7235         * src/SDCCglue.c: fixed bug #597940
7236
7237 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
7238
7239         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7240   cache sfr, optimize next,step, fix off by one sourceline,
7241   support ddd list function.
7242         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
7243
7244 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7245
7246         * support/regression/HTMLgen.py: added compare_s2f()
7247         * support/regression/Makefile: redo 1.27
7248         * support/regression/generate-cases.py: redo 1.5
7249
7250 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
7251
7252         * support/regression/tests/float.c: workaround 33 bit hex constant
7253         * support/regression/tests/simplefloat.c: fix division for host
7254
7255 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
7256
7257         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
7258         that tame's the PIC's over-aggressive optimizer.
7259
7260 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7261
7262          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
7263          support for MSVC.
7264
7265 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
7266
7267         Initial support for DS80C400. "Hello world" runs on TINIm400
7268         (with polled I/O).
7269
7270 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
7271
7272          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7273          * Some notes on ddd usage added in debugger/README
7274          Martin Helmling adding more features and fixes for ddd GUI debugger.
7275          Code added for nexti, stepi, up, down, and other adjustments.
7276
7277 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
7278
7279         * src/pic/pCodepeep.c non-wildcard asmops are now handled
7280         * src/pic/peeph.def Added two rules to optimize carry manipulation
7281         * src/pic/* removed debug printfs
7282
7283 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
7284
7285         * debugger/mcs51/cmd.c: added header newalloc.h
7286
7287 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
7288
7289         * as/Makefile: new EXEEXT
7290         * as/z80/Makefile: remove trailing slash of BUILDIR
7291         * as/z80/clean.mk: new EXEEXT
7292         * Makefile.common.in: add to CFLAGS (and others), don't replace it
7293         * support/cpp2/Makefile.in: new EXEEXT
7294         * src/pic/glue.c (pic14emitRegularMap): fixed warning
7295
7296 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
7297
7298         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
7299         EXEEXT was introduced to fix all related problems with targets
7300         "clean", "install" and "uninstall"; a couple of further flaws
7301         especially with "clean" have been fixed too
7302         * as/mcs51/Makefile.in
7303         * as/mcs51/clean.mk
7304         * as/z80/Makefile
7305         * Makefile
7306         * clean.mk
7307         * debugger/mcs51/Makefile.in
7308         * debugger/mcs51/clean.mk
7309         * link/z80/Makefile
7310         * link/z80/Makefile.in
7311         * link/z80/clean.mk
7312         * link/Makefile
7313         * packihx/Makefile.in
7314         * packihx/clean.mk
7315         * sim/ucsim/Makefile
7316         * sim/ucsim/clean.mk
7317         * sim/ucsim/avr.src/Makefile.in
7318         * sim/ucsim/avr.src/clean.mk
7319         * sim/ucsim/s51.src/Makefile.in
7320         * sim/ucsim/s51.src/clean.mk
7321         * sim/ucsim/xa.src/Makefile.in
7322         * sim/ucsim/xa.src/clean.mk
7323         * sim/ucsim/z80.src/Makefile.in
7324         * sim/ucsim/z80.src/clean.mk
7325         * sim/ucsim/main_in.mk
7326         * sim/ucsim/packages_in.mk
7327         * sim/ucsim/gui.src/Makefile.in
7328         * sim/ucsim/gui.src/serio.src/Makefile.in
7329         * sim/ucsim/gui.src/serio.src/clean.mk
7330         * src/Makefile.in
7331         * src/clean.mk
7332         * support/cpp2/Makefile.in
7333         * support/cpp2/clean.mk
7334         * support/makebin/Makefile
7335         * support/makebin/clean.mk
7336         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
7337         * doc/sdccman.lyx: --program-suffix no longer needed
7338
7339 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
7340
7341          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
7342          Martin Helmling added support for ddd GUI debugger.
7343          Code added to display assembly, set variables, and other commands
7344          to interface to ddd.
7345
7346 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
7347
7348         * as/Makefile: fix target clean
7349         * as/clean.mk: fix target clean
7350         * as/z80/clean.mk: fix target clean
7351
7352 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
7353
7354         * Makefile.common.in: added  AT EXEEXT AT
7355         * configure.in: removed all mingw32 stuff
7356         * configure: rebuilt from configure.in
7357         * doc/sdccman.lyx: updated section "installation"
7358         * support/scripts/sdcc_mingw32: adapted to configure
7359         * support/scripts/sdcc_cygwin_mingw32: added
7360
7361 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
7362
7363         * src/pic Added object file support for the PIC port
7364         * src/pic Applied patch from Craig Franklin (this started the object file support)
7365         * src/regression Updated the PIC regression tests for object files
7366
7367 2003-04-20  Borut Razem <borut.razem AT siol.net>
7368
7369         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
7370           lklex.c: In function `getfid':
7371           lklex.c:203: warning: array subscript has type `char'
7372         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
7373           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
7374         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
7375           stack handling macros
7376
7377 2003-04-19  Borut Razem <borut.razem AT siol.net>
7378
7379         * "handling space characters in file path" task:
7380         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
7381         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
7382         * support/Util/MySystem.h: make it self-sufficient
7383         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
7384           src/z80/main.c, sdcc/as/mcs51/lklex.c:
7385           handling space characters in file path
7386         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
7387           (it will be used by assemblers, which have their own includes, e.g. gpasm)
7388         * support/Util/MySystem.c: handling space characters in executable's path
7389
7390 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
7391
7392         * as/z80/Makefile: fix permanent rebuild of z80
7393         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
7394         * support/regression/tests/bitfields.c: added Johan's bitfields.c
7395
7396 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
7397
7398         * src/SDCCopt.c: add special case optimization to replace modulo by
7399           a power of two with a bitwise AND.
7400
7401 2003-04-18    <johan AT balder>
7402
7403         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
7404
7405 2003-04-17    <johan AT balder>
7406
7407         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
7408         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
7409
7410 2003-04-13  Borut Razem <borut.razem AT siol.net>
7411
7412         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
7413         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
7414           fixed mingw problem in adl_NORMALIZE_PATH
7415
7416 2003-04-12  Borut Razem <borut.razem AT siol.net>
7417
7418         * fixed "#pragma SAVE/RESTORE can not be nested":
7419         * src/SDCC.lex: reworked pragma handling functions
7420         * sdcc/src/SDCCglobl.h: reworked stack handling macros
7421         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
7422
7423 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7424
7425         * src/SDCCutil.c (pathEquivalent): defined but not used
7426         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
7427         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
7428         * configure: rebuilt from configure.in
7429         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7430         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7431         * device/include/Makefile.in: replace sdcc_datadir
7432         * device/lib/Makefile.in: replace sdcc_datadir
7433         * Makefile.common.in: add LDFLAGS from configure
7434         * packihx/Makefile.in: use LDFLAGS
7435         * src/Makefile.in: use LDFLAGS
7436         * support/cpp2/Makefile.in: add LDFLAGS from configure
7437         * support/makebin/Makefile: use LDFLAGS
7438         * .version: bumped version number to 2.3.5
7439
7440 2003-04-12  Borut Razem <borut.razem AT siol.net>
7441
7442         * completed "different paths" task:
7443         * src/SDCCmacro.c: fixed bug in handling quotes
7444         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
7445         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
7446
7447 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7448
7449         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
7450
7451 2003-04-11 kevin Vigor <kevin AT vigor.nu>
7452
7453         * ds390/gen.c ds390/peeph.def: fix bug 706781
7454
7455 2003-04-11  Borut Razem <borut.razem AT siol.net>
7456
7457         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
7458
7459 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
7460
7461         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
7462         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
7463          set - this bit used to not be set...).
7464         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
7465           bad code in PIC Port
7466         * src/regression/and2.c added to test bug 609268
7467         * src/regression/Makefile added and2.c to regression test
7468
7469
7470 2003-04-08    <johan AT CP255758-A>
7471
7472         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
7473         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
7474         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
7475
7476 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
7477
7478         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
7479         fix bug #487815
7480         * support/cpp2/Makefile.in: fix bug #487815
7481         * configure: rebuilt from configure.in
7482         * Makefile.common.in: docdir changed, new path suffixes
7483         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7484         * sdcc_vc_in.h: reflect changes from sdccconf.h
7485         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
7486         * src/SDCCutil.h: remove BINDIR hack
7487         * doc/sdccman.lyx: update new path hierarchy
7488
7489 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7490
7491         * src/SDCCpeeph.c: added okToRemoveSLOC test
7492
7493 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7494
7495         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
7496
7497 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7498
7499         * src/SDCCpeeph.c: added labelIsReturnOnly test
7500         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
7501
7502 2003-04-05    <johan AT balder>
7503
7504         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
7505         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
7506         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
7507         * src/SDCCast.c: fixed a warning
7508         * src/SDCCast.h: fixed a warning
7509         * src/SDCCicode.c (operandFromAst): fixed a warning
7510
7511 2003-04-04    <johan AT balder>
7512
7513         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
7514         * src/SDCCast.c (decorateType): fixed bug #715076
7515         * src/SDCC.y: fixed bug #702907
7516
7517 2003-04-03    <johan AT balder>
7518
7519         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
7520         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
7521         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
7522         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
7523         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
7524
7525 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
7526
7527         * _decdptr.c: fix return values
7528         * _gptrget.c: fix return values
7529         * _gptrgetc.c: fix return values
7530         * _gptrput.c: fix return values
7531         * _mulint.c: fix return values
7532         * as/z80/Makefile: fix 'make -j' problem
7533
7534 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
7535
7536         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
7537         * configure.in: big cleanup, updated to autoconf 2.5x
7538         * configure: rebuilt from configure.in
7539         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7540         * sdcc_vc_in.h: reflect changes from sdccconf.h
7541         * doc/Makefile: fixed a flaw in "make install"
7542
7543 2003-04-02    <johan AT balder>
7544
7545         * src/ds390/gen.c (genCmp): no comments
7546         * src/mcs51/gen.c (genCmp): no comments
7547         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
7548         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
7549
7550 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
7551
7552         * support/regression/generate-cases.py: place generated file in given sub directory
7553         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
7554         * support/regression/Makefile: improvements for 'make -j';
7555         side effect: it's simpler and faster now
7556
7557 2003-03-31  Borut Razem <borut.razem AT siol.net>
7558
7559         * src/z80/main.c: link-{port} and as-{port} defined without path
7560         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
7561
7562 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
7563
7564         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
7565
7566 2003-03-30  Borut Razem <borut.razem AT siol.net>
7567
7568         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
7569           changed type of list parameter to set
7570         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
7571         * src/port.h: changed type of do_assemble() parameter to set
7572         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
7573           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
7574           definition of "cppoutfilename" macro with NULL value in preProcess()
7575         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
7576         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
7577         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
7578           replaced with set *binPathSet
7579         * shash_add() deallocates the item, if allready exsists, before adding the new one
7580         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
7581
7582 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
7583
7584         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
7585           a nested for loop bug in the PIC port
7586         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
7587           for loops
7588
7589 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
7590
7591         * support/Util/dbuf.h: remove C++ stuff to make it portable
7592
7593 2003-03-28  Borut Razem <borut.razem AT siol.net>
7594
7595         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
7596           literal strings in stringLiteral()
7597         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
7598         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
7599           to the project
7600
7601 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
7602
7603         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
7604
7605 2003-03-26    <johan AT balder>
7606
7607         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
7608         * src/ds390/gen.c (saveRegisters): catched symbol abuse
7609         * src/SDCCast.c (decorateType): fixed " -v < 3"
7610
7611 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
7612
7613         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
7614         Added Lenny Story's debug infrastructure changes:
7615         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
7616         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
7617         * src/cdbFile.c: added
7618         * src/SDCCdebug.c: added
7619         * src/SDCCdebug.h: added
7620         * src/SDCCast.c (createFunction)
7621         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
7622         * src/SDCCmain.c (parseCmdLine, main)
7623         * src/SDCCmem.c (redoStackOffsets)
7624         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
7625         * src/SDCCsymt.h
7626         * src/common.h
7627         * src/avr/gen.c (genAVRCode)
7628         * src/ds390/gen.c (gen390Code)
7629         * src/mcs51/gen.c (gen51Code)
7630         * src/pic/gen.c (genpic14Code)
7631         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
7632         * src/xa51/gen.c (genXA51Code)
7633         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
7634
7635 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7636
7637         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
7638         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
7639
7640 2003-03-22    <johan AT balder>
7641
7642         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
7643
7644 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
7645
7646         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
7647         * doc/cdbfileformat.lyx: added, written by Lenny Story
7648         * doc/Makefile: added cdbfileformat.lyx
7649         * doc/clean.mk: added cdbfileformat.lyx
7650
7651 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
7652
7653         * src/mcs51/peeph.def: fix bug #705773
7654
7655 2003-03-20    <johan AT balder>
7656
7657         An sfr/sbit can have an "at #" AND an initializer
7658         * src/SDCCsymt.c (checkSClass):
7659         * src/SDCCmem.c (allocGlobal):
7660         * src/SDCCmem.c (allocLocal):
7661         * src/SDCCast.c (createBlock):
7662
7663 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
7664
7665         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
7666
7667 2003-03-16    <johan AT balder>
7668
7669         Undid the hackup of const and volatile, the problem is much bigger
7670         * src/SDCC.y:1.65
7671         * src/SDCCast.c:1.171
7672         * src/SDCCglue.c:1.138
7673         * src/SDCCicode.c:1.146
7674         * src/SDCCsymt.c:1.150
7675         * src/SDCCval.c:1.65
7676
7677 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
7678
7679         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
7680         * src/ds390/gen.c (genAddrOf): fixed bug #704087
7681
7682 2003-03-13    <johan AT balder>
7683
7684         Hackup const and volatile modifiers in type chains a bit:
7685         * src/SDCC.y:1.63
7686         * src/SDCCast.c:1.169
7687         * src/SDCCglue.c:1.136
7688         * src/SDCCicode.c:1.143
7689         * src/SDCCsymt.c1.146
7690         * src/SDCCsymt.h1.59
7691         * src/SDCCval.c:1.63
7692
7693 2003-03-12    <johan AT balder>
7694
7695         * src/SDCCBBlock.h: more LRH debugging junk
7696         * src/SDCCcflow.h: more LRH debugging junk
7697         * src/SDCCloop.c: more LRH debugging junk
7698         * src/SDCC.y (struct_declaration): fixed bug #697590
7699         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
7700         * src/ds390/gen.c (aopForRemat): fixed bug #700031
7701         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
7702
7703 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7704         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
7705         test function names must now match exactly).
7706         * src/SDCCcse.c: added special case in findCheaperOp to allow
7707         extending a short integer. Makes less awful code for bug 700121 test case.
7708
7709 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7710
7711         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
7712         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
7713
7714 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7715
7716         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
7717         actually called (operandsNotEqual() was called for all
7718         operandsNotEqualX tests).
7719
7720 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7721
7722         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
7723         with shorter literals. Fixes bug 700121.
7724
7725 2003-03-11    <johan AT balder>
7726
7727         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
7728
7729 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
7730
7731         * src/SDCCloop.c (mergeRegions): an evil beast is dead
7732         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
7733
7734 2003-03-10  Borut Razem <borut.razem AT siol.net>
7735
7736         * src/SDCCmain.c: pipe preprocessor's output
7737         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
7738         * sdcc_vc_in.h: define pclose as _pclose for WIN32
7739         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
7740         which closes all pipes in pipeSet set
7741         * src/SDCCset.c: free deleted item in function deleteSetItem()
7742         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
7743         moved from z80 to src subproject
7744         * .version: increased version number to 2.3.4
7745
7746 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
7747
7748         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
7749         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
7750         * support/regression/ports/xa51/spec.mk: fix typo
7751
7752 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
7753
7754         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
7755
7756 2003-03-09  Borut Razem <borut.razem AT siol.net>
7757
7758         * src/SDCCmain.c: pipe preprocessor's output
7759         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
7760         * sdcc_vc_in.h: define pclose as _pclose for WIN32
7761         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
7762         which closes all pipes in pipeSet set
7763         * src/SDCCset.c: free deleted item in function deleteSetItem()
7764         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
7765         moved from z80 to src subproject
7766
7767 2003-03-09  Borut Razem <borut.razem AT siol.net>
7768
7769         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
7770         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
7771         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
7772         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
7773         * src/SDCCglobl.h: unification of WIN32 native definitions
7774
7775 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7776
7777         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
7778
7779 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
7780
7781         * src/configure.in:   check for endianess (even while cross-compiling)
7782         * src/configure:      check for endianess (even while cross-compiling)
7783         * src/configure_in.h: check for endianess (even while cross-compiling)
7784         * src/avr/gen.c:        remove old endianess stuff
7785         * src/mcs51/gen.c:      remove old endianess stuff
7786         * src/ds390/gen.c:      remove old endianess stuff
7787         * src/pic/gen.c:        remove old endianess stuff
7788         * src/pic/genarith.c:   remove old endianess stuff
7789         * src/pic/glue.c:       fix endianess check
7790         * src/pic16/gen.c:      remove old endianess stuff
7791         * src/pic16/genarith.c: remove old endianess stuff
7792         * src/pic16/glue.c:     fix endianess check
7793         * src/xa51/gen.c:       remove old endianess stuff
7794         * src/z80/gen.c:        fix endianess check
7795         * src/SDCCglue.c:       fix endianess check
7796         * src/ds390/peeph.def: fix bug 700036
7797
7798 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
7799
7800         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
7801         * src/configure: find appropriate data-types on host for SDCC's int and long
7802         * src/configure.in: find appropriate data-types on host for SDCC's int and long
7803         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
7804         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
7805
7806 2003-03-07    <johan AT balder>
7807
7808         Just a big NOOP:
7809                 some minor cleanups before the big shot
7810                 OP_DEFS and OP_USES now use Kevin's protection
7811                 new option --nolabelopt
7812
7813         * src/SDCCBBlock.c:
7814         * src/SDCCast.c,:
7815         * src/SDCCcflow.c:
7816         * src/SDCCcse.c:
7817         * src/SDCCicode.c:
7818         * src/SDCCicode.h:
7819         * src/SDCClabel.c:
7820         * src/SDCCloop.c:
7821         * src/SDCCmain.c:
7822         * src/ds390/ralloc.c:
7823         * src/mcs51/ralloc.c:
7824         * src/pic/ralloc.c:
7825         * src/xa51/ralloc.c:
7826         * src/z80/ralloc.c:
7827
7828 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
7829
7830         * src/pic/pcode.c (get_op): fix 64 bit warnings
7831         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
7832         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
7833         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
7834         * support/regression/tests/malloc.c: fix 64 bit warnings
7835
7836 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
7837
7838         * src/mcs51/gen.c (genMinus): fixed bug 696436
7839
7840 2003-03-02  Borut Razem <borut.razem AT siol.net>
7841
7842         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
7843
7844 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
7845
7846         * configure.in: test for mkstemp
7847         * sdccconf_in.h: add HAVE_MKSTEMP
7848
7849 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
7850
7851         * device/include/ctype.h: removed warning while using --stack-auto
7852         * device/include/malloc.h: removed warning while using --stack-auto
7853         * device/include/string.h: removed warning while using --stack-auto
7854
7855 2003-02-23  Borut Razem <borut.razem AT siol.net>
7856
7857         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
7858         because NDEBUG is defined (see man assert)
7859         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
7860
7861 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7862
7863         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
7864         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
7865
7866 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7867
7868         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
7869         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
7870
7871 2003-02-18    <johan AT balder>
7872
7873         * as/mcs51/asmain.c (asmbl): module can start with a digit
7874         * as/z80/asmain.c (asmbl): module can start with a digit
7875
7876 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
7877
7878         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
7879         * src/asm.c: fix pipe() for Mingw32
7880
7881 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
7882
7883         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
7884         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
7885         make -V work again; --c1mode reads now from stdin
7886         * doc/sdccman.lyx: added --c1mode
7887         * support/Util/SDCCerr.c: new messages for c1 mode
7888         * support/Util/SDCCerr.h: new messages for c1 mode
7889         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
7890
7891 2003-02-15    <johan AT balder>
7892
7893         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
7894
7895 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
7896
7897         * doc/sdccman.lyx: Environment variables, -o and other minor things
7898
7899 2003-02-14    <johan AT balder>
7900
7901         * src/xa51/main.c: before anyone really tries to use it :)
7902
7903         * Install doc's in share/sdcc/doc
7904         * removed some obsolete files
7905         * Do a proper make distclean and uninstall
7906         M Makefile.common.in
7907         R sdccbuild.sh
7908         M as/Makefile
7909         M device/include/Makefile.in
7910         M device/lib/Makefile.in
7911         M doc/sdccman.lyx
7912         M link/Makefile
7913         M sim/ucsim/doc/Makefile.in
7914         M src/clean.mk
7915         R src/avr/peeph.rul
7916         R src/xa51/peeph.rul
7917         M support/cpp2/Makefile.in
7918         M support/makebin/Makefile
7919
7920
7921 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
7922
7923         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
7924
7925 2003-02-10  Borut Razem <borut.razem AT siol.net>
7926
7927         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
7928         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
7929         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
7930         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
7931         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
7932         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
7933         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
7934         src/z80/Makefile.bcc: Borland Makefile cleanup
7935         * as/z80/Makefile.bcc: Added Borland Makefile
7936         * support/cpp2/borland.h: Removed
7937
7938 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
7939
7940         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
7941         * src/SDCC.lex: new pragma NOIV
7942         * src/SDCCglobl.h: new pragma NOIV
7943         * src/SDCCmem.c: new pragma NOIV
7944
7945 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
7946
7947         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
7948
7949 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
7950
7951         * src/SDCCmain.c: signal handling is switched off by --debug
7952         * doc/Makefile: small fix for install; use clean.mk again
7953         * doc/clean.mk: clean *.pdf and *.html too
7954
7955 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
7956
7957         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
7958         * device/lib/printfl.c: fix a ds390 bug by making it portable
7959         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
7960         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
7961         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
7962         * debugger/mcs51/cmd.c: converted multi-line string literals
7963         * sim/ucsim/globals.cc: converted multi-line string literals
7964         * src/SDCCmain.c: introduced signal handler to remove temp files
7965         * doc/Makefile: small tweaks, implement clean
7966         * doc: removed generated files
7967
7968 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7969
7970         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
7971         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
7972         Address Record is not correctly generated for DS390."
7973
7974 2003-02-02  Borut Razem <borut.razem AT siol.net>
7975
7976         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
7977         * as/mcs51/asm.h: fixed compilation with Borland C
7978         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
7979         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
7980         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
7981         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
7982         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
7983         src/z80/Makefile.bcc: delete $(LIB) only if exist
7984         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
7985
7986 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
7987
7988         * device/include/malloc.h: introduced NULL
7989         * device/include/string.h: introduced NULL
7990         * device/include/stdlib.h: introduced NULL
7991         * device/lib/_memcpy.c: removed NULL
7992         * device/lib/_strcat.c: removed NULL
7993         * device/lib/_strchr.c: removed NULL
7994         * device/lib/_strcmp.c: removed NULL
7995         * device/lib/_strcpy.c: removed NULL
7996         * device/lib/_strcspn.c: removed NULL
7997         * device/lib/_strlen.c: removed NULL
7998         * device/lib/_strncat.c: removed NULL
7999         * device/lib/_strncmp.c: removed NULL
8000         * device/lib/_strncpy.c: removed NULL
8001         * device/lib/_strpbrk.c: removed NULL
8002         * device/lib/_strrchr.c: removed NULL
8003         * device/lib/_strspn.c: removed NULL
8004         * device/lib/_strstr.c: removed NULL
8005         * device/lib/_strtok.c: removed NULL
8006         * device/lib/malloc.c: removed NULL, include own header
8007
8008 2003-02-02    <johan AT balder>
8009
8010         * 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
8011         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
8012         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
8013         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
8014         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
8015         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
8016
8017 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8018
8019         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
8020         area 'DATA'"
8021
8022 2003-02-01    <johan AT balder>
8023
8024         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
8025
8026 2003-01-31    <johan AT CP255758-A>
8027
8028         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
8029
8030 2003-01-30    <johan AT balder>
8031
8032         * src/SDCCBBlock.c: automatic bug detection
8033         * src/SDCCicode.c: automatic bug detection
8034
8035 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8036
8037         * src/SDCCglobl.h:   now --xram-size 0 works
8038         * src/SDCCmain.c:    now --xram-size 0 works
8039
8040 2003-01-29    <johan AT balder>
8041
8042         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
8043
8044 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8045
8046         * as/mcs51/aslink.h: Added options --xram-size and --code-size
8047         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
8048         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
8049         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
8050         * src/SDCCglobl.h:   Added options --xram-size and --code-size
8051         * src/SDCCmain.c:    Added options --xram-size and --code-size
8052
8053 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
8054
8055         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
8056         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
8057
8058 2003-01-27    <johan AT balder>
8059
8060         * src/SDCC.y: fixed bug #613764
8061
8062 2003-01-26    <johan AT balder>
8063
8064         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
8065         * src/SDCCsymt.h: fixed bug #673374
8066         * src/SDCCglue.c: fixed bug #661910
8067         * src/SDCCast.c: fixed bug #458099 and 673374
8068
8069 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
8070
8071         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
8072         * as/mcs51/strcmpi.h: added
8073         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
8074         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
8075         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
8076         * as/mcs51/assym.c: strcmpi -> as_strcmpi
8077         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
8078         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
8079         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
8080         * as/mcs51/Makefile.aslink: new module strcmpi
8081         * as/mcs51/Makefile.asx8051: new module strcmpi
8082         * as/mcs51/Makefil.bcc: new module strcmpi
8083         * as/mcs51/Makefile.in: new module strcmpi
8084         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
8085
8086 2003-01-26    <johan AT balder>
8087
8088         * src/SDCCglue.c: reverted back to 1.124
8089         * src/SDCCast.c: reverted back to 1.156
8090         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
8091
8092 2003-01-25    <johan AT balder>
8093
8094         * src/SDCCglue.c: A better fix for bug #661910
8095         * src/SDCCast.c: A better fix for bug #661910
8096         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
8097
8098 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8099
8100         * src/Makefile.in: remove spawn.o
8101         * src/SDCCmain.c: remove spawn.h
8102         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
8103         * src/spawn.c: removed
8104         * src/spawn.h: removed
8105         * support/regression/ports/ds390/spec.mk: link with -r
8106
8107 2003-01-24    <johan AT CP255758-A>
8108
8109         * src/ds390/gen.c (aopOp): fixed bug #667458
8110         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
8111         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
8112         (createIvalCharPtr): an ival doesn't always have a storage class anymore
8113
8114 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8115
8116         * src/mcs51/peeph.def: better assembler identation by Frieder
8117         * src/mcs51/gen.c: better assembler identation by Frieder
8118
8119 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
8120
8121         * as/z80/string.h: removed for gcc 3.2
8122         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
8123         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
8124
8125 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8126
8127         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
8128         * src/SDCCpeeph.c (replaceRule): fix bug #663503
8129         * support/regression/Makefile: separate temp files for ports
8130         * support/regression/generate-cases.py: separate temp files for ports
8131         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8132         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8133
8134 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8135
8136         * moved tinitalk to device/examples/ds390
8137
8138 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
8139
8140         * as/mcs51/lkmem.c: rflag is for DS390
8141         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
8142         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
8143                          (linkEdit): move mem- and map-files the same way as ihx-files
8144         * src/z80/main.c (_setDefaultOptions): removed --generic
8145         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
8146         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
8147         * src/pic/glue.c (picglue): --c1mode works again
8148         * src/pic16/glue.c (pic16glue): --c1mode works again
8149         * src/asm.c (printCLine): fix #660034
8150
8151 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
8152
8153         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
8154         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
8155         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
8156         * as/mcs51/lkmem (summary): better fix for sp problem
8157         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
8158         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
8159         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
8160                                               remove --stack-after-data
8161
8162 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
8163
8164         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
8165         * src/SDCCutil.c (join): ugly bug: missing '\0'
8166         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
8167
8168 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8169
8170         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
8171         * src/port.h: typo
8172         * src/pic/main.c (_asmCmd): gpasm supports -o
8173         * src/z80/main.c: more general macros
8174         * device/lib/Makefile.in: remove intermediate files
8175
8176 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8177
8178         * .version: Bumped version number to 2.3.3
8179         * src/SDCCBBlock.c: new option -o
8180         * src/SDCCglobl.h: new option -o
8181         * src/SDCCglue.c: new option -o
8182         * src/SDCCmain.c: new option -o
8183         * src/asm.c: new option -o
8184         * src/ds390/main.c: new option -o
8185         * src/pic/glue.c: new option -o
8186         * src/pic/pcode.c: new option -o
8187         * src/pic/ralloc.c: new option -o
8188         * src/pic16/glue.c: new option -o
8189         * src/pic16/pcode.c: new option -o
8190         * src/pic16/ralloc.c: new option -o
8191         * src/z80/main.c: new option -o
8192         * device/lib/Makefile.in: use -o
8193         * support/regression/ports/ds390/spec.mk: use -o
8194         * support/regression/ports/gbz80/spec.mk: use -o
8195         * support/regression/ports/mcs51/spec.mk: use -o
8196         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
8197         * support/regression/ports/z80/spec.mk: use -o
8198         * support/regression/ports/ucz80/spec.mk: use -o
8199         * support/regression/ports/xa51/spec.mk: use -o
8200         * support/regression/fwk/lib/timeout.c: fix usage string
8201
8202 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
8203         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
8204
8205 2003-01-07    <johan AT balder>
8206
8207         * src/SDCCast.c (decorateType): fixed bug #600035
8208
8209 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
8210         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
8211         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
8212         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
8213         * src/pic/pcode.c: outcommented unused variable to remove warnings
8214         * src/pic/ralloc.c: outcommented unused variable to remove warnings
8215
8216 2003-01-06    <karl AT turbobit.com>
8217         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
8218    regression tests.
8219
8220 2003-01-06    <johan AT balder>
8221
8222         * src/SDCCicode.c: fixed array add
8223
8224 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
8225         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
8226         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
8227
8228 2003-01-04    <johan AT balder>
8229
8230         * src/SDCCval.c (getNelements): fixed the initialized array of structures
8231
8232 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8233         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
8234
8235 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8236         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
8237         * support/regression/tests/bug-524697.c: fit mem usage into 8032
8238
8239 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8240         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
8241
8242 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
8243         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
8244
8245 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
8246         * src/mcs51/main.c: removed {bindir}{sep} from aslink
8247
8248 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8249
8250     * in \sdcc\as\mcs51\ changed these files in order to create an
8251     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
8252     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
8253     following files to include the previous two files: aslink.dsp,
8254     Makefile.aslink, Makefile.bcc, and Makefile.in.
8255
8256     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
8257     .adb instead of .cdb
8258
8259 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8260
8261         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
8262         value from option --iram-size.
8263
8264 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8265
8266         * \sdcc\as\mcs51\lklist.c: added boundary check before using
8267         dram[] array.
8268
8269 2002-09-18    <wiml AT hhhh.org>
8270
8271         * SDCClrange.h: exposed setFromRange() and setToRange()
8272         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
8273           packRegsForAccUse() (bug 542397)
8274         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
8275           multiple times and emitting the fetch operations more than once
8276           added aopGetUsesAcc() function to allow binary operators to
8277           fetch their operands in the correct order; made genMinus() emit
8278           compact code for X = LITERAL - Y
8279
8280 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8281         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
8282         sprintf() in line 1267.
8283
8284 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8285         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
8286         like ports.
8287
8288 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8289         Changes to aslink (All the changes are marked with 'JCF'):
8290
8291         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
8292         summary().
8293
8294         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
8295         area BSEG.  Also moves, if possible, the DATA area down into the internal
8296         ram so more space is available.
8297
8298         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
8299         sflag.
8300
8301         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
8302         not bytes.  Function summary() which creates a memory usage summary
8303         file with extension .mem.  Reports of overlaping stack and small stack
8304         size.  If the space for the stack is less than 16 bytes aslink trows a
8305         warning.
8306
8307         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
8308         the 8051.  Option 'y' for memory summary output file.
8309
8310         Changes to sdcc (All the changes are marked with 'JCF'):
8311
8312         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
8313
8314         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
8315         overlaying area for it (uses RegBankUsed[4]).
8316
8317         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
8318         bank zero as used by default.  By default aslink locates the stack
8319         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
8320         the creation of the .mem file.  Delegates the allocation of data area
8321         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
8322         the begining of the stack area to aslink.
8323
8324         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
8325         glue() in SDCCglue.c creates an area for it.
8326
8327 2002-09-03  Borut Razem <borut.razem AT siol.net>
8328         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
8329         sdcc/src/pic/glue.c:
8330         introduced atexit() handler for teporay files removal in case of
8331         errors, assertions, ...
8332
8333 2002-08-29  Borut Razem <borut.razem AT siol.net>
8334         * sdcc/support/cpp2/auto-host_vc_in.h:
8335         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
8336         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
8337         Maybe there is a similar problem with BORLANDC? It should be checked!
8338
8339         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
8340         corrected improper use of assert: the assignment to clr variable was done inside the assert.
8341         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
8342         was not executed, and the compiler (cl) launched a warning:
8343         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
8344
8345 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8346         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
8347
8348 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
8349         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
8350
8351         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8352           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
8353           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
8354           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8355           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
8356           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
8357           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
8358         - added Release configuration in VS projects
8359         - review of compiler an linker options
8360         - VC .exe files are generated in bin_vc directory, not to interfere
8361           with binaries generated from other projects (cygwin, mingw, bcc ...)
8362
8363         * sdcc/src/yacc.dsp: added
8364
8365         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
8366         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
8367         and insert the version number definitions from .version
8368
8369         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
8370
8371         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
8372         added - genarate auto-host.h using auto-host_vc_in.h as template
8373
8374         * sdcc/sdcc_vc.h,
8375         removed from CVS, generated automatically
8376
8377 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
8378         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
8379
8380 2002-08-11  Borut Razem <borut.razem AT siol.net>
8381         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
8382
8383 2002-08-10  Borut Razem <borut.razem AT siol.net>
8384         * src/SDCCmain.c (main):
8385         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
8386         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
8387         The consequence was that some temporary files were not removed.
8388
8389         * src/SDCCglue.c:
8390         unification of code in functions tempfilename() and tempfile():
8391         function tempnam() is defined in Visual Studio 6.0 and .NET
8392
8393         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
8394
8395         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8396           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
8397         - removed compiler command line option /WX: Treats all warnings as errors
8398         - update a list of source files, included into the project
8399
8400         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8401           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
8402         changed project type to Generic Project so that can be correcly converted to VS.NET project
8403
8404         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
8405
8406         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
8407
8408         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
8409
8410         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
8411         added return 0 statements after assert() to make compiler happy
8412
8413         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
8414         added newline in the def file to keep MSC compiler satisfied
8415
8416         * sdcc/src/z80/gen.c:
8417         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
8418           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
8419         - solved MSC error in function aopDump()
8420
8421         * sdcc_vc.h: define PREFIX as "\\sdcc"
8422
8423 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
8424         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
8425
8426 2002-06-22  Scott Dattalo <scott AT dattalo.com>
8427         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
8428         - Rewrote the register banking algorithm.
8429         - Added pCode live-range analysis to registers (for now, only non-used and
8430         singly-used registers optimized away)
8431
8432         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
8433
8434         * 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.
8435
8436 2002-05-10  Scott Dattalo <scott AT dattalo.com>
8437         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
8438
8439 2002-04-22  Michael Hope  <michaelh AT vroom>
8440
8441         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
8442
8443         * configure.in (DD_COPT): Added include support required for gbdk.
8444
8445         * .version: Bumped version number just to increase it.
8446
8447         * src/SDCCmain.c: Added -nostdinc to the default options.
8448
8449 2002-04-15  Michael Hope  <michaelh AT vroom>
8450
8451         * device/lib/z80/printf.c (sprintf): Added.
8452
8453         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
8454
8455         * src/z80/peeph.def: Added transpose redundent load rule.
8456
8457         * src/z80/main.c: Added force callee saves for jaune.
8458
8459         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
8460
8461         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
8462
8463 2002-03-28  Johan Knol  <johan AT balder>
8464
8465         * src/SDCCval.c: fixed bug #532436
8466
8467 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8468         * /src/port.h:
8469         Added "char *Processor" field to the port structure.
8470
8471         * /src/SDCCmain.c:
8472         Added -p option. Allows port dependent processor to be specified.
8473
8474         * all ports:
8475         Initialized the new field char *Processor field to NULL in all ports
8476
8477         * /src/pic/*:
8478         Compiler generated registers for interrupt context saving
8479         were not getting allocated.
8480
8481 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
8482
8483         * /src/SDCCast.c:
8484         Fixed left shift. Will promote the left side of a left shift
8485         if a) left shifting more than size of operand or b) when assigned
8486         to something size > size of left side
8487
8488 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8489         * src/pic/*
8490         tons of changes. Register allocation has been
8491         rewritten. Added customization for the various PICs. Flow
8492         analysis is restructured. ...
8493
8494         * src/pic/device.h:
8495         Added
8496
8497         * src/pic/device.c:
8498         Added. device.c is a PIC port hack to accomodate variations
8499         in PIC devices.
8500
8501 2002-03-13  Michael Hope  <michaelh AT vroom>
8502
8503         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
8504
8505 2002-03-04  johanknol  <johanknol AT manik>
8506
8507         * /src/SDCCval.c: fixed
8508
8509         const unsigned char arr[][2] = { { 0, 1 } };
8510         t18.c:1: error: Initializer element is not constant
8511
8512 2002-03-04  bela  <bela AT manik>
8513
8514         * /device/include/mcs51reg.h:
8515         ds89c420 register definition update
8516
8517 2002-03-03    <johan AT FRIJA>
8518
8519         * support/Util/SDCCerr.c: did something, but don't no why anymore
8520
8521         * support/regression/tests/bug-524691.c: made it a little less shy
8522
8523         * src/SDCCast.c (decorateType): fixed bug #524697
8524
8525         * src/SDCCast.c: made some lineno improvements
8526
8527         * src/SDCCval.c (getNelements): changed warning to error
8528
8529         * src/SDCCglue.c (printIvalArray): changed warning to error
8530
8531         * src/SDCCicode.c: fixed a warning for mingw
8532
8533         * src/SDCCast.c (decorateType): fixed the << promotion for ops
8534
8535         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
8536
8537 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
8538
8539         * src/ds390/peeph.def:
8540         Added some more peephole rules
8541
8542         * src/ds390/gen.c: Various fixes & enhancements
8543
8544         * src/SDCClrange.c, src/SDCClrange.h:
8545         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
8546
8547         * src/ds390/ralloc.c:
8548         various fixes & enhancements (ds390) specific
8549
8550         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
8551         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
8552         from rallocs.
8553
8554         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
8555
8556 2002-03-02    <johan AT FRIJA>
8557
8558         * src/SDCCast.c (decorateType): fixed bug #524708
8559
8560         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
8561
8562         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
8563
8564 2002-03-01  Michael Hope  <michaelh AT vroom>
8565
8566         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
8567
8568         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
8569
8570 2002-03-01    <johan AT FRIJA>
8571
8572         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
8573
8574         * src/SDCCast.c (decorateType): fixed bug #524209
8575
8576         * src/SDCCval.c (valNot): fixed bug #524195
8577
8578 2002-02-26    <johan AT balder>
8579
8580         * src/xa51/gen.c: fixed a warning
8581
8582         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
8583
8584         * src/SDCCast.c (decorateType): fixed bug #522534
8585
8586 2002-02-23    <johan AT balder>
8587
8588         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
8589
8590 2002-02-22    <johan AT balder>
8591
8592         * src/SDCCast.c: fixed bug #514865
8593
8594         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
8595
8596 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
8597
8598         * sdcc/src/SDCCloop.c:
8599         Previous fix was not good. basic blocks that have "break" or "return" are
8600         not really partof a loop , but live ranges used in these blocks should
8601         be live thru the entire loop, so set partOfLoop but don't add them to
8602         loop region
8603
8604 2002-02-21    <johan AT FRIJA>
8605
8606         * src/SDCCcse.c: fixed bug #514308
8607
8608 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
8609
8610         * src/SDCCloop.c:
8611         Fixed BUG #519583. If a conditional block ended in a return/break
8612         statement inside a loop, it was not being considered part of the loop.
8613
8614         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
8615
8616 2002-02-10  Karl Bongers <karl AT turbobit.com>
8617
8618         * debugger/*:
8619         Fixed up SDCDB debugger somewhat.  Updated debugger/README
8620         with lots of comments and notes.
8621
8622         * device/examples/test2.c:
8623         Fix bug, "red" variable not being initialized(compiler complained).
8624
8625         * device/examples/Makefile, examples/test3.c:
8626         Add Makefile in device/examples folder, compiles test3.c
8627         for use as a multiple module SDCDB test case.
8628
8629         * sim/ucsim/cmd.src/cmdset.cc:
8630         Took out debug printfs in ucsim "next" command.
8631
8632         * sim/ucsim/xa.src:
8633         Karl and Johan start ucsim XA support.  Most dissassembly working,
8634         about 75% emulation done(plenty of work remaining).
8635
8636         * sim/ucsim/z80.src:
8637         Add Z80 support to ucsim, add test-ucz80 regression test,
8638         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
8639         Notice z80 compiler fails on examples/test3.c/crc code.
8640
8641 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
8642
8643         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
8644         Added support for --parms-in-bank1
8645
8646         * src/ds390/peeph.def:
8647         added a few more peephole optimzations
8648
8649         * src/ds390/main.c:
8650         1) added __builtin_inp & __builtin_outp used to read in data of given length
8651            from a memory mapped port
8652         2) added __builtin_memcmp
8653         3) added __builtin_swapw swap bytes of a short
8654
8655         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
8656         1) handle multiple send & receives from register bank1
8657         2) ralloc can now allocate DPTR1 to some liveRanges
8658
8659         * src/SDCCsymt.c, src/SDCCsymt.h:
8660         changes to handle multiple sends & receives
8661
8662         * src/SDCCptropt.h:
8663         added some pointer arithmetic optimization
8664
8665         * src/SDCCptropt.c:
8666         added some pointer arithmetic optimizations but not stable yet so not
8667         called from anywhere (will get this working shortly)
8668
8669         * src/SDCCopt.c: fixed for multiple sends & receives
8670
8671         * src/SDCCmain.c:
8672         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
8673         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
8674            set preprocessor defines (depending on options)
8675
8676         * src/SDCCicode.c, src/SDCCicode.h:
8677         changes made to handle multiple sends & receives
8678
8679         * src/SDCCglobl.h:
8680         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
8681
8682         * src/SDCCcse.c, src/SDCCcse.h:
8683         added function findbackward def (to be used in upcoming optimization)
8684
8685         * src/SDCCcflow.c, src/SDCCcflow.h:
8686         added function returnAtEnd - to determine if a basic block terminates with
8687         a RETURN iCode
8688
8689         * src/SDCCast.c, src/SDCCast.h:
8690         added option parms-in-bank1
8691
8692         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
8693         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
8694         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
8695         adjusted for --parms-in-bank1 option
8696
8697         * device/include/string.h:
8698         donot redefine "reentrant" keyword
8699
8700         * device/include/ds80c390.h: Added some more SFRs
8701
8702 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
8703
8704         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
8705
8706 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
8707
8708         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
8709
8710 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
8711
8712         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
8713
8714 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
8715
8716         * Added --xram-movc option
8717
8718 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
8719
8720         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
8721
8722 2002-01-11  Johan Knol
8723
8724         * Added math lib of Jesus Calvino-Fraga
8725
8726 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
8727
8728         * src/SDCCmain.c (processFile): fix processing of ../../src.c
8729         * support/regression/Makefile: new target test-mcs51-stack-auto
8730         * support/regression/ports/mcs51-stack-auto/spec.mk: added
8731
8732 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
8733
8734         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
8735
8736 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
8737
8738         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
8739
8740 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
8741
8742         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
8743
8744         * src/SDCCglue.h: add definition for printIvalChar()
8745
8746 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
8747
8748         * src/SDCCast.c: fix #498138 by Johan
8749
8750         * src/SDCCglue.c: fix #498138 by Johan
8751
8752 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
8753
8754         * support/regression/Makefile: fix clean
8755
8756         * support/regression/ports/ds390/support.c: fix transmission of last character
8757
8758 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
8759
8760         * /sdcc/src/ds390/gen.c:
8761         a) improved computing address of stack variable
8762         b) took out some #if 0 code
8763         c) improved parmBytes adjustment
8764         d) improved genPlusIncr & genMinusIncr
8765         e) genCmp could generate bad code (when left assigned to DPTR)
8766         f) Fixed bug in hasInc
8767
8768         * /sdcc/src/ds390/ralloc.c:
8769         a) packRegsForSupport could mess up live information (Fixed)
8770         b) packRegsDPTRuse could be incorrect for left & right shift
8771
8772         * /sdcc/src/mcs51/ralloc.c:
8773         packRegsForSupport could mess up the live information (Fixed)
8774
8775         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
8776
8777         * /sdcc/src/SDCCast.c:
8778         can reverse a loop even if function call is present as long
8779         as the loop control variable is local & is not passed as parameter
8780
8781 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8782
8783         * /sdcc/ChangeLog: *** empty log message ***
8784
8785         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
8786         More builtin function additions for TININative
8787
8788         * /sdcc/src/ds390/ralloc.c:
8789         Had broken the regression testsuite
8790
8791         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
8792
8793         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
8794         Added funcattr hasStackParms will be set for reentrant functions when there
8795         are paramteres on the stack, this helps in minimizing frame pointer generation
8796         typeFromStr can handle function pointers now
8797
8798         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
8799         *** empty log message ***
8800
8801 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8802
8803         * /src/ds390/gen.c, /src/ds390/main.c:
8804         More builtin function additions for TININative
8805
8806         * /src/ds390/ralloc.c:
8807         Had broken the regression testsuite
8808
8809         * /src/SDCCast.c: Fixed a bug in dumptree
8810
8811         * /src/SDCCsymt.c, /src/SDCCsymt.h:
8812         Added funcattr hasStackParms will be set for reentrant functions when there
8813         are paramteres on the stack, this helps in minimizing frame pointer generation
8814         typeFromStr can handle function pointers now
8815
8816         * /doc/builtins.txt, /doc/TININative.txt:
8817         *** empty log message ***
8818
8819
8820 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8821
8822         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
8823         ALPHA version for -mTININative
8824
8825         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
8826         updated to reflect changes in the port structure
8827
8828         * /src/port.h:
8829         added function do_assemble (similar to do_link) if non-null this function
8830         will be called to do assembly (-mTININative) requires a multi command
8831         assembly
8832         added function genAssemblerEnd will be called to generate assembler Epilogue
8833
8834         * /src/SDCCsymt.c:
8835         added _JavaNative to debug info printing
8836
8837         * /src/SDCCmain.c: added option --tini-libid
8838         added port->do_assemble function (-mTININative) has a multi command assemble
8839
8840         * /src/SDCCglue.c: Disabled "constExpr" check
8841         added port->genAssemblerEnd function
8842
8843         * /src/SDCCglobl.h: Added option --tini-libid value
8844
8845         * /src/SDCCast.h:
8846         tookout optimizeCompare from the header (has no external references)
8847
8848         * /src/SDCCast.c: made one more function "static"
8849
8850 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
8851
8852         * src/z80/mappings.i: Added z80asm support.
8853
8854         * src/z80/main.c: Added z80asm support on --asm=z80asm
8855
8856         * src/z80/gen.c: Fixed asm portability issues.
8857
8858         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
8859
8860         * src/SDCCglue.c (printExterns): Added global/extern split.
8861
8862 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
8863
8864         * support/regression/Makefile: added test for mcs51 model large
8865
8866         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
8867
8868         * support/regression/ports/gbz80/spec.mk: added -mgbz80
8869
8870 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
8871
8872         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
8873
8874 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
8875
8876         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
8877
8878         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
8879
8880 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
8881
8882         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
8883
8884         * support/regression/tests/simplefloat.c: Port to mcs51.
8885
8886 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
8887         * support/regression/tests/bug-485362.c: Added.
8888
8889         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
8890
8891         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
8892
8893         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
8894
8895         * src/z80/gen.c (aopDump): Added a dump function.
8896
8897 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
8898         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
8899
8900         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
8901
8902         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
8903
8904         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
8905
8906         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
8907
8908         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
8909
8910         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
8911
8912         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
8913
8914         * support/regression/ports/ds390/support.c: Use tinibios.
8915
8916         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
8917
8918 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
8919
8920         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
8921         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
8922
8923         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
8924
8925         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
8926
8927 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
8928
8929         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
8930
8931         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
8932         (packRegsForIYUse): Created and optimised.
8933
8934 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
8935
8936         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
8937 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
8938
8939         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
8940
8941         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
8942
8943         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
8944
8945 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
8946
8947         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
8948
8949         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
8950
8951 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
8952
8953         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
8954
8955         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
8956
8957         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
8958
8959 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
8960
8961         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
8962         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
8963         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
8964
8965         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
8966
8967         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
8968         (genNotFloat): Added.
8969         (genUminusFloat): Added.
8970
8971         * device/lib/z80/Makefile: Added floating pt stubs.
8972
8973         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
8974
8975         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
8976
8977         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
8978
8979 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
8980
8981         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
8982
8983         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
8984
8985         * sdcc/support/regression/Makefile: Add port ds390.
8986
8987         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
8988
8989         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
8990
8991         * sdcc/support/regression/ports/ds390/spec.mk: Added.
8992
8993         * sdcc/support/regression/ports/ds390/support.c: Added.
8994
8995         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
8996
8997         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
8998
8999         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
9000
9001 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9002
9003         * device/include/malloc.h: Added z80 and gbz80 support.
9004
9005         * device/lib/gbz80/heap.s: Added.
9006
9007         * device/lib/z80/heap.s: Added.
9008
9009         * device/lib/malloc.c: Added z80 and gbz80 support.
9010
9011         * support/regression/tests/malloc.c (testMalloc): Added.
9012
9013         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
9014
9015         * support/regression/tests/bug-478094.c: Added.
9016
9017         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
9018
9019 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
9020
9021         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
9022
9023         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
9024
9025         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
9026
9027         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
9028
9029         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
9030
9031 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
9032
9033         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
9034
9035 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
9036
9037         * support/regression/tests/bug-477927.c: Added.
9038
9039         * src/z80/peeph.def: Added minor rules.
9040
9041         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
9042
9043         * src/z80/peeph.def: Added jump optimisation modification.
9044
9045 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
9046
9047         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
9048
9049 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
9050
9051         * support/regression/tests/funptrs.c: Added.
9052
9053 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
9054
9055         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
9056
9057 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
9058
9059         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
9060
9061         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
9062
9063         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
9064         (movLeft2ResultLong): Created.
9065
9066         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
9067         (joinPushes): Added.  Joins two char pushes into a word push.
9068
9069 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
9070
9071         * support/cpp2/Makefile.in (install): Added creation of dest dir.
9072
9073         * support/makebin/Makefile (install): Added creation of dest dir.
9074
9075 2001-10-24 Karl Bongers <karl AT turbobit.com>
9076
9077         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
9078
9079 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
9080
9081         * src/z80/ralloc.c: Turned off faulty pack for one use.
9082
9083         * src/z80/peeph-gbz80.def: Removed redundent restart options.
9084
9085         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
9086
9087 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
9088
9089         * support/regression/Makefile: Improved clean
9090
9091         * support/regression/ports/gbz80/spec.mk: Added clean
9092
9093         * support/regression/ports/host/spec.mk: Added clean
9094
9095         * support/regression/ports/z80/spec.mk: Added clean
9096
9097         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
9098
9099         * support/regression/ports/mcs51/timeout.c: little improvements
9100
9101 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
9102
9103         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
9104
9105         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
9106
9107         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
9108
9109 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
9110
9111         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
9112
9113         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
9114
9115 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
9116         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
9117
9118         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
9119
9120         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
9121
9122         * src/mcs51/main.c (_linkCmd): Added bin path to command.
9123
9124         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
9125
9126         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
9127
9128         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
9129
9130         * support/regression/tests/longor.c: Added.
9131
9132 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
9133
9134         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
9135
9136         * as/mcs51/aslink.h: define PATH_MAX
9137
9138         * as/mcs51/asm.h: define PATH_MAX
9139
9140         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
9141
9142         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
9143
9144         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
9145
9146         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
9147
9148         * src/SDCCglobl.h: define PATH_MAX
9149
9150         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
9151
9152         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
9153
9154 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
9155
9156         * src/z80/gen.c (gencjneshort): Fixed
9157
9158         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
9159
9160 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
9161
9162         * support/regression/tests/bug-469671.c: Added.
9163
9164         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
9165
9166 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
9167
9168         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
9169
9170         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
9171
9172 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
9173
9174         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
9175
9176         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
9177
9178         * src/device/lib/_mullong.c : removed hint: nooverlay bug
9179
9180         * src/device/lib/_divuint.c : removed hint: nooverlay bug
9181
9182         * src/device/lib/_divulong.c: removed hint: nooverlay bug
9183
9184         * src/device/lib/_moduint.c : removed hint: nooverlay bug
9185
9186         * src/device/lib/_modulong.c: removed hint: nooverlay bug
9187
9188 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
9189
9190         * 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.
9191
9192         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
9193
9194         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
9195
9196 2001-10-07    <johan AT FRIJA>
9197
9198         * device/lib/gets.c (gets): fixed the return value.
9199
9200 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
9201         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
9202
9203         * 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.
9204
9205         * 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.
9206
9207         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
9208
9209         * src/pic/gen.c: Removed Safe_strdup.
9210
9211         * configure.in: Added option to enable libgc support.
9212
9213         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
9214         (bitVectUnion): Optimised.
9215         (bitVectIntersect): Optimised.
9216         (bitVectBitsInCommon): Optimised.
9217         (bitVectCplAnd): Optimised.
9218
9219         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
9220
9221 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9222
9223         * src/SDCCmain.c: distinguish between assembler debug and plain options
9224
9225         * src/avr/main.c:   remove standard assembler options
9226
9227         * src/ds390/main.c: remove standard assembler options
9228
9229         * src/mcs51/main.c: remove standard assembler options
9230
9231         * src/port.h: removed "PENDING" comment
9232
9233 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9234
9235         * src/device/lib/_mulint.c  : new, with assember functions
9236
9237         * src/device/lib/_mullong.c : new, with assember functions
9238
9239         * src/device/lib/_divuint.c : with assember functions
9240
9241         * src/device/lib/_divsint.c : with assember functions
9242
9243         * src/device/lib/_divulong.c: with assember functions
9244
9245         * src/device/lib/_divslong.c: with assember functions
9246
9247         * src/device/lib/_moduint.c : with assember functions
9248
9249         * src/device/lib/_modsint.c : with assember functions
9250
9251         * src/device/lib/_modulong.c: with assember functions
9252
9253         * src/device/lib/_modslong.c: with assember functions
9254
9255         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
9256
9257         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
9258
9259         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
9260                                       replaced _mululong.c and _mulslong.c by _mullong.c
9261
9262 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9263
9264         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
9265
9266 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9267
9268         * src/SDCCglue.c: test, if win32api is available for MINGW
9269
9270 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9271
9272         * src/SDCCsymt.c: no more _modifier in printTypeChain()
9273         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
9274         * support/regression/ports/gbz80/spec.mk: removed GENERIC
9275         * support/regression/ports/host/spec.mk: removed GENERIC
9276         * support/regression/ports/mcs51/spec.mk: removed GENERIC
9277         * support/regression/ports/z80/spec.mk: removed GENERIC
9278
9279 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
9280
9281         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
9282
9283         * support/regression/tests/bug-467035.c: Created.
9284
9285 2001-10-01    <johan AT FRIJA>
9286
9287         * src/SDCC.y: fixed bug #466586 part 1
9288
9289 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
9290
9291         * SDCCicode.c: z80 has no generic pointers
9292         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
9293
9294 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
9295
9296         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
9297
9298 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
9299
9300         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
9301
9302         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
9303
9304 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
9305
9306         * configure.in: Fixed up so that ucsim is only configured once.
9307
9308         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
9309
9310         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
9311         (getPathDifference): As above.
9312
9313         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
9314
9315         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
9316
9317 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
9318         * .version: Updated to 2.3.1
9319
9320         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
9321         Added copyright header.
9322
9323         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
9324         (assemble): Added support for macro based assembler commands.
9325         (linkEdit): Added support for macro based linker commands.
9326         (preProcess): Changed the pre-processor to use macros.
9327         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
9328         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
9329
9330         * device/lib/z80/crt0.s: Added module name for debugging.
9331
9332 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
9333
9334         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9335
9336         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
9337
9338         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
9339
9340         * src/Makefile.in: Added SDCCmacro and SDCCutil
9341
9342 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
9343
9344         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9345
9346 2001-09-16    <johan AT FRIJA>
9347
9348         * 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.
9349
9350 2001-09-15    <johan AT FRIJA>
9351
9352         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
9353         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
9354
9355 2001-09-11    <johan AT FRIJA>
9356
9357         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
9358
9359 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
9360
9361         * support/regression/tests/bug-460444.c: Added test case.
9362
9363         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
9364         (genCast): Added justification for all of the asserts.
9365
9366 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
9367
9368         * support/regression/support.c: _xdata replaced by xdata
9369
9370         * support/regression/spec.mk: removed _generic
9371
9372 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
9373
9374         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
9375
9376         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
9377         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
9378
9379         * src/z80/peeph.def: Added a rule to optimise shift then compare.
9380
9381         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
9382
9383         * support/regression/tests/bug-460010.c: Added test case.
9384
9385         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
9386
9387 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
9388
9389         * support/regression/Makefile: inter-port-clean adjusted for mcs51
9390
9391         * support/regression/testfwk.c: removed workaround for bug #436344
9392
9393         * support/regression/tests/bp.c: use less memory with mcs51
9394
9395         * support/regression/tests/bug-441448.c: use less memory
9396
9397         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
9398
9399         * support/regression/collate-results.py: typo
9400
9401 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
9402
9403         * support/regression/tests/fetchoverlap.c: Added new test case.
9404
9405         * support/regression/tests/bp.c: Added new test case.
9406
9407         * support/regression/tests/bug-448984.c: Added new test case.
9408
9409         * support/regression/tests/pow2shifts.c: Added new test case.
9410
9411         * src/z80/gen.c: Turned off the noise it normally generates for the release.
9412         (genlshTwo): Fixed right shift for count > 8.
9413
9414         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
9415
9416 2001-09-08    <johan AT FRIJA>
9417
9418         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
9419
9420 2001-09-07    <johan AT FRIJA>
9421
9422         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
9423
9424         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
9425
9426 2001-09-06    <johan AT FRIJA>
9427
9428         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
9429         * bernhard noted me at this: "() equals to (void)" (1.38)
9430
9431 2001-09-05    <johan AT FRIJA>
9432
9433         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
9434
9435 2001-09-04    <johan AT FRIJA>
9436
9437         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
9438
9439
9440 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
9441
9442         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
9443
9444 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
9445
9446         * link/z80/aslink.h: Fixed path for PATH_MAX
9447
9448 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
9449
9450         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
9451
9452         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
9453
9454         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
9455
9456         * 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.
9457
9458 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
9459
9460         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
9461         (genCmp): Fixed up genCmp for the GB with longs.
9462
9463         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
9464
9465         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
9466
9467         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
9468
9469         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
9470
9471 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
9472
9473         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
9474
9475 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
9476
9477         * 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.
9478
9479         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
9480
9481 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
9482
9483         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
9484
9485         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
9486
9487 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
9488
9489   * sim/ucsim/configure:    little improvement of Cygwin-detection
9490   * sim/ucsim/configure.in: little improvement of Cygwin-detection
9491   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
9492   * support/regression/tests/bug-221100.c: small changes for mcs51
9493   * support/regression/tests/bug-221168.c: small changes for mcs51
9494   * support/regression/tests/bug-227710.c: small changes for mcs51
9495   * support/regression/tests/staticinit.c: small changes for mcs51
9496   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
9497   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9498   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9499
9500 $Revision$