* src/pic16/gen.c (pic16_derefPtr): NEW, single place
[fw/sdcc] / ChangeLog
1 2005-08-03 Raphael Neider <rneider AT web.de>
2
3         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
4           to get/set values via pointers
5         * (genUnpackBits,genPackBits): changed detection of
6           ptr->bitfield vs. sym.bitfield, fixed access via generic
7           pointers, removed dead (wrong) code for multibyte bitfields
8         * (genNearPointerGet, genGenPointerGet): removed useless code,
9           fixed bitfield detection, fixes #1250594
10         * (genNearPointerSet): removed useless code
11         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
12           and introduced macro pic16_emitpcode that conditionally emits
13           the origin of the following pCode (useful for debugging SDCC)
14         * src/pic16/pcode.c: changed (and disabled) some debug outputs
15         * (createDefmap): fixed handling of LFSR for --optimize-df
16
17 2005-08-02 Borut Razem <borut.razem AT siol.net>
18
19         * device/lib/Makefile.in: pic16 libraries build enabled since
20           gputils-0.13.2 are now localy installed at sourceforge's compile farm
21
22 2005-08-02 Raphael Neider <rneider AT web.de>
23
24         * src/pic16/gen.c (genPackBits): removed deprecated warning
25         * (genGenPointerSet): fixed bitfield detection
26
27 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
28
29         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
30
31 2005-07-31 Raphael Neider <rneider AT web.de>
32
33         * device/lib/pic16/libdev/pic18f458.c,
34           device/include/pic16/pic18f458.h: added missing T0CONbits
35
36 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
37
38         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
39
40 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
41
42         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
43
44 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
45
46         * device/include/mcs51/at89c51ed2.h: added.
47
48 2005-07-23 Raphael Neider <rneider AT web.de>
49
50         * src/pic/gen.h: added emitpcode macro for debugging
51         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
52           and replace by macro adding debug information on demand
53         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
54         * (gencjne): tried to fix; replaced with correct (slower) code
55         * (gen{Unp,P}ackBits): fixed single bit access
56         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
57         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
58           previous instruction
59         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
60           register has to be handled with care (forbidding movement
61           of assignments/uses, removing assignments completely, ...)
62         * (pCodeOptime2pCodes): make use of regIsSpecial
63         * added lots of debugging output (commented out)
64         * src/pic/rallloc.c (deassignLRs): prevent operand registers
65           from being reused as result UNLESS it is known to work
66
67 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
68
69         * support/Util/dbuf.h: include <stddef.h> for size_t
70         * .version: changed to version 2.5.2
71
72 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
73
74         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
75
76 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
77
78         * src/hc08/gen.c (genMinus): fixed bug #1241835,
79           (genModOneByte): removed needless psha/pula
80
81 2005-07-22 Raphael Neider <rneider AT web.de>
82
83         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
84           have PIC14 handled like PIC16, fixes broken pic14 linker calls
85         * src/pic/gen.c (resolveIfx): do not "invent" labels
86         * (genSkipc): changed to positive logic
87         * (genSkipCond): removed as no longer needed
88         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
89           backport from PIC16
90         * (genLeftShift): check operands are in different registers
91         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
92           INCF does not update CARRY...
93         * src/pic/main.c: fixed _linkCmd
94         * src/pic/pcode.c (unlinkpCode): added inactive code
95         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
96           alive (do not assign result and operand overlapping registers)
97
98 2005-07-22 Raphael Neider <rneider AT web.de>
99
100         * src/pic/device.c (dump_sfr): replaced register declaration with
101           call to emitSymbolToFile() to avoid duplicate symbols
102         * (assignRelocatableRegisters): do not declare external symbols
103         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
104           right (take size of type, not etype)
105         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
106         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
107         * (packRegsForAccUse): disabled assignment of WREG as
108           the result reg to prevent occurence of just fixed #1235003,
109           fixes #1242954
110         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
111           symbols (avoids duplicate symbols in .asm file)
112         * (pic14emitRegularMap): use emitSymbolToFile()
113         * src/pic/gen.c (aopOp): fixed spillLocation handling
114         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
115         * (genDataPointerSet): removed unneccessary variables/output
116
117 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
118
119         * as/mcs51/lkarea.c: enlarged codemap for banked memory
120         * device/lib/mcs51/crtbank.asm: added # to 0x0F
121
122 2005-07-21 Raphael Neider <rneider AT web.de>
123
124         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
125           architecture cannot handle them efficiently, fixes bug #1235003
126         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
127           check for empty sets before using them (fixes bug #1232190)
128
129 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
130
131         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
132           (lnksect2): generate warnings for memory overlap
133         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
134           constseg to set the name of these segments so you can instruct the linker
135           to place them in banks
136         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
137         * src/SDCCglobl.h: added MODEL_HUGE to enum,
138           added code_seg and const_seg to options
139         * src/SDCCglue.c (emitMaps): use options.const_seg,
140           (createInterruptVect): put interrupt vectors in segment HOME,
141           (glue): put HOME before static segment and put the main glue in HOME,
142           (glue): use options.code_seg
143         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
144         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
145           these segments so you can instruct the linker to place them in banks
146           (linkEdit): use code_loc for HOME segment which should be the first
147           segment in code memory now
148         * src/SDCCmem.c: fixed more stuff like bug 1238386
149         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
150           (changePointer): don't change function pointers to code pointers for
151           banked functions,
152           (compareType): added exceptional check for banked function pointers
153         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
154         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
155           after static in code memory
156         * src/mcs51/gen.c: added aopLiteralLong prototype,
157           (aopForSym): use getSize for functions,
158           (genCall): generate banked calls over one trampoline __sdcc_banked_call
159           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
160           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
161           the segment,
162           (genPcall): use call for literal function pointers and generate banked
163           calls over the one trampoline so there's only one place for the user to
164           modify according to his/hers hardware,
165           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
166           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
167         * src/mcs51/main.c: added keyword banked,
168           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
169         * support/Util/SDCCerr.c,
170         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
171           needed for passing the bank and address to the trampoline
172         * device/lib/mcs51/crtbank.asm: added for bankswitching
173         * device/lib/mcs51/Makefile: added crtbank
174
175 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
176
177         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
178           for fields at offset 0 of a struct or union as reported
179           on 2005-07-07 in the developer mailing list.
180
181 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
182
183         * src/SDCCmem.c: fixed bug 1238386
184
185 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
186
187         * src/mcs51/peeph.def: added labelrefcounting for peepholes
188           (patch #1144962), added peephole 300, enabled 259.x
189         * doc/sdccman.lyx: removed screenshot and provided link instead
190
191 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
192
193         * doc/sdccman.lyx: added section about debugging with ddd
194         * doc/figures/ddd_example.eps: screenshot of debugging session
195
196 2005-07-04 Raphael Neider <rneider AT web.de>
197
198         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
199           like CODE pointers, fixes #1115683
200         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
201           call, fixes bugs #1232211, #1228110,
202           fixed wrong casts to pCodeFlow from pCodeInstructions
203
204 2005-07-04 Raphael Neider <rneider AT web.de>
205
206         * src/pic/gen.c (popGet): changed assert to allow for
207           bit operands
208         * (popGetAddr): changed signature to provide
209           an additional index, patched all call sites
210         * (genCmpEq): handle literal-like operands correctly
211         * (genAddrOf): added sanity checks on __code/__data pointers
212         * (genAssign): added handling of symbols from __code section
213         * (gencjne): do not generate code for comparisons whose result
214           is neither stored nor used, fixes bug #1171114
215         * (AccLsh, AccRsh): operate on operand instead of WREG
216         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
217           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
218           by known count
219         * rewrote complete shift-by-literal logic, commented unused
220           functions out
221         * (genConstPointerGet): get multiple bytes (if result size > 1),
222           fixed handling of non-immediate addresses
223         * (genPointerGet): handle CODE pointers like CONST pointers
224         * (genpic14Code): insert C-SRC lines as Cource-pCodes
225         * ({aop,op}_isLitLike): NEW, single place to decide whether an
226           operand is to be treated as a literal or not
227         * (mov2w,genPcall,genCmpEq),
228           src/pic/genarith.c: use aop_isLitLike() to decide between
229           literal/register contents
230         * (addSign): added missing offset
231         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
232           only emit comment in debug-mode,
233           use {aop,op}_isLitLike throughout the file
234         * src/pic/glue.c: fix initializers for pointers (work in progress)
235         * src/pic/pcode.c (get_op): honor index on _const symbols
236         * ({reset,dump}pCodeStatistics): NEW, estimate code size
237         * (dumppBlock): added pCode size estimation
238         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
239           check for IS_SYMOP before OP_SYMBOL'ing
240         * fixed indentation, compacted switch-statements
241         * (allocReg): find free register and allocate it instead of
242           allocating new registers all the time
243         * (deassignLRs): prevent POINTER_GET's from being assigned the same
244           registers as its operands (necessary only for multibyte GETs)
245
246 2005-07-01 Raphael Neider <rneider AT web.de>
247
248         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
249           debugging .asm-output macros FENTRY + FEXIT
250         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
251           way... I wonder...
252         * (emitpComment): NEW, printf to pCode
253         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
254           offset handling
255         * (popGetAddr): NEW, variant of popGet to access an immediates
256           high(er) bytes instead of the n'th byte of memory they reference,
257           replaced popGet with popGetAddr where neccessary
258         * (genDataPointerGet): reactivated and fixed implementation
259         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
260           accesses
261         * (genDataPointerSet): fixed multibyte assignments
262         * (genpic14Code): fixed --i-code-in-asm handling
263         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
264         * (genPlus): fixed index-out-of-bounds error
265         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
266         * src/pic/ralloc.c: added debugging output macro FENTRY2
267         * (spillThis): fixed indentation, enbraced for-body for clarity
268         * (rematStr): commented out as now unused
269         * (regTypeNum): commented out special spill case (overwrites
270           arbitrary values)
271         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
272
273 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
274
275         * doc/sdccman.lyx: documented sfr16/sfr32,
276           added example for using storage class with function pointers
277         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
278
279 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
280
281         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
282         * device/lib/_itoa.c,
283         * device/lib/_ltoa.c: optimized codesize
284         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
285           but don't know how to suppress the double warning.
286         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
287         * support/Util/SDCCerr.c,
288         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
289
290 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
291
292         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
293           fixed old K&R prototypes
294         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
295         * device/lib/_gptrget.c,
296         * device/lib/_gptrgetc.c,
297         * device/lib/_gptrput.c: changed versions for new memory indicator values,
298           also new versions for small generic pointers and banked generic pointers
299         * src/port.h: added const_name
300         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
301         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
302         * src/SDCCcse.c (findPrevIc): check all associative operators
303         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
304         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
305         * src/SDCCmem.c: updated comments,
306           set far-space to 0 for pdata, results in optimized code
307         * src/SDCCmem.h: added macro CONST_NAME
308         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
309           moving the info into the highest bits, see also gptrget/gptrput
310         * src/src.dsp: added sdcc.ico to project files
311         * src/avr/gen.c (genCast): fixed bug 0x%d
312         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
313         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
314           relation between ptr_type and DCL_TYPE,
315           (genCast): fixed bug 0x%d
316         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
317           (CODE)" for const_name
318         * src/hc08/gen.c (genCast): fixed bug 0x%d
319         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
320           (hc08_port): added "CONST (CODE)" for const_name
321         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
322           (aopForRemat, adjustArithmeticResult): disconnected direct relation
323           between ptr_type and DCL_TYPE,
324           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
325           operand* and took AOP() inside function so sfr-ness can be checked,
326           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
327           new prototype,
328           (genFunction, genEndFunction): optimized stack setup,
329           (genMinus): optimized for literals with ending zeroes (in bytes),
330           (genCast): fixed bug 0x%d
331         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
332           (mcs51_port): added "CONST (CODE)" for const_name
333         * src/mcs51/peeph.def: made rule 226 more generic
334         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
335         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
336         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
337         * src/z80/main.c (z80_port): added NULL for const_name,
338           (gbz80_port): added NULL for const_name
339         * support/regression/tests/bug663539.c,
340         * support/regression/tests/sfr16.c: new tests
341
342 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
343
344         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
345
346 2005-06-24 Raphael Neider <rneider AT web.de>
347
348         * device/lib/pic16/libdev/pic18f[68][567]20.c:
349           corrected typos...
350         * device/include/pic16/signal.h: added USBIF
351           and SIG_USB
352
353 2005-06-24 Raphael Neider <rneider AT web.de>
354
355         * device/lib/pic16/libdev/pic18f2455.c,
356           device/include/pic16/pic18f2455.h: NEW
357         * device/include/pic16/pic18fregs.h,
358           device/lib/pic16/pics.all,
359           src/pic16/device.c: added 18f2455
360         * device/lib/pic16/libdev/pic18f[68][567]20.c,
361           device/include/pic16/{pic18f[68][567].h,usart.h}:
362           replaced MULTIPLE_USARTS define with more relaible
363           compatibility sfrs (for USART access)
364
365 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
366
367         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
368           and the output asm file line is printed on two lines.
369
370 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
371
372         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
373           BGT, BLE, BHI, and BLS instructions
374         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
375           genCmpEq): removed
376         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
377           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
378           fixes bug #1216342
379         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
380
381 2005-06-15 Raphael Neider <rneider AT web.de>
382
383         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
384         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
385         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
386           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
387           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
388
389 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
390
391         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
392           Marcel Telka in bug #1215704
393
394 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
395
396         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
397           located in shared memory bank.
398
399 2005-05-31 Raphael Neider <rneider AT web.de>
400
401         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
402           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
403           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
404
405 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
406
407         * device/lib/_strncpy.c: fixed the fix
408
409 2005-05-26 Raphael Neider <rneider AT web.de>
410
411         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
412           initializers with \0, bug #1208187
413         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
414           intializers with \0, bug #1208187
415
416 2005-05-26 Raphael Neider <rneider AT web.de>
417
418         * src/pic16/glue.c (pic16_printIvalChar): fixed string
419           initializers with \0, bug #1208187
420         * src/pic16/main.c (_process_pragma): added sanity checks
421           for stack position and size, emit warnings when appropriate
422
423 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
424
425         * device/lib/_strncpy.c: fixed not filling with \0
426
427 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
428
429         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
430           createFunction),
431         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
432           compound_statement),
433         * src/SDCCsymt.h,
434         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
435
436 2005-05-24 Raphael Neider <rneider AT web.de>
437
438         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
439
440 2005-05-24 Raphael Neider <rneider AT web.de>
441
442         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
443           TRISE definitions, closes bug #1162453
444
445 2005-05-22 Raphael Neider <rneider AT web.de>
446
447         * src/pic16/main.c (_process_pragma): check for missing
448           arguments to pragmas code and udata
449         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
450           consistency fixes to match other headers (thanks to Jim Paris)
451         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
452
453 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
454
455         * src/SDCCicode.c (isOperandEqual): fixed missing ;
456
457 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
458
459         * support/regression/tests/bug1198642.c: new test
460         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
461         * src/SDCCcse.c (findPrevIc): added comment, please have a look
462         * support/scripts/resource.h,
463         * support/scripts/resource.rc,
464         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
465         * support/scripts/sdcc.ico: added 32x32 icon
466
467 2005-05-18 Raphael Neider <rneider AT web.de>
468
469         * device/lib/pic16/libdev/pic18f*.c,
470         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
471           keywords to "__sfr" and "__at (X)"
472         * device/include/pic16/pic18fregs.h: added pic18f4520
473         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
474           #1203088 (MPLAB compatibility)
475
476 2005-05-17 Raphael Neider <rneider AT web.de>
477
478         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
479         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
480         * device/lib/pic16/pics.all: added new devices
481         * src/pic16/device.c: added support for pic18f4520
482
483 2005-05-16 Raphael Neider <rneider AT web.de>
484         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
485         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
486         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
487           convenience function for bit access
488
489 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
490
491         * device/lib/printf_large.c: fixed bug 1193299
492         * support/regression/tests/bug1057979.c: added test %3.3s
493
494 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
495
496         * device/include/mcs51/8051.h,
497         * device/include/mcs51/8052.h: made parseable with lint
498         * device/include/mcs51/lint.h: added include file for (sp)lint
499         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
500         * doc/cdbfileformat.lyx,
501         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
502
503 2005-05-14 Raphael Neider <rneider AT web.de>
504
505         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
506         * device/lib/pic16/libc/stdlib/itoa.c (new)
507         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
508         * device/lib/pic16/libio/Makefile: exclude subdir according to
509           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
510         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
511         * src/pic16/gen.c (genFunction): prevent annoying warning
512         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
513           nameclashes on BeOS
514         * support/cpp2/cppmain.c (cpp_output_string): new
515         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
516           fixes bug 1116802
517
518 2005-05-13 Borut Razem <borut.razem AT siol.net>
519
520         * src/SDCCmain.c (linkEdit): fixed bug 1195202
521
522 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
523
524         * .version: changed to version 2.5.1; back to bleeding edge development
525
526 2005-05-11 Borut Razem <borut.razem AT siol.net>
527
528         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
529           generate PDF version 1.3 documents
530
531 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
532
533         * .version: changed to version 2.5.0
534
535 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
536
537         * doc/sdccman.lyx: updated weblinks, index and smaller updates
538
539 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
540
541         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
542         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
543         well as many smaller updates.
544         * .version: changed to version 2.5.0-pre1
545
546 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
547
548         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
549
550 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
551
552         * support/regression/tests/bug1185672.c: added
553         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
554           bug 1185672
555         * src/mcs51/gen.c (genCall): added comments, made it look safer
556         * src/mcs51/gen.c (genEndFunction): simplified
557
558 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
559
560         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
561
562 2005-04-14 Borut Razem <borut.razem AT siol.net>
563
564         * fixed bug 1045046 - SIGSEGV with really simple code?:
565           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
566           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
567
568 2005-04-14 Borut Razem <borut.razem AT siol.net>
569
570         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
571           src/pic16/device.h: temporarily disabled experimental #inline pragma
572           for 2.5.0 release
573
574 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
575
576         * device/include/z80/stdio.h,
577         * device/include/z80/string.h: removed these highly incomplete files so
578           SDCC can use the default ones in device/include/
579
580 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
581
582         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
583         gcc warning.
584         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
585         fix sdcpp warnings.
586
587 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
588
589         * device/include/malloc.h: removed redundant __reentrant prototypes
590         * device/lib/_mullong.c: added working xstack variant in asm (C version
591           doesn't pass regression tests)
592         * device/lib/bpx.c: used __data and made bpx char for mcs51
593         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
594           (createFunction): fixed bug with xstackPtr
595         * src/SDCCcse.c: corrected comments
596         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
597           (killDeadCode, eBBlockFromiCode): removed unused code
598         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
599           corrected comments
600         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
601           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
602           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
603           (genModOneByte): fixed warning in MSVC
604         * src/mcs51/main.c (): added comments
605         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
606
607 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
608
609         * src/SDCCmain.c (linkEdit): oops, changed one line too many
610
611 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
612
613         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
614
615 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
616
617         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
618         characters arrays of larger size than the declared one.
619
620 2005-04-10 Borut Razem <borut.razem AT siol.net>
621
622         * src/pic/gen.c (genInline),
623           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
624           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
625           (findNextInstruction), (findPrevInstruction),
626           (findInstructionUsingLabel),
627           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
628         * src/pic/pcode.c (findLabel): added missing '\n'
629         * src/src.dsp: added SDCCdwarf2.c to the project
630
631 2005-04-09 Borut Razem <borut.razem AT siol.net>
632
633         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
634
635 2005-04-08 Raphael Neider <rneider AT web.de>
636
637         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
638           into the chain after a given one) and mergeDefmapSymbols (combine
639           defmap entries for each symbol per pcode)
640         * (createDefmap): have defmap entries merged in the end
641         * (defmapReplaceSymRef): split defmap entries covering two accesses to
642           a symbol before replacing one access type's symbol, merge symbols in
643           the end (replacement symbol might already have an entry)
644         * (assignValnums): keep reference to written WREG intact
645
646 2005-04-08 Raphael Neider <rneider AT web.de>
647
648         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
649           Alpha)
650
651 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
652
653         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
654         bytes
655
656 2005-04-07 Raphael Neider <rneider AT web.de>
657
658         * device/include/pic16/usart.h: added compatibility defines for
659           devices with more than one USART
660         * device/include/pic16/pic18f[68][567]20.h: activated above defines
661
662 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
663
664         * device/lib/Makefile.in: updated for port specific include
665
666 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
667
668         * support/regression/ports/mcs51/spec.mk: added mcs51 include
669
670 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
671
672         * device/include/8051.h,
673         * device/include/8052.h,
674         * device/include/at89S8252.h,
675         * device/include/at89c55.h,
676         * device/include/at89x051.h,
677         * device/include/at89x51.h,
678         * device/include/at89x52.h,
679         * device/include/mcs51reg.h,
680         * device/include/reg51.h,
681         * device/include/reg764.h,
682         * device/include/regc515c.h,
683         * device/include/sab80515.h: (re)moved these 12 files
684         * device/include/mcs51/8051.h,
685         * device/include/mcs51/8052.h,
686         * device/include/mcs51/at89S8252.h,
687         * device/include/mcs51/at89c55.h,
688         * device/include/mcs51/at89x051.h,
689         * device/include/mcs51/at89x51.h,
690         * device/include/mcs51/at89x52.h,
691         * device/include/mcs51/mcs51reg.h,
692         * device/include/mcs51/reg51.h,
693         * device/include/mcs51/reg764.h,
694         * device/include/mcs51/regc515c.h,
695         * device/include/mcs51/sab80515.h: and added them here
696
697 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
698
699         * device/include/stdarg.h: changed SDCC specific keywords to double
700           underlined form.
701         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
702           mcs51 and ds390.
703         * device/include/hc08/mc68hc908gp32.h,
704         * device/include/hc08/mc68hc908jb8.h,
705         * device/include/hc08/mc68hc908jkjl.h,
706         * device/include/hc08/mc68hc908qy.h: fixed comments
707         * device/include/mcs51/README: updated
708         * device/include/mcs51/c8051f120.h: added PINRSF
709         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
710         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
711           amidst code. Also inline is not supported.
712
713 2005-04-06 Raphael Neider <rneider AT web.de>
714
715         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
716         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
717           callers stack/frame pointers
718
719 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
720
721         * device/include/pic16/usart.h: added, missing in previous commit,
722         * device/include/pic16/adc.h: fixed typo,
723         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
724         commit,
725         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
726         <p18fxxx.inc>
727         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
728         uninitialized because a bug appears with gplink
729         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
730         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
731         complains for unrecognised option
732
733 2005-04-05 Raphael Neider <rneider AT web.de>
734
735         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
736           structs as well (using memcpy)
737         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
738           on ISRs (GOTO has no label)
739         * src/pic16/device.h: added OF_OPTIMIZE_DF
740         * src/pic16/main.c: added compiler switch --optimize-df to enable the
741           new data flow analysis/optimization
742         * src/pic16/pcode.c: added (prototypes for and implementation of)
743           dataflow analysis functions, fixed pCodeInstructions' inCond and
744           outCond values, made RCALL a branch instruction
745         * (pic16_unlinkpCode): keep C line if possible
746         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
747           C line moved if possible
748         * (pic16_getRegFrompCodeOp): NEW, improved version of...
749         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
750           to use new pic16_getRegFrompCodeOp (works for more SFRs)
751         * (pic16_BuildFlow): fixed skip instructions with label (did not start
752           new flow)
753         * (pic16_getJumptabpCode): NEW, needed in...
754         * (LinkFlow): fixed handling of jumptables, calls and conditional
755           branches
756         * (pic16_InsertCommentAfter): NEW
757         * (pic16_pCodeReplace): made verbose and flow preserving
758         * (AnalyzeFlow): added call to data flow analysis
759         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
760         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
761         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
762
763 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
764
765         * src/SDCCast.c (decorateType): fixed bug #1105626
766
767 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
768
769         * device/include/asm/pic16/features.h,
770         * pic18f*.h headers,
771         * device/include/pic16/adc.h,
772         * device/include/pic16/delay.h,
773         * device/include/pic16/i2c.h,
774         * device/include/pic16/malloc.h,
775         * device/include/pic16/stdio.h,
776         * device/include/pic16/stdlib.h,
777         * device/include/pic16/string.h,
778         * device/lib/pic16/libc/stdio/printf_tiny.c,
779         * device/lib/pic16/libc/stdio/printf_small.c,
780         * device/lib/pic16/libc/stdio/strmgpsim.c,
781         * device/lib/pic16/libc/stdio/strmmssp.c,
782         * device/lib/pic16/libc/stdio/strmusart.c,
783         * device/lib/pic16/libc/stdio/vfprintf.c,
784         * device/lib/pic16/libc/stdlib/ltoa.c,
785         * device/lib/pic16/libc/stdlib/putchar.c,
786         * device/lib/pic16/libc/stdlib/x_ftoa.c,
787         * device/lib/pic16/libc/stdlib/memchrpgm.c,
788         * device/lib/pic16/libc/stdlib/memchrram.c,
789         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
790         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
791         * device/lib/pic16/libio/adc/adcbusy.c,
792         * device/lib/pic16/libio/adc/adcread.c,
793         * device/lib/pic16/libio/adc/adcsetch.c,
794         * device/lib/pic16/libio/usart/ubaud.c,
795         * device/lib/pic16/libio/usart/ubusy.c,
796         * device/lib/pic16/libio/usart/udrdy.c,
797         * device/lib/pic16/libio/usart/uopen.c,
798         * device/lib/pic16/libio/usart/uputc.c,
799         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
800         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
801         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
802         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
803         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
804         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
805         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
806         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
807         specific keywords to double underlined form,
808         * device/lib/pic16/libc/Makefile.rules,
809         * device/lib/pic16/libsdcc/Makefile.rules,
810         * device/lib/pic16/libm/Makefile,
811         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
812         to compile with C standard set in Makefile.common
813         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
814         rand.c and crc.c in compilation process,
815         * device/lib/pic16/libsdcc/int/divuint.c,
816         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
817         `c' from signed to unsigned,
818         * device/lib/pic16/startup/crt0.c,
819         * device/lib/pic16/startup/crt0i.c,
820         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
821         keywords to double underlined form, bug fixes in _do_cinit function
822         which prevented the correct initialization of the .idata segment,
823         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
824         core to enter a infinite loop
825         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
826
827 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
828
829         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
830
831 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
832
833         * device/include/Makefile.in: add support for hc08 subdirectory
834         * device/include/hc08/: new subdirectory
835         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
836         Lucas Loizaga, thanks!
837         * device/include/hc08/mc68hc908qy.h,
838         * device/include/hc08/mc68hc908gp32.h,
839         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
840         their own directory. Changed internal macro names to use the compiler
841         reserved namespace. Changed SDCC specific keywords to double
842         underlined form.
843         * device/include/math.h,
844         * device/include/malloc.h,
845         * device/include/stdarg.h,
846         * device/include/stdbool.h
847         * device/include/string.h,
848         * device/include/tinibios.h,
849         * device/include/ds400rom.h,
850         * device/include/8051.h,
851         * device/include/8052.h,
852         * device/include/80c51xa.h,
853         * device/include/at89c55.h,
854         * device/include/at89S8252.h,
855         * device/include/at89x51.h,
856         * device/include/at89x52.h,
857         * device/include/ds80c390.h,
858         * device/include/reg764.h,
859         * device/include/regc515c.h,
860         * device/include/sab80515.h,
861         * device/include/mcs51/c8051f000.h,
862         * device/include/mcs51/c8051f018.h,
863         * device/include/mcs51/c8051f020.h,
864         * device/include/mcs51/c8051f040.h,
865         * device/include/mcs51/c8051f060.h,
866         * device/include/mcs51/c8051f120.h,
867         * device/include/mcs51/c8051f300.h,
868         * device/include/mcs51/c8051f310.h,
869         * device/include/mcs51/c8051f320.h,
870         * device/include/mcs51/c8051f330.h,
871         * device/include/mcs51/c8051f350.h,
872         * device/include/z180.h: Changed SDCC specific keywords to double
873         underlined form.
874
875 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
876
877         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
878         18F4455,
879         * (pic16_assignConfigWordValue): disable testing of configuration
880         register value with config mask,
881         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
882         function with port->fun_prefix,
883         * (genFunction): when generating a naked interrupt function never
884         create an absolute segment placed in interrupt vector address, place
885         the actual interrupt function at IVA instead, when an interrupt
886         function is generated with unspecified interrupt then do not create
887         the absolute section,
888         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
889         code for generating a call to generic pointer get/put function with
890         a call to function pic16_callGenericPointer(),
891         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
892         the call to the generic pointer get/put functions with prefixing the
893         function name with port->fun_prefix,
894         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
895         * src/pic16/main.c (_process_pragma): prefix function with
896         port->fun_prefix,
897         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
898         calling assembler, old 18Fxxxx macro is deprecated,
899         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
900         PC_ASMDIR in while condition,
901         * (findInstruction): add PC_ASMDIR in while condition,
902         * (buildCallTree): prefix main with port->fun_prefix,
903         * (pic16_pCode2str): fixed bug that didn't emit the memory access
904         identifier for variable with banked access in instructions BTFSS,
905         BTFSC, BCF, BSF, BTG
906         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
907         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
908         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
909         perform optimization when enviroment variable NO_REG_OPT is set,
910         * (insideLRBlock): NEW, return 1 if register is inside an
911         INF_LOCALREGS block,
912         * (RemoveRegFromLRBlock): remove a register that is completely
913         eliminated by register optimization, but it is still left in local
914         register store/restore in/from stack block,
915         * (Remove2pcodes): after removing register, check to see if it
916         should be removed from local register store/restore in/from stack
917         block,
918         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
919         DUMMY_READ_VOLATILE,
920
921         * device/include/pic16/adc.h: minor prototype modifications and
922         update,
923         * device/include/pic16/malloc.h: added GPL notice various
924         modifications,
925         * device/include/pic16/stdint.h: NEW, standard header for ints
926         * device/include/pic16/delay.h: NEW, header for delay functions,
927         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
928         delay1mtcy,
929         * device/include/pic16/signal.h: NEW, header providing helper macros
930         for implementing signal handlers,
931         * device/include/pic16/stdio.h: added prototypes for functions,
932         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
933         prototypes for stdin and stdout, added macro PUTCHAR to
934         automatically implement putchar function prototype,
935         * device/include/pic16/usart.h: modified and updated USART library,
936         * device/lib/pic16/libio/adc/,
937         * device/lib/pic16/libio/i2c: some modifications to improve library
938         performance,
939         * device/lib/pic16/libc/stdio/: modifications for the new printf*
940         family of functions,
941         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
942         family of functions and other sources,
943         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
944         of the PIC18Fxx[28] devices,
945         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
946         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
947         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
948         _do_cinit function, because the previous failed when local variables
949         where not placed in the same memory bank,
950         * device/lib/pic16/libsdcc/char/: various modifications to improve
951         library performance,
952         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
953         information on the new functions of the c library and more...
954
955 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
956
957         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
958
959 2005-03-26 Raphael Neider <rneider AT web.de>
960
961         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
962           if condition == CARRY)
963         * (genCmp): adapted to new genSkipc semantics
964         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
965           on rIfx (genCmp was broken)
966
967 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
968
969         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
970         * src/z80/main.c (_keywords[]),
971         * src/SDCCglobal.h (struct options),
972         * src/SDCC.y,
973         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
974         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
975         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
976         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
977         always available in leading double underscore form. The C99 support is
978         mostly missing, but it's a start.
979         * support/regression/tests/bug-227710.c: fixed nonconforming use of
980         reserved identifier "__data".
981
982 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
983
984         * src/mcs51/peeph.def: fixed bug 1170013
985
986 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
987
988         * device/include/mcs51reg.h: fixed bug 842007
989
990 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
991
992         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
993         last time.
994
995 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
996
997         * src/port.h (struct PORT),
998         * src/avr/ralloc.c (avr_assignRegisters),
999         * src/avr/main.c,
1000         * src/ds390/ralloc.c (ds390_assignRegisters),
1001         * src/ds390/main.c,
1002         * src/hc08/ralloc.c (hc08_assignRegisters),
1003         * src/hc08/main.c,
1004         * src/mcs51/ralloc.c (mcs51_assignRegisters),
1005         * src/mcs51/main.c,
1006         * src/pic/ralloc.c (pic14_assignRegisters),
1007         * src/pic/main.c,
1008         * src/pic16/ralloc.c (pic16_assignRegisters),
1009         * src/pic16/main.c,
1010         * src/xa51/ralloc.c (xa51_assignRegisters),
1011         * src/xa51/main.c,
1012         * src/z80/ralloc.c (z80_assignRegisters),
1013         * src/z80/ralloc.h,
1014         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
1015         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
1016         * src/SDCCcse.h,
1017         * src/SDCCdflow.c (computeDataFlow),
1018         * src/SDCCdflow.h,
1019         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
1020         * src/SDCCloop.h,
1021         * src/SDCCcflow.c (*),
1022         * src/SDCCcflow.h,
1023         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
1024         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
1025         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
1026         immedDom() returning wrong block; probably fixes bug #1160833)
1027
1028 2005-03-20 Borut Razem <borut.razem AT siol.net>
1029
1030         * support/scripts/inc2h.pl: WIN32 port
1031
1032 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
1033
1034         * device/lib/makefile.in: added abs.c and labs.c
1035
1036 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
1037
1038         * device/include/stdint.h: added
1039         * device/lib/abs.c: added
1040         * device/lib/labs.c: added
1041         * device/include/stdlib.h: added abs() and labs() prototypes
1042         * device/lib/libsdcc.lib: added abs and labs
1043         * device/include/float.h,
1044         * device/lib/_fsmul.c,
1045         * device/lib/printf_fast.c,
1046         * device/lib/printf_tiny.c: updated comments
1047
1048 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1049
1050         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
1051         bug #1164313
1052
1053 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1054
1055         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
1056         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
1057
1058 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
1059
1060         * device/lib/printf_large.c: removed inline assembly for portability and
1061           readability. Use printf_fast if speed or size are more important.
1062         * src/pic16/gen.c: removed conditions around use of DEBUGpc
1063         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
1064
1065 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
1066
1067         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
1068         prevent compiler warning
1069
1070 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
1071
1072         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
1073         moved to level 0 and declared as static. Also they are explicit
1074         placed in access bank. This was necessery because some times they
1075         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
1076         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
1077         optimizations. Currently only compare to unsigned char is implemented,
1078         * src/pic16/gen.c: added fReturnIdx array,
1079         * (struct resolvedIfx) is moved to gen.h and made public,
1080         * (struct _G): added sregsAlloc and sregsAllocSet fields,
1081         * (aopForSym): added an optimization to directly store in stack of
1082         the operand of a SEND iCode,
1083         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
1084         but as registers instead (AOP_REG) using the fReturnIdx array,
1085         * (pic16_freeAsmop): remove the freed register from the
1086         _G.sregsAlloc field,
1087         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
1088         a compare of 'WREG',
1089         * (pic16_popGetTempRegCond): changed function prototype, now
1090         function takes also a bitVector argument v which holds the current
1091         set of registers that are allocated for stack access by aopForSym,
1092         registers allocated in aopForSym for accessing stack symbols are not
1093         any more part of the functions usedRegs field,
1094         * (genCall): some times aopOp is called for a stack variable to be
1095         send, aopForSym might perform the push, if this is true make sure
1096         that genCall doesn't push the variable twice by testing _G.resDirect,
1097         * (genFunction): changed testing for unspecified interrupt number
1098         from 256 to INTNO_UNSPEC,
1099         * modified selection scheme of frame pointer generation. Previously
1100         if function did use local registers a frame pointer was generated,
1101         now a frame pointer is generated only if function has arguments
1102         (that need PLUSW2 register access), or has stack arguments, or the
1103         compiler is not instructed to omit the frame pointer,
1104         * (genEndFunction): before restoring local registers that were saved
1105         in the function preamble, also restore the registers that *might*
1106         have been allocated for stack access,
1107         * (genRet): removed some old comments,
1108         * (genCmp, the active (RN's) version): added a call to the
1109         pic16_genCmp_special function to perform the compare with a more
1110         robust and optimized way,
1111         * (genInline): a feature has been added in inline code generation,
1112         which allows a wildcard variable substitution when writing inline
1113         assembly. Code is incomplete and experimental therefore undocumented,
1114         * (genCast): changed order of aopOp for result and right to allow
1115         aopForSym to directly load the result if possible,
1116         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
1117         perform an optimized compare on some selected special occasions,
1118         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
1119         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
1120         generate an IVT any more,
1121         * src/pic16/main.c (pic16_optionsTable): added command line option
1122         --optimize-cmp,
1123         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
1124         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
1125         macros,
1126         * src/pic16/NOTES: Raphael Neider added in list of active developers
1127         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
1128         jumptable_end to prevent bug #,
1129         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
1130         inCond and outCond fields,
1131         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
1132         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
1133         turn off register spilling,
1134         * (packRegsForOneUse): synced with other ports' versions although it
1135         is not used currently,
1136         * (pic16_packRegisters): added an optimization while reading
1137         structure bitfields, some registers may be saved (malloc code is
1138         decreased by 80 bytes)
1139
1140 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
1141
1142         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
1143         left is a bitfield, if yes, then don't optimize assignment. Perhaps
1144         this can be optimized more?
1145
1146 2005-03-10 Raphael Neider <rneider AT web.de>
1147
1148         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
1149           genNearPointerGet): (hopefully) fixed access to bitfields via
1150           pointers (p->bitN = x; and x = p->bitN; failed)
1151
1152 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
1153
1154         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
1155
1156 2005-03-09 Raphael Neider <rneider AT web.de>
1157
1158         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
1159
1160 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
1161
1162         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
1163         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
1164           (regTypeNum): set REG_BIT type if necessary
1165         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
1166         * support/regression/tests/critical.c: check bug 1144613
1167
1168 2005-03-02 Raphael Neider <rneider AT web.de>
1169
1170         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
1171
1172 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1173
1174         * src/avr/ralloc.c (serialRegAssign),
1175         * src/ds390/ralloc.c (serialRegAssign),
1176         * src/hc08/ralloc.c (serialRegAssign),
1177         * src/mcs51/ralloc.c (serialRegAssign),
1178         * src/pic/ralloc.c (serialRegAssign),
1179         * src/pic16/ralloc.c (serialRegAssign),
1180         * src/xa51/ralloc.c (serialRegAssign),
1181         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
1182
1183 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
1184
1185         * src/SDCCast.c (decorateType): fixed bug 1124787
1186
1187 2005-02-20 Hubert Sack <sack AT digiplan.de>
1188         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1189
1190         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
1191         patch #1121755
1192
1193 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1194
1195         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
1196         to keep the correct label reference count when adding/removing references
1197         to labels. A peephole file using this is appended to patch #1144962.
1198
1199 2005-02-14 Raphael Neider <rneider AT web.de>
1200
1201         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
1202         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
1203         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
1204           retrievals of result operand's value on assignment
1205
1206 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
1207
1208         * device/include/pic16/string.h: modified prototype for memccpy()
1209         to memccpy(void *, void *, char, size_t)
1210         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
1211         check whether to omit frame pointer or not,
1212         * (genInline): convert all occurences of "\n" to LF in inline
1213         assembler blocks, this helps formatting the inline text,
1214         * (pic16_loadFSR0): modified prototype,
1215         * (genNearPointerGet, genNearPointerSet): reorganization of code,
1216         removed some 8051 legacy code,
1217         * (genPackBits): enabled handling bitfields exceeding one byte in size,
1218         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
1219         before allocating temporary registers in functions,
1220
1221 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
1222
1223         * support/regression/tests/bitvars.c: corrected the "fix"
1224
1225 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
1226
1227         * support/regression/tests/bitvars.c,
1228         * support/regression/tests/bitwise.c,
1229         * support/regression/tests/rotate.c: "fixed" problems on Alpha
1230
1231 2005-02-10 Raphael Neider <rneider AT web.de>
1232
1233         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
1234           different size for Alpha
1235         * src/pic16/gen.c (genCmpEq) : improved compare with 0
1236
1237 2005-02-09 Raphael Neider <rneider AT web.de>
1238
1239         * src/SDCC.lex(doPragma) : save and restore warning options as well
1240           (also added new stack plus clone- and copyAndFreeSDCCERRG())
1241         * have #pragma less_pedantic set the errorlevel to WARNING
1242           (fixes #1117001)
1243         * (cloneOptimize) : fixed wrong malloc's size
1244         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
1245           facilitate correct handling of #pragma (save|restore)
1246
1247 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
1248
1249         * src/mcs51/gen.c: removed non-standard C nameless struct/union
1250
1251 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
1252
1253         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
1254
1255 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
1256
1257         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
1258
1259 2005-02-02 Raphael Neider <rneider AT web.de>
1260
1261         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
1262         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
1263         * (pic16_storeForReturn): fixed to allow returning function pointers
1264         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
1265         * device/include/pic16/{stddef.h,stdbool.h}: added
1266
1267 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
1268
1269         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
1270
1271 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
1272
1273         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
1274         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
1275          appeared to be required
1276
1277 2005-01-31 Borut Razem <borut.razem AT siol.net>
1278
1279         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
1280           include/mcs51 and include/z80 directories to the package
1281
1282 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1283
1284         * src/hc08/gen.c (genFunction): fixed bug #1112752
1285
1286 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1287
1288         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
1289
1290 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1291
1292         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
1293
1294 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
1295
1296         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
1297
1298 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
1299
1300         * device/include/c8051fxxx.h: removed these 6 files
1301         * device/include/mcs51/c8051fxxx.h: added these 11 new files
1302
1303 2005-01-26 Raphael Neider <rneider AT web.de>
1304
1305         * src/pic16/gen.c (genAssign): fixed assignment from longs
1306           in codespace (were cut to three bytes)
1307         * (genDummyRead): implemented (except for CODESPACE...),
1308           fixed bug #1108575
1309         * src/pic16/glue.c (emitStatistics): beautified
1310         * device/lib/pic16/libm/Makefile: added include path
1311
1312 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1313
1314         * src/z80/gen.c (aopPut): fixed bug #1103902
1315
1316 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1317
1318         * device/lib/expf.c: fixed bug #1095792
1319
1320 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
1321
1322         * device/lib/pic16/libm: added Math library sources
1323
1324 2005-01-24 Raphael Neider <rneider AT web.de>
1325
1326         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
1327           to enable upcast to pCodeOpReg2 (there is no type tag to
1328           differenciate the two and pic16_popGet2p cast into PCOR2)
1329         * src/pic16/main.c (_process_pragma): fixed another malloc bug
1330           (sizeof(sectNames) changed to sizeof(sectName))
1331           Both patches fix segfaults under MinGW.
1332
1333 2005-01-23 Raphael Neider <rneider AT web.de>
1334
1335         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
1336           Safe_[mc]?alloc()'ed variables
1337         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
1338           of (byte sized) temporaries (assign them to WREG for now)
1339         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
1340           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
1341           this might fix SIGSEGVs on MinGW...
1342         * src/SDCCopt.c (killDeadCode): restored original behaviour
1343           (volatile operands might get thrown away though)
1344
1345 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
1346
1347         * src/pic16/gen.c: fixed bug #1106975,
1348         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
1349         pointer update, INTCON is saved, global interrupts are disabled and
1350         restored after updateing TOS.
1351         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
1352         * added function attribute 'shadowregs' to take advantage of shadow
1353         registers,
1354         * added function attribute 'wparam' as an alternative to the wparam
1355         pragma,
1356         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
1357         user declares a non-ISR function as 'shadowregs',
1358         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
1359
1360 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
1361
1362         * .version: bumped version number to 2.4.8
1363         * device/lib/pic16/pics.all: list of PIC18F devices supported by
1364         pic16 port,
1365         * device/lib/pic16/libio/i2c/: I2C module support library,
1366         * device/include/pic16/i2c.h: I2C support library header,
1367         * device/lib/pic16/libc/stdio/: standard IO support sources,
1368         * (printf_small.c): printf_small() source, supports float print,
1369         * (printf_tiny.c): printf_tiny() source, does not support floats,
1370         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
1371         enable global optimizations for entire library source, other
1372         Makefiles in the source tree are also modified to reflect this,
1373         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
1374         function,
1375         * doc/sdccman.lyx: updated to reflect new changes,
1376         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
1377         sym->onStack if-case,
1378         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
1379         sbit, idata, _idata, xdata, _xdata,
1380         * added pragma library, to link an external library, (see doc),
1381         * removed command line options, --pomit-config-words, --pomit-ivt,
1382         --pleave-reset-vector,
1383         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
1384         when calling assembler to reflect memory model used, also define
1385         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
1386         reflect stack model used,
1387         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
1388         on stack return NULL,
1389
1390 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1391
1392         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
1393           of the operands is volatile. Fixes #1020220
1394
1395 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1396
1397         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
1398         * (OptimizeRegUsage): make sure that there is really no other flow where
1399           the first pCode is used
1400
1401 2005-01-22 Raphael Neider <rneider AT web.de>
1402
1403         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
1404           to fix #1106967 (pCode->seq are not set up correctly)
1405
1406 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1407
1408         * src/SDCCglue.c (glue): make sure code area is declared before the
1409         static initialization area.
1410
1411 2005-01-21 Raphael Neider <rneider AT web.de>
1412
1413         * device/lib/Makefile.in: fixed test for pic16 install dir
1414         * device/lib/pic16/*/Makefile*: modified compile flags to enable
1415           optimizations
1416         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
1417           added --optimize-goto compiler switch and pragma wparam documentation
1418         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
1419         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
1420           and PRODH closing bug #1071770 (peephole optimizer)
1421
1422 2005-01-19 Raphael Neider <rneider AT web.de>
1423
1424         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
1425           cmdLine buffers (used when calling sdcpp...) are large enough
1426           (MAX_PATH=256 truncates arguments leading to system halts when
1427           used in MinGW...)
1428         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
1429         * (genUminus): rewritten to for efficiency
1430         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
1431           used uninitialized in some cases)
1432         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
1433           copy the third byte from the int -- now assumes 0x80 (data memory)
1434         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
1435           operands (genAddLit expects the iCode's operands to swapped as
1436           well), fixed leftover bytes (crashed for short left operands)
1437         * (pic16_genMinusDec): performance improvements, removed false
1438           PIC14 emitSKPNCs
1439         * (pic16_genMinus): fixed to cope with differently sized operands
1440         * src/pic16/glue.c (pic16_glue): added new banksel optimization
1441           for --obanksel > 1
1442         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
1443         * src/pic16/graph.[ch]: implementation of directed graphs, used by
1444           new banksel optimization
1445         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
1446           analysis for temporary registers (segfaults...)
1447         * src/pic16/peeph.def: added rule
1448
1449 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
1450
1451         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
1452         which converts a float number to its ASCII representation
1453         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
1454         functions to convert the fractional and integer part of a float to ASCII,
1455         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
1456         realloc.c): added _MALLOC_SPEC to explicit place variables in data
1457         ram
1458         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
1459         _STATMEM macros,
1460         * device/include/pic16/adc.h: added GPL info,
1461         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
1462         a pCodeOp as tested operand,
1463         * (genNearPointerGet): optimized bit testing, does not use
1464         intermediate register for bit value, test directly instead with
1465         BTFSS, BTFSC, works only for single bits,
1466         * (genpic16Code): dump the name of the iCode in the asm,
1467         * src/pic16/ralloc.c (decodeOp): removed static declaration and
1468         renamed to pic16_decodeOp,
1469         * (serialRegAssign): do not allocate a temporary register for iCode
1470         sequences that test a single bit for 1/0
1471
1472 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
1473
1474         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
1475         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
1476         access stack and frame pointers. They are initially assigned to
1477         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
1478         accessing SFRs. Updated all occurences of modification of stack or
1479         frame pointer in gen.c and pcode.c,
1480         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
1481         assigning of a literal value to pointers,
1482         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
1483         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
1484         selected
1485
1486 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
1487
1488         * doc/sdccman.lyx: update documentation about stack pragma, added
1489         some info for stack memory models
1490
1491 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1492
1493         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
1494
1495 2005-01-08 Raphael Neider <rneider AT web.de>
1496
1497         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
1498           udata sections to fix bug #1097823
1499
1500 2005-01-05 Raphael Neider <rneider AT web.de>
1501
1502         * src/pic16/gen.c (genGenericShift): added handling of differently
1503           sized left operand and result
1504
1505 2005-01-04 Raphael Neider <rneider AT web.de>
1506
1507         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
1508         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
1509           to hold the condition bit)
1510         * added new version of genCmp (old code available via #define)
1511         * added new version of genShiftLeft/genShiftRight in a generic
1512           way, now supports shifting by negative values
1513         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
1514           shiftCount (expected by genGenericShift)
1515         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
1516         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
1517           dump
1518         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
1519           is an invalid literal too...)
1520
1521 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
1522
1523         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
1524         from Raphael Neider,
1525         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
1526         for 8-bit literals. This fixes some literal operands which are sign
1527         extended to 16-bits ints when instruction needs only 8-bits.
1528
1529 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
1530
1531         * device/lib/logf.c: added mcs51 assembly version
1532         * device/lib/expf.c: added mcs51 assembly version
1533         * device/lib/_logexpf.c: new shared asm code for expf and logf
1534         * device/include/math.h: add defines for assembly math library
1535         * device/lib/Makefile.in: build new _logexpf.c
1536         * device/lib/libfloat.lib: use new _logexpf.c
1537
1538 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1539
1540         * src/pic/device.c
1541         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
1542           device types which have less than 0x7f registers.
1543
1544 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1545
1546         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
1547
1548 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
1549
1550         * device/lib/printf_fast.c: only build on supported arch.
1551         * device/lib/printf_tiny.c: only build on supported arch.
1552         * device/lib/printf_fast_f.c: only build if asm float lib
1553         * device/lib/_fsget1arg.c: only build if asm float lib
1554         * device/lib/_fsget2args.c: only build if asm float lib
1555         * device/lib/_fsnormalize.c: only build if asm float lib
1556         * device/lib/_fsreturnval.c: only build if asm float lib
1557         * device/lib/_fsrshift.c: only build if asm float lib
1558         * device/lib/_fsswapargs.c: only build if asm float lib
1559         * device/include/stdio.h: don't provide print_fast,
1560           print_fast_f, print_tiny prototypes if --xstack used
1561
1562 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
1563
1564         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
1565         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
1566           to the SOURCES
1567
1568 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
1569
1570         * device/lib/printf_fast_f.c: same as printf_fast, but
1571           with floating point enabled
1572         * device/lib/printf_fast.c: minor tweaks
1573         * device/include/stdio.h: add printf_fast_f
1574
1575 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
1576
1577         * src/SDCCmain.c: make --float-reent default for mcs51
1578         * device/lib/_fsadd.c: added mcs51 assembly version
1579         * device/lib/_fssub.c: added mcs51 assembly version
1580         * device/lib/_fsmul.c: added mcs51 assembly version
1581         * device/lib/_fsdiv.c: added mcs51 assembly version
1582         * device/lib/_fseq.c: added mcs51 assembly version
1583         * device/lib/_fsneq.c: added mcs51 assembly version
1584         * device/lib/_fsgt.c: added mcs51 assembly version
1585         * device/lib/_fslt.c: added mcs51 assembly version
1586         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
1587         * device/lib/Makefile.in: add _fscmp to build
1588         * device/lib/libfloat.lib: add _fscmp to build
1589
1590 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
1591
1592         * device/lib/_fs2slong.c: added mcs51 assembly version
1593         * device/lib/_fs2sint.c: added mcs51 assembly version
1594         * device/lib/_fs2schar.c: added mcs51 assembly version
1595         * device/lib/_fs2ulong.c: added mcs51 assembly version
1596         * device/lib/_fs2uint.c: added mcs51 assembly version
1597         * device/lib/_fs2uchar.c: added mcs51 assembly version
1598         * device/lib/_slong2fs.c: added mcs51 assembly version
1599         * device/lib/_sint2fs.c: added mcs51 assembly version
1600         * device/lib/_schar2fs.c: added mcs51 assembly version
1601         * device/lib/_ulong2fs.c: added mcs51 assembly version
1602         * device/lib/_uint2fs.c: added mcs51 assembly version
1603         * device/lib/_uchar2fs.c: added mcs51 assembly version
1604         * device/include/float.h: added #define to select asm vs c
1605
1606 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
1607
1608         * device/lib/printf_fast.c: improvements to float output
1609         * device/include/float.h: add defines for assembly float library
1610         * device/lib/_fsget1arg.c: receive 1 float arg
1611         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
1612         * device/lib/_fsnormalize.c: normalize a float
1613         * device/lib/_fsreturnval.c: return float, various helper routines
1614         * device/lib/_fsrshift.c: right shift a float's mantissa
1615         * device/lib/_fsswapargs.c: swap 2 floats
1616         * device/lib/Makefile.in: build these 6 new files for mcs51
1617         * device/lib/libfloat.lib: add these 6 files to the library
1618
1619 2004-12-26 Borut Razem <borut.razem AT siol.net>
1620
1621         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
1622           built by gcc 3.4.2
1623
1624 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
1625
1626         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
1627           and fully reentrant and register bank neutral.
1628         * device/lib/printf_fast.c: added float (not enabled by default),
1629           added compact/slower integer (also not enabled by default),
1630           improved size/speed of fast integer code, other minor changes
1631         * device/include/stdio.h, device/lib/Makefile.in,
1632           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
1633
1634 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
1635
1636         * src/pic16/pcode.c: declaring variables other than at the start of a
1637           block is not supported in C by VC6.
1638
1639 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
1640
1641         * applied a previous patch from Raphael Neider that wasn't included
1642         in the previous commits, which fixes infinite loops within jumptable
1643         improvements,
1644         * made some fixes that previous patches introduced
1645
1646 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
1647
1648         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
1649         that fixes an issue with AOP_PCODE asmop's offset,
1650         * (pic16_popCopyReg): update instance field too,
1651         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
1652         function of pic port,
1653         * (genCmp, genAnd, genAssign),
1654         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
1655
1656 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
1657
1658         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
1659         variables initial values to idata section,
1660         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
1661         variables in some functions. This utilizes parmBytes field of iCode
1662         structure to hold the offset of the variable in stack. (might be
1663         able to use the stack field too?)
1664         * applied patch from Raphael Neider # ### , # ###
1665         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
1666         variable initial values in idata section,
1667         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
1668         for static variables with initial value
1669         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
1670         applied fix in while loop from Raphael Neider.
1671
1672 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
1673
1674         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
1675         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
1676         * src/ds390/ralloc.c (serialRegAssign): spill bits
1677         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
1678         * support/Util/SDCCerr.c,
1679         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
1680         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
1681         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
1682
1683 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
1684
1685         * device/include/sdcc-lib.h: inserted LGPL, added includes
1686           asm/ds390/features.h and asm/mcs51/features.h
1687         * device/include/asm/default/features.h,
1688         * device/include/asm/gbz80/features.h,
1689         * device/include/asm/z80/features.h: added empty _AUTOMEM
1690           and _STATMEM
1691         * device/include/asm/ds390/features.h,
1692         * device/include/asm/mcs51/features.h: added files with defines for
1693           _AUTOMEM and _STATMEM indicating automatic and static storage class
1694         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
1695         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
1696         * src/SDCCicode.c (geniCodeCast),
1697         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
1698         * src/SDCCloop.c (loopInduction): removed unused variable lr
1699         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
1700           to convertToFcall to include char modulo (RFE 1065037), added check
1701           if left operand is unsigned and use abs of literal value
1702         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
1703           as it doesn't work after conversion from peephole.def to peephole.rul
1704         * src/mcs51/gen.c (toBoolean): added check for size,
1705           (genModOneByte): optimized code for signed char modulo a literal
1706           power of 2 (thanks to Hubert Sack),
1707           (genRRC): removed unnecessary "clr c",
1708           (genRLC): replaced "add a,acc" with cheaper "rlc a"
1709         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
1710           jump optimization,
1711           swapped rules 256.c and 256.d,
1712           extended 256.d by using new multiple checks (thanks Erik),
1713           added rules 256.e and 256.f,
1714           updated rule 261.a and 261.b to new generated code
1715         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
1716
1717 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1718
1719         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
1720           induction related bugs, including first part of bug #1074377
1721
1722 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
1723
1724         * applied patch from bug-report #1076292,
1725         * applied patches for genAnd and Goto-optimizations for Raphael
1726         Neider,
1727         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
1728         dump a less iCode information,
1729         * src/pic16/device.h (pic16_options_t): added field debgen,
1730         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
1731         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
1732         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
1733         puclic,
1734         * (various functions): added macros FENTRY and FENTRY2 to functions,
1735         to emit function prologue,
1736         * (various functions): fixed indentation,
1737         * (genNearPointerGet): fixed loading of FSR0,
1738         * (genPackBits): applied patch from Raphael Neider to fix updating
1739         of FSR0 and touching only the modified bits,
1740         * src/pic16/genarith.c (various functions): added macros FENTRY to
1741         emit function prologue in comments,
1742         * src/pic16/pcode.h: added functions debugf2, debugf3,
1743         * src/pic16/ralloc.c: partial fix for packForPush caused
1744         segmentation fault,
1745
1746 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1747
1748         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
1749           <stsp AT users.sourceforge.net> with reversed byte order
1750         * support/regression/tests/rotate.c: added (ds390 skips some tests)
1751
1752 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1753
1754         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
1755           bug #1074377
1756         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
1757         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
1758
1759 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
1760
1761         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
1762
1763 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1764
1765         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
1766           conditions,
1767           (setFromConditionArgs): friendly operand parser for peephole rules,
1768           (operandBaseName, operandsNotRelated): new peephole condition
1769           "operandsNotRelated" -- similar to "operandsNotSame", but takes
1770           architecture specific register naming into account, handles n-way
1771           comparisons, and supports quoted literals
1772         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
1773
1774 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1775
1776         * src/mcs51/peeph.def: fixed bug #1076940
1777
1778 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
1779
1780         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
1781
1782 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1783
1784         Adding support for replacing ljmps with sjmps in jumptables
1785         generated for switch statements. For now you need to set the
1786         environment variable SDCC_SJMP_JUMPTABLE to enable this.
1787         Now 4 algorithms for mcs51 jumptable generation are used:
1788         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
1789         addresses loaded pc-relative for up to 112 cases and stack-pushing
1790         target addresses loaded with offset from dptr for up to 256 cases.
1791
1792         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
1793         * src/mcs51/main.c: adapted constants for switch table generation
1794         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
1795
1796 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
1797
1798         * device/lib/printf_large.c (_print_format): fixed bug 1073386
1799         * support/regression/tests/bug1057979.c: added test for bug 1073386
1800
1801 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
1802
1803         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
1804         compilers
1805
1806 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
1807
1808         * src/pic16/device.h,
1809         * src/pic16/genarith.c,
1810         * src/pic16/glue.c,
1811         * src/pic16/main.c,
1812         * src/pic16/pcode.c: applied patches #1068154 and #1070213
1813
1814 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
1815
1816         Large cummulative patch for pic16 port.
1817         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
1818         to call when a stack overflow occurs,
1819         * (malloc.h): added CVS Id tag,
1820         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
1821         variable,
1822         * added libc directory. The current version of LibC contains string
1823         functions, ctype functions and macros and some functions of the
1824         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
1825         be extensively tested in the future. Standard disclaimer here.
1826         Library is not automatically build yet. But one can build it by
1827         invoking 'make' inside the libc directory.
1828         * added ADC library under libio. Preliminary version yet.
1829
1830         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
1831         * src/pic16/gen.c (aopForRemat): asmop size is filled by
1832         aopForRemat() now and not by pic16_aopOp(),
1833         * (pic16_popGetTempReg): removed warning messgae when allocating
1834         temporary registers, its a buggy feature and will be removed,
1835         * (pic16_popGet): set register instance field in AOP_CRY,
1836         * (pic16_outBitC): fixed for results in size greater than 1,
1837         * (genUminusFloat): fixed for pic16, ported code from mcs51,
1838         * (pic16_storeForReturn): optimized return of 0,
1839         * (genCmp): experimental code for new genCmp which uses PIC18's
1840         special compare&skip instructions. Initial tests fail some times
1841         with variables grater than 1 byte in size, so new code is disabled,
1842         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
1843         a single bit,
1844         * (genCast): began a fix to optimize the casting of a bit to another
1845         bit, now assigning a bitfield to another bitfield will fail, sorry,
1846         * src/pic16/main.c: disabled the use of lr-support feature,
1847         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
1848         * added some function prototypes, added function _debugf prototype,
1849         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
1850         bits with offset (case PO_GPR_BIT),
1851         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
1852         command line,
1853         * (isBankInstruction): modified to return 0 for no banking instruction,
1854         and 1 for banking instruction,
1855         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
1856         caused stop processing pCodes after a inline assembly block,
1857         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
1858         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
1859         registers when it shouldn't,
1860         * src/pic16/ralloc.c (allocReg): add preliminary support for
1861         supporting a limited set of temporary registers,
1862
1863 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1864
1865         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
1866           genDataPointerSet): ensure assignments always copy in MSB to LSB
1867           order,
1868           (loadRegFromAop): recognize CLRH optimization,
1869           (genFunction): optimize RECEIVE iCodes in reentrant functions
1870
1871 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1872
1873         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
1874           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
1875           selected.
1876         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
1877         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
1878           contiguous with data
1879
1880 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1881
1882         * device/lib/_gptrget.c (_gptrget),
1883         * device/lib/_gptrgetc.c (_gptrgetc),
1884         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
1885           instead of sjmp to ret
1886         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
1887           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
1888
1889 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
1890
1891         * .version: bumped version to 2.4.7
1892         * device/lib/_gptrget.c (_gptrget): is now _naked
1893         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
1894         * device/lib/_gptrput.c (_gptrput): is now _naked
1895         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
1896           (createFunction): fixed xstack
1897         * src/SDCCglue.c (emitMaps): set allocation required for bit area
1898         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
1899           or bit either,
1900           (geniCodeCritical): store original interrupt state in an iTemp bit
1901           var unless stack-auto
1902         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
1903         * src/SDCCmain.c (setIncludePath): added include/target to search path
1904         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
1905         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
1906           prototype,
1907           (processFuncArgs): put bit vars in bit area
1908         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
1909           unsaveRBank): fixed xstack,
1910           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
1911           (genFunction, genEndFunction): fixed xstack,
1912           (genAssign): optimization don't walk backwards through mem
1913         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
1914         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
1915         * support/regression/Makefile: also make library (for stack-auto) when
1916           making "all" and added "test-mcs51-xstack-auto"
1917         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
1918         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
1919         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
1920         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
1921         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
1922           make-library by MAKE_LIBRARY
1923         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
1924           regression tests for xstack
1925         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
1926         * support/regression/tests/critical.c: test for critical on mcs51
1927
1928 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1929
1930         * support/regression/ports/ucz80/spec.mk: use include and lib files from
1931           built version of sdcc instead of installed version
1932
1933 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1934
1935         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
1936         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
1937           vprintf.c now
1938         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
1939         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
1940           WARNING: remove device/lib/build/z80/printf.o by hand when
1941           updating from previous build!
1942         * device/lib/z80/printf.c: updated comment
1943         * support/regression/tests/bug1057979.c: test all ports now
1944         * support/regression/tests/bug1065458.c: file added
1945
1946 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1947
1948         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
1949           *_start and *_end symbols for static functions
1950
1951 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
1952
1953         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
1954           and search crt0.o in all library paths,
1955           (setIncludePath): proper handling of --nostdinc,
1956           (setLibPath): proper handling of --nostdlib
1957         * support/regression/Makefile,
1958         * support/regression/ports/ds390/spec.mk,
1959         * support/regression/ports/gbz80/spec.mk,
1960         * support/regression/ports/hc08/spec.mk,
1961         * support/regression/ports/mcs51/spec.mk,
1962         * support/regression/ports/mcs51-large/spec.mk,
1963         * support/regression/ports/mcs51-stack-auto/spec.mk,
1964         * support/regression/ports/z80/spec.mk: use include and lib files from
1965           built version of sdcc instead of installed version
1966         * doc/sdccman.lyx: fixed typo in --nostdinc
1967
1968 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
1969
1970         * src/pic/pcode.c,
1971         * src/pic/device.c,
1972         * src/pic/ralloc.c,
1973         * src/pic/gen.c : added support to generate code for struct bit fields.
1974
1975 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
1976
1977         * as/xa51/xa_version.h,
1978         * device/include/errno.h,
1979         * device/include/regc515c.h,
1980         * device/lib/_itoa.c,
1981         * device/lib/_ltoa.c,
1982         * device/lib/ser_ir_cts_rts.c,
1983         * sim/ucsim/xa.src/glob.cc,
1984         * sim/ucsim/xa.src/inst_gen.cc,
1985         * sim/ucsim/xa.src/xa_bit.cc,
1986         * sim/ucsim/xa.src/xa_sfr.cc,
1987         * sim/ucsim/z80.src/inst_dd.cc,
1988         * sim/ucsim/z80.src/inst_fdcb.cc,
1989         * support/scripts/keil2sdcc.pl,
1990         * src/pic16/pic16.dsp,
1991         * src/pic16/pic16a.dsp: corrected cvs line endings
1992         * device/lib/printf_large.c: fixed bug 1057979
1993         * src/pic16/gen.c: fixed non-C standard code
1994         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
1995         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
1996         * support/regression/ports/mcs51/support.c: reload T1 asap
1997         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
1998           pdata use and clear idata startup behaviour
1999         * support/regression/tests/bug1057979.c: added
2000
2001 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
2002
2003         * device/examples/ds390/ow390/ad26.h,
2004         * device/examples/ds390/ow390/cnt1d.h,
2005         * device/examples/ds390/ow390/crcutil.c,
2006         * device/examples/ds390/ow390/ownet.h,
2007         * device/examples/ds390/ow390/owsesu.c,
2008         * device/examples/ds390/ow390/swt12.h,
2009         * device/examples/ds390/ow390/swtoper.c,
2010         * device/examples/ds390/ow390/temp10.h,
2011         * device/examples/ds390/ow390/thermodl.c,
2012         * device/examples/ds390/tinitalk/tinitalk.dsp,
2013         * device/examples/ds390/tinitalk/tinitalk.dsw,
2014         * device/examples/mcs51/clock/hw.h,
2015         * device/examples/mcs51/simple2/go.bat,
2016         * device/examples/serialcomm/windows/serial.h,
2017         * device/examples/xa51/dummy.c,
2018         * device/examples/xa51/hello.c,
2019         * device/include/80c51xa.h,
2020         * device/include/at89x051.h: corrected cvs line endings
2021
2022 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
2023
2024         * src/pic16/main.c (options): added command line --gstack, to trace
2025         stack over/under flows,
2026         * added pragma 'wparam' to allow passing first byte of function
2027         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
2028         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
2029         call to __gstack_test function and sets up the symbol as extern,
2030         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
2031         * popaop): added call to pic16_testStackOverflow,
2032         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
2033         wparamList list,
2034         * (genCall, genPcall): now all parameters are passed via stack
2035         except in functions that are pass to wparam pragma in which WREG is
2036         used too,
2037         * (genPcall): REENTRANT flag is checked to see if variable prototype
2038         contains reentrant keyword, don't call a non-reentrant function, via
2039         a reentrant function pointer or vice versa, functions are never
2040         passed via WREG,
2041         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
2042         D.Winkler,
2043         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
2044         SIGSEGV when accessing a NULL register stucture,
2045         * (pic16_printGPointerType): modified to handle UPPER modifier for
2046         function initializers, changed prototype of function to simpler one,
2047         * (pic16_printIvalFuncPtr): check to see if function is already
2048         added in externs list,
2049         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
2050         optimized a move from W to SFR with a move to the same register
2051         later after a CALL,
2052         * device/lib/pic16/debug: NEW directory, contains debug features
2053         which are enabled when linking with libdebug.lib, currently command
2054         line option --gstack enables stack pointer tracing for over/under
2055         flow, corresponding sources are in debug/gstack
2056
2057 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
2058
2059         * doc/sdccman.lyx: updated SDCC version,
2060         * (PIC16 port): update list of command line options,
2061         * src/pic16/device.h (structure pic16_options_t): added field gstack
2062         to enable stack overflow tracing on push/pops,
2063         * src/pic16/device.c (statistics structure): added statistics
2064         structure,
2065         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
2066         pic16_dump_int_registers): increase statistics counters for each
2067         * variable which is encountered
2068         * (pic16_dump_usection): emit each .udata variable to its own udata
2069         section,
2070         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
2071         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
2072         parameters via stack, otherwise use old scheme,
2073         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
2074         assembler output file,
2075         * src/pic16/main.c: added command line options --gstack to enable
2076         push/pop tracing for stack overflow,
2077         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
2078         instructions): added size of each instruction,
2079         * (pic16_countInstruction): estimate size of instructions in
2080         the_pFile list, inline assembly blocks are not counted,
2081         * (pic16_FixRegisterBanking): trace previous register usage, when
2082         banksel optimizations is greater than 0, don't emit a redudant
2083         banksel directive,
2084
2085 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
2086
2087         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
2088         * src/pic16/ralloc.c : applied same fix for pic16.
2089         * src/pic/gen.c : tidied it up a little.
2090
2091 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2092
2093         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
2094         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
2095
2096 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2097
2098         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
2099
2100 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2101
2102         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
2103         non-reentrant function __modsint in the interrupt function (thus
2104         corrupting math operations during serial I/O)
2105         * device/lib/ser_ir.c: as above, changed buffersize
2106         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
2107         256.c,d for zeroing
2108         * doc/Makefile: added option -t for rsync
2109
2110 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2111
2112         * src/SDCCast.h (struct ast),
2113         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
2114
2115 2004-10-20 Borut Razem <borut.razem AT siol.net>
2116
2117         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
2118         package
2119
2120 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
2121
2122         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
2123         makefile targets,
2124         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
2125         support functions to replace long sequences of MOVFF's from access
2126         bank registers to stack and vice versa,
2127         * src/pic16/device.h: added new field opt_flags, where optimization
2128         flags can be set to enable certain features,
2129         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
2130         * pBlock, (genFunction, genEndFunction): surroung loop for
2131         saving/loading used registers in stack with PC_INFO pCodes,
2132         INF_LREGS. Code in between can then be optimized by pCode optimizer
2133         to support function calls,
2134         * (genDataPointerSet): fixed bug which loaded float fields in
2135         structures with corrupt data,
2136         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
2137         in a standard way debug info on stderr. Feature used for developing
2138         and debugging only,
2139         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
2140         obsolete chunks of code,
2141         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
2142         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
2143         * pic16/src/pcode.c (pic16_newpCodeInfo,
2144         * (pic16_newpCodeOpLocalRegs),
2145         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
2146         feature,
2147         * (pic16_pCodeConstString): printing of the initial value of a
2148         symbol as a comment is inhibited since parsing was already done by
2149         copyStr and output is corrupt,
2150         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
2151
2152 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2153
2154         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
2155
2156 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
2157
2158         * as/mcs51/lkarea.c: removed old K&R style,
2159           (lnksect): changed check on boundary error,
2160           (lnksect2): changed check on boundary error,
2161           (lnksect2): extend XSTK to end of page if size = 1
2162         * as/mcs51/lkmain.c: removed old K&R style,
2163           (Areas51): create l_IRAM symbol
2164         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
2165         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
2166           model-mcs51-stack-auto, added model-mcs51-xstack-auto
2167         * device/lib/_mullong.c: added version to be compiled with xstack
2168         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
2169         * device/lib/mcs51/crtxclear.asm: clear pdata as well
2170         * device/lib/mcs51/crtxstack.asm: fixed comment
2171         * src/SDCCglue.c: maxInterrupts defaults to 0,
2172           (emitMaps): added pdata,
2173           (createInterruptVect): (re)moved default,
2174           (glue): added pdata,
2175           (glue): moved __start__xstack to XSTK with default size 1
2176         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
2177           and options.float_rent when options.stackAuto is set,
2178           (linkEdit): only write XDATA_NAME if provided on command line
2179         * src/SDCCmem.h,
2180         * src/SDCCmem.c: added pdata
2181         * src/port.h: added pdata_name to PORT
2182         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
2183           (saveRegisters, unsaveRegisters): removed usage of B,
2184           (genMinus): fixed accumulator clash,
2185           (genJumpTab): added comment, this needs another look
2186         * src/mcs51/gen.c: added check for "B in use" paranoia,
2187           added pushB() and popB()
2188         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
2189           chance
2190         * src/avr/main.c,
2191         * src/ds390/main.c,
2192         * src/hc08/main.c,
2193         * src/mcs51/main.c,
2194         * src/pic/main.c,
2195         * src/pic16/main.c,
2196         * src/xa51/main.c,
2197         * src/z80/main.c: (reset_regparms) made void parameter explicit and
2198           added PSEG (PAG,XDATA) or NULL to port specifier
2199         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
2200         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
2201           (_mcs51_genInitStartup): removed __start__xstack equ,
2202           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
2203         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
2204         * src/z80/gen.c (_rleAppend): fixed warnings
2205         * support/regression/tests/zeropad.c: added pdata test
2206         * .version: bumped to 2.4.6
2207
2208 2004-10-17 Borut Razem <borut.razem AT siol.net>
2209
2210         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
2211         as a part of nightly build
2212
2213 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
2214
2215         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
2216         WREG holds the first byte function parameters,
2217         * (aopForSym): take special case for symbols which are in FARSPACE
2218         but in CODESPACE too,
2219         * (assignResultValue): modified to take into account _G.useWreg,
2220         * (genCall): don't use wreg for parameter passing when function is
2221         declared as reentrant, too, added optimization INCF to stack
2222         pointer when stack parameter count is 1,
2223         * (genFunction, genEndFunction): refurnished and fixed to not using
2224         wreg for passing parameters when function has varargs or is
2225         reentrant, fixed bug with symbol name compare for generating
2226         functions in absolute address,
2227         * (pic16_storeForReturn): refurnished,
2228         * (genCmp): began writing a new version of the function, not ready
2229         yet, therefore it is disabled,
2230         * (genAssign): do not read code memory when assigning a function to
2231         a pointer function,
2232         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
2233         array of characters, not pointer,
2234         * (pic16initialComments): in debug mode emit an .ident directive for
2235         the assembler,
2236         * (_process_pragma): emit a new warning type (internal to pic16)
2237         when setting stack to default length, emit a similar warning when
2238         placing a function at absolute address and address is not word aligned
2239         * (_pic16_parseOptions): added 'return TRUE' statement,
2240         * (_pic16_linkEdit): if compiling a source, then add the source's
2241         file object, first in the list of objects to link,
2242
2243 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
2244
2245         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
2246         * src/pic/main.c : removed VC warning.
2247         * src/pic/gen.c : changed comment.
2248
2249 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
2250
2251         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
2252         reference to a deprecated symbol _GPTRREG was causing failure to
2253         link. Thanks G. M. Gallant for the info.
2254
2255 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
2256
2257         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
2258         comments for Bugs item #954788.
2259
2260 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
2261
2262         * src/pic16/device.c (pic16_dump_gsection,
2263         * pic16_groupRegistersInSection): handle symbols declared to be in
2264         access bank differently,
2265         * src/pic16/gen.c (struct _G): added field resDirect,
2266         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
2267         send values read from stack directly to result and don't allocate
2268         temporary values,
2269         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
2270         same registers,
2271         * (pic16_sameRegsOfs): NEW,
2272         * (freeAsmop): if _G.resDirect is set then do not mark registers as
2273         free because they were not allocated from temporary pool,
2274         * pic16_popRegFromString): workaround to fix a problem with
2275         allocating variables twice or never,
2276         * (genGenPointerGet): using PRODL instead of FSR0H,
2277         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
2278         instead of FSR0H,
2279         * (genAssign): take advantage of the _G.resDirect flag,
2280         * (genCast): around line 11844, use mov2f instead of directly
2281         MOVFF'ing between operands to account for literal values,
2282         * src/pic16/genutils.c: some new debug functions for gpsim have been
2283         added,
2284         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
2285         float with integer part only,
2286         * src/pic16/main.c (_process_pragma): handle pragma udata access to
2287         place variables in access bank
2288         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
2289         updated sources to reflect recent changes in gen.c
2290
2291 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
2292
2293         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
2294         sources that searched for headers in installation path, now the
2295         device/include/pic16 is used,
2296         * src/pic16/glue.c (pic16glue),
2297         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
2298         .line directives if not in debug mode, this suppresses assembler's
2299         warnings for ignored directives
2300
2301 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
2302
2303         * src/port.h: made reset_regparms prototype void parameter explicit.
2304         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
2305         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
2306         * doc/sdccman.lyx: documented warning disabling and how to use
2307           printf_large to make it print floats.
2308         * device/include/stdbool.h: NEW
2309         * device/lib/_atof.c,
2310         * device/lib/_divuint.c,
2311         * device/lib/_divulong.c,
2312         * device/lib/expf.c,
2313         * device/lib/printf_large.c,
2314         * device/lib/sincosf.c,
2315         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
2316         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
2317           a completely reentrant lib.
2318
2319 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
2320
2321         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
2322         * device/include/pic16/stdio.h: fixed bug with colon
2323
2324 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
2325
2326         * device/include/pic16/stdio.h,
2327         * device/include/pic16/stdlib.h,
2328         * device/include/pic16/math.h: NEW
2329         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
2330         declared as _naked to reduce overhead
2331         * device/lib/Makefile.in (target port-specific-objects-pic16):
2332         changed * to *.* so to ignore the CVS directory,
2333         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
2334         stacked variables back in stack,
2335         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
2336         corruption
2337
2338 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
2339
2340         * .version: bumped version number to 2.4.5
2341         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
2342         * support/Util/SDCCerr.c (messages structure): added entry for
2343         W_POSSBUG2
2344
2345         Large cumulative patch for pic16 port and libraries.
2346         * device/include/pic16/sdcc-lib.h,
2347         * device/include/pic16/stdarg.h,
2348         * device/include/asm/pic16/features.h,
2349         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
2350         * device/include/pic16/float.h: changes reentrant keyword with
2351         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
2352         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
2353         updated target build-libraries to include objects from gptr,
2354         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
2355         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
2356         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
2357         all function headings,
2358         * src/SDCCmain.c: added global parameter userIncDirsSet,
2359         * (parseCmdLine): when option -I is encountered add directory to
2360         userIncDirsSet too,
2361         * src/version.awk: added space between control and long,
2362         * src/pic16/NOTES: added some notes for the port,
2363         * src/pic16/gen.c: added prototype for mov2fp function,
2364         * (fReturnpic16[]): properly named return value registers,
2365         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
2366         * (aopForSym): added code to handle symbols with onStack flag set,
2367         symbols onStack are allocated PTRSIZE bytes,
2368         * (aopFreeAsmop): handles special case where asmops are stack objects,
2369         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
2370         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
2371         added argument lock to trace flaws in allocating temporary registers
2372         when developing port,
2373         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
2374         * (pic16_popRegFromString): reenabled allocating a direct register
2375         from string,
2376         * (assignResultValue): various beautifications,
2377         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
2378         referenced function argument,
2379         * (genIpush): reenabled to allow stacked arguments, handles only
2380         ic->parmPush iCodes,
2381         * (genCall, genPcall): major changes to allow for variable argument
2382         functions, fixed a bug with falsely restoring stack pointer after
2383         returning from call,
2384         * (genFunction): pending code for critical function,
2385         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
2386         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
2387         * (genNearPointerGet): fixed bug with indirect reading, was always
2388         reading from INDF0
2389         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
2390         pointers,
2391         * (genAddrOf): rewrote code to take address of a stacked function parameter
2392         * (genCast): fixed casting to generic pointer type,
2393         * src/pic16/gen.h: added AOP_STA,
2394         * (struct asmop): added field stk,
2395         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
2396         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
2397         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
2398         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
2399         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
2400         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
2401         generic pointers,
2402         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
2403         and library paths,
2404         * (pic16_port structure): generic pointer size is set to 3,
2405         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
2406         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
2407         compiler warning,
2408         * src/pic16/ralloc.c (allocReg): prevent allocating register when
2409         operand is an iTemp,
2410
2411 2004-09-24 Martin Helmling <mh AT octo-soft.de>
2412
2413         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
2414         * debugger/mcs51/simi.c: addapt new syntax of s51
2415
2416 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
2417
2418         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
2419         * src/pic16/pcode.c: commented out some calls to free() in order to
2420         fix bug #989576,
2421
2422 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2423
2424         * src/SDCCicode.h,
2425         * src/SDCCicode.c (isiCodeInFunctionCall),
2426         * src/avr/ralloc.c (selectSpil),
2427         * src/pic/ralloc.c (selectSpil),
2428         * src/pic16/ralloc.c (selectSpil),
2429         * src/ds390/ralloc.c (selectSpil),
2430         * src/hc08/ralloc.c (selectSpil),
2431         * src/xa51/ralloc.c (selectSpil),
2432         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
2433         stack in the middle of a function call sequence (fixes bug #1020268)
2434         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
2435         costs associated with the minimum switch case.
2436
2437 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2438
2439         * src/SDCC.lex: fixed bug #1030549
2440
2441 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2442
2443         * src/SDCCcse.h (struct cseDef),
2444         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
2445         over a function call if the CSE is derived from a symbol whose
2446         address has been taken (fixes bug #1029883)
2447         * support/regression/tests/bug-1029883: a new regression test for
2448         this bug
2449
2450 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2451
2452         * src/hc08/gen.c (emitinline): fixed bug #1029778
2453         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
2454         to a cast object is no longer a syntax error ("fixes" bug #1030006,
2455         and starts toward RFE #905167)
2456
2457 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
2458
2459         * src/pic16/gen.c (mov2f): New function to move an operand to
2460         another without considering if it is a literal or a register,
2461         * (pic16_sameRegs): don't check if they are both AOP_REG,
2462         * (AccRsh): removed andmask=0 lines,
2463         * (genLeftShift): duplicated to be improved in future versions,
2464         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
2465         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
2466         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
2467         * (pic16initMnemonics): added initialization for POC_INFSNZW,
2468         * (insertBankSwitch): fixed inserting banksel directives algorithm
2469         for instructions that follow a skip instruction, this fixes a report
2470         for broken subtraction code generation,
2471         * src/pic16/ralloc.c (deassignLRs): do not free register if current
2472         iCode is a left op, just in case result and right share the same
2473         registers
2474
2475 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2476
2477         * src/hc08/main.c,
2478         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
2479         preservation of HX
2480         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
2481         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
2482         on 2004-09-12; it was buggy
2483
2484 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
2485
2486         * src/SDCCsymt.h: removed RESULT_CHECK
2487         * src/SDCCast.c,
2488         * src/SDCCglue.c,
2489         * src/SDCCval.c,
2490         * src/pic/glue.c,
2491         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
2492
2493 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
2494
2495         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
2496         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
2497         configuration values no more rejected by compiler, they are assigned
2498         to configuration registers with a warning message instead,
2499         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
2500         the for-loop so last conf register is emitted too,
2501         * (_pic16_initPaths): link library libsdcc.lib by default,
2502         * (_hasNativeMulFor): modified test for multiplication according to
2503         Raphael Neider's remarks. Integer multiplication is also done with
2504         support functions,
2505         * device/include/pic16/pic18fregs.h: corrected type error in while
2506         testing and including 18f6720 header file
2507
2508 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
2509
2510         * src/pic16/device.h (pic16_options): removed field use_crt,
2511         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
2512         until an optimization to handle single bits is added,
2513         * (pic16_loadFSR0): moved before genUnpackBits,
2514         * (genAnd): some white lines removed,
2515         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
2516         leave_reset flags in pic16_options when using crt modules,
2517
2518 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
2519
2520         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
2521           for bugs 898889 & 979599. Also used some safer print instructions.
2522
2523 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
2524
2525         * src/pic16/device.h (pic16_options_t): added field use_crt,
2526         crt_name, no_crt,
2527         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
2528         catch a probable future bug,
2529         * src/pic16/gen.c: aopIdx function commented out,
2530         * (genAssign): commented out old code which used aopIdx,
2531         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
2532         code, added if conditionals to take into account the --use-crt
2533         command line options,
2534         * src/pic16/main.c (pic16_optionsTable): added new command line
2535         options, --use-crt= and --no-crt,
2536         * (_pic16_linkEdit): now the proper crt object is added in the
2537         linker command line except than when --no-crt is specified,
2538         * src/pic16/pcode.c,
2539         * src/pic16/pcode.h: added some structures and functions for a new
2540         optimization scheme to compansate for instruction overhead between
2541         same iCodes, this scheme is currently under development and is not
2542         working in any way,
2543         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
2544         to && operator,
2545         * device/lib/pic16/startup/crt0i.c,
2546         * device/lib/pic16/startup/crt0iz.c: added global char variable
2547         __uflags to force the generation of an idata section
2548
2549 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
2550
2551         * doc/Makefile,
2552         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
2553         * doc/sdccman.lyx: updated sdcc version to 2.4.4
2554
2555 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2556
2557         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
2558         Frieder) and clarified the default code optimization mode
2559
2560 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2561
2562         * src/SDCC.lex (doPragma, process_pragma),
2563         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
2564         "opt_code_size", and "opt_code_balanced"
2565         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
2566         regrouped options by category, added support for category headers
2567         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
2568         and "--opt-code-size"
2569         * doc/sdccman.lyx: documented these new options and pragmas
2570         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
2571         preference into account
2572
2573 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2574
2575         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
2576           geniCodePreDec): Fixed bug 904237 by generating a warning
2577         * src/SDCCerr.h,
2578         * src/SDCCerr.c: added warning W_SIZEOF_VOID
2579
2580 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
2581
2582         * src/pic/device.c : When no max ram set validate full memory range.
2583         * src/pic/pcode.c,
2584         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
2585
2586 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2587
2588         * device/lib/_gptrget.c,
2589         * device/lib/_gptrput.c: updated comment
2590         * device/lib/calloc.c,
2591         * device/lib/free.c,
2592         * device/lib/malloc.c,
2593         * device/lib/realloc.c: added LGPL, made them reentrant-safe
2594         * src/SDCCcse.c (cseBBlock),
2595         * src/SDCCicode.c (printOperand, geniCodeArray),
2596         * src/SDCCicode.h (struct operand): fixed bug 868103
2597         * support/regression/tests/bug-868103.c: added
2598         * src/SDCCast.c (searchLitOp),
2599         * src/SDCCcse.h (struct cseDef),
2600         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
2601         * src/SDCCicode.h (struct operand),
2602         * src/SDCCsymt.h (struct sym_link),
2603         * src/avr/gen.c (hasInc),
2604         * src/ds390/gen.c (hasInc),
2605         * src/hc08/gen.c (genPlusIncr, hasInc),
2606         * src/mcs51/gen.c (hasInc),
2607         * src/pic16/glue.c (pic16_printIvalChar),
2608         * src/pic16/ralloc.c (regWithIdx),
2609         * src/xa51/gen.c (hasInc) : removed warnings
2610         * src/SDCCast.c (createBlock): added comment ???
2611         * src/hc08/ralloc.c: updated comments
2612
2613 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2614
2615         * doc/sdccman.lyx: updated section on switch statements, added
2616         section about semaphore locking
2617         * doc/Makefile: added option -info for latex2html
2618         * device/lib/_gptrget.c,
2619         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
2620
2621 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
2622
2623         * src/pic/device.h,
2624         * src/pic/device.c,
2625         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
2626          maxram is less than 0x100.
2627
2628 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
2629
2630         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
2631
2632 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2633
2634         * src/port.h,
2635         * src/mcs51/main.c,
2636         * src/ds390/main.c,
2637         * src/z80/main.c,
2638         * src/hc08/main.c,
2639         * src/pic/main.c,
2640         * src/pic16/main.c,
2641         * src/avr/main.c,
2642         * src/xa51/main.c
2643         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
2644         a jump table is the best form for a switch statement, including
2645         automatic insertion of missing cases to make the case range
2646         continuous. Developed in collaboration with Frieder Ferlemann.
2647
2648 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2649
2650         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
2651         accumulator result if it needs sign extension
2652
2653 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2654
2655         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
2656
2657 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2658
2659         * device/lib/gbz80/printf.c,
2660         * device/lib/z80/printf.c: removed define for NULL
2661
2662 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2663
2664         * as/xa51/xa_link.c,
2665         * device/examples/ds390/ow390/ad26.c,
2666         * device/examples/ds390/ow390/cnt1d.c,
2667         * device/examples/ds390/ow390/counter.c,
2668         * device/examples/ds390/ow390/ds2480.h,
2669         * device/examples/ds390/ow390/ds2480ut.c,
2670         * device/examples/ds390/ow390/findtype.c,
2671         * device/examples/ds390/ow390/gethumd.c,
2672         * device/examples/ds390/ow390/owllu.c,
2673         * device/examples/ds390/ow390/ownetu.c,
2674         * device/examples/ds390/ow390/swt12.c,
2675         * device/examples/ds390/ow390/swtloop.c,
2676         * device/examples/ds390/ow390/temp.c,
2677         * device/examples/ds390/ow390/temp10.c,
2678         * device/examples/ds390/ow390/thermo21.c,
2679         * device/examples/ds390/ow390/tinilnk.c,
2680         * device/examples/ds390/ow390/tstfind.c,
2681         * device/examples/serialcomm/windows/serial.cpp,
2682         * device/examples/serialcomm/windows/test_serialcomm.cpp,
2683         * device/include/reg51.h: fixed line endings for cvs
2684
2685 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2686
2687         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
2688         packRegsForAccUse, packRegisters): new accumulator register
2689         packing algorithm
2690         * support/regression/ports/hc08/support.c (_putchar): suppress
2691         warning of unused variable
2692         * src/SDCCicode.c: added SWAP entry to codeTable
2693
2694 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
2695
2696         * device/lib/sprintf.c: forgot to add this file before previous commit
2697
2698 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
2699
2700         * src/pic16/gen.c (genPackBits): added operand right in function
2701         parameters, load result directly if p_type is POINTER (that is
2702         called by genNearPointerSet)
2703         * (genUnPackBits): added operand left in function parameters,
2704         * (genNearPointerGet, genNearPointerSet): prevent the loading of
2705         FSR0 if accessing bitfields,
2706
2707 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
2708
2709         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
2710           _print_format; updated printf, sprintf, vsprintf
2711         * device/include/asm/default/features.h: corrected comment/define
2712         * device/lib/Makefile.in: added sprintf.c
2713         * device/lib/libsdcc.lib: added sprintf module
2714         * device/lib/printf_large.c,
2715         * device/lib/vprintf.c,
2716         * device/lib/sprintf.c: totally refactored printf_large and vprintf
2717           into these 3 files
2718         * support/regression/Makefile: changed ALL_PORTS into a usefull default
2719         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
2720         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
2721           hc08 test
2722         * support/regression/tests/zeropad.c: define idata as data for hc08
2723
2724 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2725
2726         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
2727         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
2728         labels are referenced at least once (even if a reference is not found)
2729         * src/hc08/gen.c (emitcode): set isComment flag for comments
2730         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
2731         loads), rules 6a..6b (optimize jumps to return)
2732
2733 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2734
2735         * device/lib/acosf.c (acosf),
2736         * device/lib/asinf.c (asinf),
2737         * device/lib/atanf.c (atanf),
2738         * device/lib/ceilf.c (ceilf),
2739         * device/lib/cosf.c (cosf),
2740         * device/lib/coshf.c (coshf),
2741         * device/lib/cotf.c (cotf),
2742         * device/lib/fabsf.c (fabsf),
2743         * device/lib/floorf.c (floorf),
2744         * device/lib/log10f.c (log10f),
2745         * device/lib/logf.c (logf),
2746         * device/lib/sinf.c (sinf),
2747         * device/lib/sinhf.c (sinhf),
2748         * device/lib/sqrtf.c (sqrtf),
2749         * device/lib/tanf.c (tanf),
2750         * device/lib/tanhf.c (tanhf),
2751         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
2752         replaced all instances of "reentrant" in the library functions
2753         defined in math.h with this macro.
2754         * support/regression/tests/float_trans.c: reenabled test for hc08
2755
2756 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
2757
2758         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
2759         erroneously deleted
2760
2761 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2762
2763         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
2764         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
2765         multi-byte volatile operands are used
2766         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
2767         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
2768         initialization to area GSINIT0 so that it would always precede
2769         any static initializers in GSINIT
2770         * support/regression/tests/zeropad.c: fixed idata define for hc08
2771         * support/regression/tests/bug-927659.c,
2772         * support/regression/tests/float_trans.c: disabled tests for hc08
2773         pending missing library routines
2774         * .version: increased version number to 2.4.4 - hc08 port now passes
2775         regression tests
2776
2777
2778 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
2779
2780         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
2781         * Makefile.common.in,
2782         * as/Makefile,
2783         * as/hc08/Makefile.in,
2784         * as/mcs51/Makefile.in,
2785         * as/z80/Makefile.in,
2786         * debugger/mcs51/Makefile.in,
2787         * device/include/Makefile.in,
2788         * device/lib/Makefile.in,
2789         * doc/Makefile,
2790         * link/Makefile,
2791         * link/z80/Makefile.in,
2792         * packihx/Makefile.in,
2793         * sim/ucsim/main_in.mk,
2794         * sim/ucsim/avr.src/Makefile.in,
2795         * sim/ucsim/doc/Makefile.in,
2796         * sim/ucsim/gui.src/serio.src/Makefile.in,
2797         * sim/ucsim/hc08.src/Makefile.in,
2798         * sim/ucsim/s51.src/Makefile.in,
2799         * sim/ucsim/xa.src/Makefile.in,
2800         * sim/ucsim/z80.src/Makefile.in,
2801         * src/Makefile.in,
2802         * support/cpp2/Makefile.in,
2803         * support/librarian/Makefile,
2804         * support/makebin/Makefile: added DESTDIR to the install path proposed
2805         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
2806         * doc/sdccman.lyx: added DESTDIR documentation
2807
2808 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
2809
2810         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
2811         instruction for interrupt handlers, use fast returns when returning
2812         from high priority interrupts
2813
2814 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2815
2816         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
2817         code generation
2818         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
2819         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
2820         bugs, ported much of Bernhard's code from mcs51
2821         * src/mcs51/gen.c (genSend),
2822         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
2823         than one when calling a reentrant function
2824         * device/lib/_mullong.c: defined an alternate struct layout for big
2825         endian ports (hc08)
2826
2827 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2828
2829         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
2830         test
2831
2832 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2833
2834         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
2835         are sane and complete before asking the port its prefered parameter
2836         passing method (fixes bug #1017633)
2837         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
2838         and _ret3
2839
2840 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2841
2842         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
2843         problem in bitfields >= 8 bits.
2844
2845 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
2846
2847         * src/SDCCsymt.c: undid changes that were not meant to be committed
2848
2849 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
2850
2851         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
2852
2853 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
2854
2855         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
2856           copied and wrong bit got inverted
2857
2858 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2859
2860         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
2861         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
2862         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
2863         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
2864         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
2865         assignments to bitfields at known addresses
2866         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
2867         reads from bitfields at known addresses
2868         * src/hc08/ralloc.c (packRegisters),
2869         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
2870         genhc08Code): optimize pointer get values used as conditionals
2871         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
2872         and branch
2873
2874 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2875
2876         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
2877         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
2878         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
2879         as conditionals
2880
2881 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2882
2883         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
2884
2885 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2886
2887         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
2888         related problems
2889
2890 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
2891
2892         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
2893
2894 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2895
2896         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
2897         mcs51 port
2898
2899 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
2900
2901         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
2902
2903 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2904
2905         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
2906         cases use more compact code.
2907
2908 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
2909
2910         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
2911
2912 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2913
2914         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
2915
2916 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2917
2918         * src/SDCCsymt.h,
2919         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
2920         parameter of changePointer() from symbol* to sym_link*
2921         * src/SDCCast.c (decorateType): call changePointer() for CAST op
2922         * src/SDCCsymt.c (compareType): void* type is castable to other
2923         pointers, but not necesarily an exact match.
2924         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
2925         is no longer blindly treated as an exact match.
2926         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
2927
2928 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
2929
2930         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
2931
2932 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
2933
2934         * src/pic/gen.c,
2935         * src/pic/pcode.c,
2936         * src/pic/ralloc.h,
2937         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
2938
2939 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
2940
2941         * src/pic/device.c,
2942         * src/pic/device.h,
2943         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
2944
2945 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2946
2947         * src/mcs51/gen.c (emitcode): fixed bug #992819
2948
2949 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
2950
2951         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
2952           there's no need to make it worse
2953
2954 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2955
2956         * src/mcs51/ralloc.c (deassignLR),
2957         * src/ds390/ralloc.c (deassignLR),
2958         * src/hc08/ralloc.c (deassignLR),
2959         * src/z80/ralloc.c (deassignLR),
2960         * src/pic/ralloc.c (deassignLR),
2961         * src/pic16/ralloc.c (deassignLR),
2962         * src/avr/ralloc.c (deassignLR),
2963         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
2964         rlivePoint): fixed another part of bug #971834
2965
2966 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2967
2968         * src/z80/main.c: enabled "critical" keyword
2969         * src/z80/mappings.i,
2970         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
2971         functions (fixes bug #979646)
2972         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
2973
2974 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2975
2976         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
2977           such as c:\mydir.
2978
2979 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
2980
2981         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
2982           doesn't disable too much optimizations
2983
2984 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
2985
2986         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
2987
2988 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
2989
2990         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
2991
2992 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
2993
2994         * src/pic/gen.c tidied up tabs
2995         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
2996         * src/pic/main.c tidied up tabs
2997         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
2998         * src/pic/pcoderegs.c tidied up tabs
2999         * src/pic/ralloc.c tidied up tabs
3000
3001 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
3002
3003         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
3004         to S_FIXED for pic16 port and when symbol is not in level 0,
3005         allocate for S_REGISTER storage class and pic16 port, too,
3006         * src/pic16/device.h: prototype for checkSym,
3007         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
3008         * (pic16_assignConfigWordValue): test the value and the mask to
3009         validate that the value is suitable for the configuration word,
3010         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
3011         collect extern declared symbols, don't emit symbol twice, check
3012         first if symbol is in publics set first,
3013         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
3014         * added command line '--fstack' which enables an experimental
3015         feature for stack access, too buggy to be used yet...
3016         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
3017         * (pic16_allocDirReg): when register has storage class S_REGISTER
3018         allocate in pic16_dynAccessRegs,
3019         * device/include/pic16/pic18f????.h: modified configuration word
3020         naming convention, words started as CONFIG0H but should be CONFIG1H
3021
3022 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
3023
3024         * device/include/mcs51reg.h: fixed bug 970993
3025
3026 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
3027
3028         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
3029         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
3030         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
3031         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
3032         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
3033         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
3034           error/warning numbers,
3035           added function setWarningDisabled()
3036         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
3037         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
3038           _memcmp.c _memmove.c calloc.c realloc.c free.c
3039         * support/regression/tests/malloc.c: added tests for new functionality
3040         * support/regression/tests/zeropad.c: added tests for truncated initializers
3041           and initialized char arrays starting with '\x0'
3042         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
3043
3044 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
3045
3046         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
3047
3048 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3049
3050         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
3051         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
3052         peephole 177.e. Thanks to anonymous
3053
3054 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
3055
3056         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
3057         function isn't used in the source but referenced as a
3058         variable initializer then declare it as extern in .asm file
3059
3060 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
3061
3062         * .version: increased version number to 2.4.3
3063
3064         Adding version extension according to ChangeLog CVS revision
3065         * src/Makefile.in (target all): added dependency 'version.h'
3066         * (rule version.h): added rule to create version.h from ChangeLog,
3067         * (rule dep): added dependency version.h,
3068         * src/version.awk: AWK script to create version.h
3069         * src/SDCCdwarf2.c (dwWriteModule),
3070         * src/SDCCglue.c (initialComments),
3071         * src/SDCCmain.c (printVersionInfo): modified to write after
3072         version string the version extension number,
3073         * src/SDCCutil.c: included "version.h"
3074         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
3075         number,
3076         * src/SDCCutil.h: added prototype for getBuildNumber
3077
3078         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
3079         includeDirsSet, too,
3080         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
3081         const char [] is found in function prototype...
3082
3083         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
3084         moving to WREG with source is already in WREG,
3085         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
3086         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
3087         * (aopForSym): stack'ed symbols are partially supported, added
3088         if-clause to support symbols in FARSPACE,
3089         * (sameRegs): added test for AOP_ACC to see if registers are same,
3090         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
3091         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
3092         * (pic16_popRegFromString): will not allocate a new register if it
3093         doesn't find one by name, bug may have introduced...
3094         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
3095         * (genIpush): revived to use pic16 port's stack,
3096         * (genAddrOf): added incomplete case for stack'ed operand,
3097         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
3098         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
3099         can handle multibyte operands,
3100         * src/pic16/glue.c (pic16_printIval*): some debug info added,
3101         * (pic16initialComments): added message for MPLAB compatibility
3102         mode enabled,
3103         * src/pic16/main.h: prototype for pic16_mplab_comp,
3104         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
3105         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
3106         * (_pic16_linkEdit): NEW, handles link stage, transferred here
3107         because of increased complexity of procedure,
3108         * (_process_pragma): stack pragma changed to format 'stack pos len',
3109         emit symbol '_stack_end' to conform with gplink,
3110         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
3111         to search for register,
3112         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
3113         PO_GPR_REGISTER,
3114         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
3115         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
3116         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
3117         case for PO_GPR_REGISTER,
3118         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
3119         dies, the new era is ahead !...
3120         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
3121         pic16_dynInternalRegs,
3122         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
3123         * (pic16_allocDirReg): minor optimizations and bug fixes,
3124         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
3125
3126         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
3127         load stack and frame pointer with address of 'stack_end' symbol
3128
3129 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
3130
3131         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
3132         without source code but only variable initializers
3133
3134 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
3135
3136         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
3137         external are not declared as extern to reduce overhead while linking
3138
3139 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
3140
3141         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
3142
3143 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
3144
3145         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
3146           Yee Keat for the patch
3147         * src/SDCCast.c (decorateType): fixed bug #979599
3148         * src/ds390/gen.h: removed local fReturnSizeDS390
3149         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
3150         * src/ds390/gen.c (genAnd, genOr, genXor),
3151         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
3152
3153 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
3154
3155         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
3156         add relFilesSet to $3, manipulate $2 to handle linking of object
3157         files without source files in command line,
3158         * device/include/pic16 (all headers): added ID location macros,
3159         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
3160         entries for ID location bytes,
3161         * (pic16_assignIdByteValue): NEW,
3162         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
3163         added field dumpcalltree to pic16_options_t,
3164         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
3165         is used instead of pic16_Gstack_base_addr, check if (ifx) before
3166         emitting rFalseIfx label after check_carry label,
3167         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
3168         pic16_emitDIRegs), NEW
3169         * (pic16glue): dump .calltree file when option --calltree found,
3170         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
3171         * (_pic16_genAssemblerPreamble): emit ID locations after
3172         configuration registers,
3173         * (pic16_linkCmd): modifications of the link command,
3174         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
3175         * (pic16_pCodeInitRegisters): don't init stack registers,
3176         * (pic16_findPrevInstruction): fixed bug,
3177         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
3178         bug with immediate registers,
3179         * (buildCallTree): traces stack push and pop,
3180         * (pct2): dump also stack usage for each function,
3181         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
3182         * (pic16_allocDirReg): various modifications,
3183         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
3184         fixed to 1,
3185
3186 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
3187
3188         * src/pic16/pcode.c: removed buggy double colon
3189
3190 2004-07-01 Borut Razem <borut.razem AT siol.net>
3191
3192         * support/scripts/sdcc.nsi: added include/pic16 to setup
3193
3194 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
3195
3196         * device/lib/Makefile.in: fixed bug in target objects-pic16,
3197         * device/lib/pic16/Makefile: prefixed with dash (-) command under
3198         target 'clean',
3199         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
3200         specific command line arguments. Also added sample lkr script
3201         for placing a variable at a specific memory bank.
3202         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
3203         at a specific memory bank,
3204         * (pic16_dump_isection): fixed bug which caused string literals to
3205         be omitted when dumping idata section,
3206         * (pic16_groupRegistersInSection): added code to handle registers
3207         in specific memory banks,
3208         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
3209         public, all references are renamed too,
3210         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
3211         AOP_DPTR2,
3212         * (pic16_storeForReturn): added case to handle when dest is WREG,
3213         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
3214         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
3215         pic16_rel_udata, check to see if that register is marked as being
3216         a member of a specific memory bank,
3217         * (pic16_printIvalCharPtr): added code to add string literals either
3218         to code or the idata sections,
3219         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
3220         also accept the 'udata' pragma,
3221         * src/pic16/main.h: new structure types sectName and sectSym
3222         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
3223         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
3224         * (pic16_findPrevInstruction): fixed, it returned nothing,
3225         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
3226         instruction combinations,
3227         * (pic16_FixRegisterBanking): heavily reorganised,
3228         * (pic16_AnalyzeBanking): if generating banksel directives is
3229         disabled, then don't call FixRegisterBanking at all,
3230         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
3231         completely removed,
3232         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
3233
3234 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
3235
3236         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
3237         Phuah Yee Keat <yk.phuah AT nestac.com>
3238
3239 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3240
3241         * src/pic16/glue.c (pic16createInterruptVect): function now emits
3242         correctly the IVT even if it is relocated to some other location
3243
3244 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
3245
3246         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
3247         * device/include/pic16/pic18f2220.h: NEW,
3248         * device/lib/pic16/libdev/pic18f2220.c: NEW,
3249         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
3250         * src/pic16/device.c (struct Pics16): added info for 18f2220,
3251         * src/pic16/device.h (struct pic16_options): added ivt_loc and
3252         nodefaultlibs, ivt_loc is the location of the interrupt vector
3253         table, and nodefaultlibs signs that default libraries should not be
3254         linked in link stage,
3255         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
3256         according to --ivt-loc argument,
3257         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
3258         when pragma stack is found,
3259
3260 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3261
3262         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
3263         256 (range check), 257 (do while), 258.a-f (bit banging
3264         f.e. on 3-wire SPI bus)
3265
3266 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3267
3268         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
3269         variables used exclusively within a loop
3270
3271 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
3272
3273         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
3274
3275 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3276
3277         * src/SDCClrange.c (computeClash): fixed bug #971834
3278
3279 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3280
3281         * src/mcs51/gen.c (genCmp): fixed bug #975903
3282         * src/hc08/gen.c (operandsEqu),
3283         * src/ds390/gen.c (operandsEqu),
3284         * src/z80/gen.c (operandsEqu),
3285         * src/pic/gen.c (operandsEqu),
3286         * src/pic16/gen.c (operandsEqu),
3287         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
3288         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
3289
3290 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3291
3292         * src/SDCCcse.c (cseBBlock): fixed bug #966963
3293
3294 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
3295
3296         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
3297         default case in switch statement,
3298         * glue.c (pic16_initPointer): expr is initialised via decoarteType
3299         to eliminate problem with initialisation of pointers, but problem
3300         still exists,
3301         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
3302         * (emitStaticSegment): removed various lines emitting debug info,
3303         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
3304         added processor registers for utilizing EEPROM,
3305         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
3306         configurable and set 8
3307
3308 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
3309
3310         * .version: increased version number to 2.4.2,
3311
3312         Cumulative patch for pic16 port
3313         * src/pic16/device.c: changed scheme to dump initial values for
3314         variables in idata segment, all print_idata* functions were removed,
3315         now the pic16_printIval* will be called,
3316         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
3317         * _pic16_printPointerType, pic16_printPointerType,
3318         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
3319         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
3320         NEW, similar to the respective functions in SDCCglue.c,
3321         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
3322         way, emitting hex bytes,
3323         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
3324
3325 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3326
3327         * src/avr/ralloc.c (serialRegAssign),
3328         * src/xa51/ralloc.c (serialRegAssign),
3329         * src/pic/ralloc.c (serialRegAssign),
3330         * src/pic16/ralloc.c (serialRegAssign),
3331         * src/hc08/ralloc.c (serialRegAssign),
3332         * src/z80/ralloc.c (serialRegAssign),
3333         * src/ds390/ralloc.c (serialRegAssign),
3334         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
3335
3336 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3337
3338         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
3339         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
3340
3341 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
3342
3343         Cumulative patch for pic16 port:
3344         * src/pic16/device.h (typedef PIC16_device) modified fields for
3345         defining microcontrollers,
3346         * src/pic16/device.c: added new info for all devices in Pics16 array,
3347         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
3348         to be optimised out by the pCode optimiser,
3349         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
3350         specially, bug reported by G.M. Gallant,
3351         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
3352         as force'd so that cannot be optimised out by pCode optimiser,
3353         * src/pic16/pcode.c,
3354         * src/pic16/pcodepeeph.c,
3355         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
3356         they are disabled by default, but can be enabled explicit with
3357         command argument --denable-peeps, for testing,
3358         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
3359         --pomit-ivt in COMPILE_FLAGS
3360
3361 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3362
3363         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
3364           compilation on MSVC
3365
3366 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
3367
3368         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
3369
3370 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3371
3372         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
3373         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
3374
3375 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
3376
3377         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
3378         would only assign 0x300001 register.
3379
3380 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
3381
3382         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
3383         in COMPILE_FLAGS. Thanks to G. Gallant for report.
3384
3385 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3386
3387         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
3388         for ds80c400
3389         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
3390         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
3391         added peephole 254 (left shift), 255 (jump table)
3392
3393 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
3394
3395         * device/lib/Makefile.in: removed comment line with model-pic16,
3396         * (target port-specific-objects-pic16): the libraries and objects
3397         are copied to the build directory form the device/lib/pic16/bin
3398         directory
3399
3400         Cumulative patch concerning pic16 port:
3401         * library directory has been re-organized,
3402         * added support for PIC18F1220,
3403         * added headers and library sources for chips 18f1220,18f6520,
3404         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
3405
3406         * configuration registers setting has changed, now each supported
3407         device has a complete description of the registers it uses,
3408         * all initialisations are moved to idata sections, these section
3409         can be absolute or relocatable,
3410         * fixed initialisation of codespace variables,
3411         * fixed warning about PCLATU and gpsim,
3412         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
3413         * (genAssign): use table reads when assigning from variables in codespace,
3414         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
3415         char/int variables placed in codespace,
3416         * (pic16_emitConfigRegs): NEW, emits a list with configuration
3417         registers set in .asm file, no need for --pomit-config-words anymore,
3418         * (pic16glue): some 8051 legacy segments are commented out
3419         (to be removed completely),
3420         * added support for alternative assembler and linker with --asm=
3421         and --link= command line arguments,
3422         * peepholes are disabled automatically in the port, no need to
3423         specify on command line,
3424         * port supports natively char/int/long multiplication, but converts
3425         all divisions to support functions,
3426         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
3427         to the file set in variable $2,
3428         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
3429         strings in ASCII format and not in hex,
3430         * ralloc.c (serialRegAssign): added a triplet of conditional calls
3431         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
3432         allocate proper register if iCodes aren't temporary,
3433
3434 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
3435
3436         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
3437
3438 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
3439
3440         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
3441         is commented out
3442
3443 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3444
3445         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
3446         computed address is reused
3447         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
3448         multi-byte bitfields
3449
3450 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3451
3452         * src/z80/gen.c: (genArrayInit): must check for pointers too
3453
3454 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3455
3456         * support/regression/tests/zeropad.c: never meant to commit the
3457           nestedstruct test: removed, added check for GCC version
3458
3459 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
3460
3461         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
3462         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
3463         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
3464           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
3465           bugs 928906 and 954082 half-empty initializers
3466         * src/SDCCsymt.h,
3467         * src/SDCCsymt.c (getAllocSize): added for above fix
3468         * src/z80/gen.c (genArrayInit): fixed bug 741044
3469         * support/regression/tests/zeropad.c: added tests
3470
3471 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
3472
3473         * src/pic16/device.c (pic16_dump_section): corrected bug which
3474         caused some symbols of the libraries to be misplaced
3475
3476 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3477
3478         * src/pic16/glue.c,
3479         * src/pic16/ralloc.h,
3480         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
3481         to fix conflict with pic port
3482
3483 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3484
3485         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
3486         externs configuration variables,
3487         * src/pic16/ralloc.h,
3488         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
3489         prototype in header, commented out some debug messages
3490
3491 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
3492
3493         * src/pic16/glue.c,
3494         * src/pic16/main.c,
3495         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
3496         for gpasm COFF object generation. Thanks to D. Hawkins for
3497         his patch info
3498
3499 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3500
3501         * src/ds390/main.c,
3502         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
3503         Brock for spotting this)
3504         * src/ds390/gen.c (genEndFunction),
3505         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
3506         interrupt handler and critical. Disable push/pop optimizations when
3507         peephole optimizations disabled.
3508
3509 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3510
3511         Updated pic16 library sources and headers.
3512         * device/lib/pic16/pic18f*/ ,
3513         * device/include/pic16/*.h: modified to handle structured SFR
3514         definitions
3515
3516 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3517
3518         * src/port.h (PORT structure): added hook initPaths, now each
3519         port can declare its own default search paths,
3520         which can been seen with the --print-search-dirs option,
3521         see pic16 port for example,
3522         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
3523         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
3524         * (doPrintSearchDirs): NEW, replaces in a central manner the
3525         printing of search dirs which was split in set*Paths functions,
3526         * (main): added call to port->initPaths and doPrintSearchDirs,
3527         * src/avr/main.c,
3528         * src/ds390/main.c,
3529         * src/hc08/main.c,
3530         * src/izt/i186.c,
3531         * src/izt/tlcs900h.c,
3532         * src/mcs51/main.c,
3533         * src/pic/main.c,
3534         * src/pic16/main.c: modified port structures to reflect addition of
3535         initPaths hook,
3536
3537         * src/pic16/device.c (regCompare): registers are finally sorted by name,
3538         * (pic16_dump_section): for registers in same address reserve memory once,
3539         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
3540         to no_banksel,
3541         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
3542         result is greater in size than right or left,
3543         * (pic16_genUMult8X8_8): there are some cases where the result can
3544         be 16 bits size, so handle these,
3545         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
3546         * (pic16_outBitC): modified to emit pcodes,
3547         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
3548         or not,
3549         * (genDivOneByte): implemented algorithm to divide 8-bits,
3550         * (genCmp): uncommented goto, but issues still exist,
3551         * (genAnd): fixed a bug with variables >8bits,
3552         * (genPackBits): optimization added that uses BCF/BSF to change a
3553         single bit,
3554         * (genAssign): fixed bug when assigning floating point literals,
3555         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
3556         __sdcc_gsinit_startup label,
3557         * src/pic16/main.c (_pic16_init): removed search directory
3558         initialisations,
3559         * (_pic16_initPaths): NEW, used to initialise search directories,
3560         * (_hasNativeMulFor): support functions for all except char/int
3561         multiplication, and char division,
3562         * (PIC16_port struct): modified entry for native mul support,
3563         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
3564         no_banksel option,
3565         * (buildCallTree): call to register_usage is ifdef'ed out,
3566
3567 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3568
3569         * device/include/string.h: applied Stas Sergeev's patch to make this
3570         header file compatible with the preprocessor -Wundef option
3571         * src/SDCCmain.c (main): abort compilation if preprocessor reports
3572         failure (fixes bug #941458)
3573
3574 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3575
3576         * src/SDCCopt.c (killDeadCode): fixed bug #907733
3577         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
3578         that the variable, not the function, should be static
3579         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
3580         to be consistent with non-literal case
3581
3582 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3583
3584         * src/SDCCast.c (isConformingBody): fixed bug #949967
3585         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
3586         convilong): fixed bug #952086
3587
3588 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3589
3590         * src/SDCCmem.c (allocVariables): fixed bug #955321
3591
3592 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3593
3594         * src/hc08/main.c (_hc08_genAssemblerEnd),
3595         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
3596         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
3597         completely eliminated the use of a temporary file
3598         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
3599         when more than one file linked
3600         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
3601
3602 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3603
3604         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
3605         which fixes bug #543481
3606         * support/regression/tests/bug-751703.c: fixed comments left from a
3607         cut and paste error
3608         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
3609         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
3610         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
3611         scopes
3612         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
3613         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
3614         are now changed to underscores in moduleName
3615
3616 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3617
3618         * as/mcs51/lkmem.c: better fix for bug #954173
3619
3620 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
3621         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3622
3623         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
3624         * device/include/c8051f000.h,
3625         * device/include/c8051f120.h,
3626         * device/include/c8051f300.h,
3627         * device/include/c8051f310.h,
3628         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
3629         PWM16) and detab'ed
3630
3631 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3632
3633         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
3634         and mailing lists, doc'ed --no-peep-comments, removed reference
3635         to knoppix (newest version has no LyX/LaTeX), other minor changes
3636         * src/SDCCglue.c (glue): save 2 bytes stack space with
3637         option --main-return. The ljmp could probably be avoided too
3638
3639 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3640
3641         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
3642
3643 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3644
3645         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
3646         * src/SDCCopt.c (isLocalWithoutDef),
3647         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
3648         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
3649         (credit to Maarten Brock for patch #949363, on which this is based)
3650         * support/regression/tests/bug-751703.c: some test cases of extern used
3651         within inner scopes.
3652
3653 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3654
3655         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
3656         SPEC_STRUCT
3657         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
3658         struct definitions
3659         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
3660         dwWriteLabel): fix to create valid debugger symbols even when
3661         the module name has non-alphanumeric symbols in it
3662         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
3663         when a variable's allocation has been optimized away
3664
3665
3666 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3667
3668         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
3669         * src/hc08/main.c,
3670         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
3671         * src/mcs51/main.c,
3672         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
3673         * src/ds390/main.c,
3674         * src/z80/gen.c (z80_emitDebuggerSymbol),
3675         * src/z80/main.c,
3676         * src/pic/gen.c (pic14_emitDebuggerSymbol),
3677         * src/pic/main.c,
3678         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
3679         * src/pic16/main.c,
3680         * src/avr/gen.c (avr_emitDebuggerSymbol),
3681         * src/avr/main.c,
3682         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
3683         * src/xa51/main.c,
3684         * src/SDCCdebug.c (emitDebuggerSymbol),
3685         * src/SDCCdebug.h,
3686         * src/port.h: added a debugger struct to the port struct. Added a
3687         callback for defining debugger symbols
3688
3689         * src/SDCCast.c (createLabel),
3690         * src/SDCC.y (labeled_statement): mark all compiler generated labels
3691         with isitmp = 1
3692         * src/SDCCicode.h,
3693         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
3694         iCode back to the ast for the function
3695
3696         * src/hc08/ralloc.c (hc08_assignRegisters),
3697         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
3698         unneeded fields from the regs struct.
3699         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
3700         pushReg() & pullReg() functions instead of emitcode()
3701
3702         * src/hc08/gen.c (genLabel, genhc08Code),
3703         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
3704
3705         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
3706         debugger hooks
3707
3708         * src/hc08/gen.c (genEndFunction, genhc08Code),
3709         * src/hc08/gen.h,
3710         * src/mcs51/gen.c (genEndFunction, gen51Code),
3711         * src/mcs51/gen.h,
3712         * src/ds390/gen.c (genEndFunction, gen390Code),
3713         * src/ds390/gen.h,
3714         * src/z80/gen.c (genEndFunction, genZ80Code),
3715         * src/z80/gen.h,
3716         * src/z80/z80.h,
3717         * src/pic/gen.c (genEndFunction, genpic14Code),
3718         * src/pic/gen.h,
3719         * src/pic16/gen.c (genEndFunction, genpic16Code),
3720         * src/pic16/gen.h,
3721         * src/avr/gen.c (genEndFunction, genAVRCode),
3722         * src/avr/gen.h,
3723         * src/xa51/gen.c (genEndFunction, genXA51Code),
3724         * src/xa51/gen.h,
3725         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
3726         specific code to cdbFile.c and out of the backend code generators
3727
3728         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
3729         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
3730         starting address is now 0
3731
3732         * as/hc08/asm.h,
3733         * as/hc08/m08pst.c,
3734         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
3735         assembler directive for DWARF support
3736         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
3737
3738         * src/src.dsp,
3739         * src/Makefile.in,
3740         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
3741
3742 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3743
3744         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
3745         and inappropriate peephole optimization in jump tables
3746
3747 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3748
3749         * as/hc08/m08pst.c,
3750         * src/SDCCglue.c: sdccopt works for the hc08 port now
3751
3752 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
3753
3754         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
3755
3756 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3757
3758         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
3759
3760 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3761
3762         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
3763         rules
3764         * src/SDCCmain.c,
3765         * src/SDCCglobl.h,
3766         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
3767         comments from the peephole optimizer replacement rules
3768         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
3769         symbols
3770         * src/SDCCcse.c (updateSpillLocation),
3771         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
3772         equivalents
3773         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
3774         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
3775         objects far pointers
3776
3777 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3778
3779         * src/SDCCsymt.h: a missing part of my last change
3780         * src/pic/ralloc.c (regTypeNum),
3781         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
3782
3783 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3784
3785         * src/SDCCicode.h,
3786         * src/SDCCicode.c (aggrToPtrDclType),
3787         * src/SDCCptropt.h,
3788         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
3789         ptrPseudoSymConvert),
3790         * src/pic/ralloc.c (regTypeNum),
3791         * src/pic16/ralloc.c (regTypeNum),
3792         * src/hc08/ralloc.c (regTypeNum),
3793         * src/ds390/ralloc.c (regTypeNum),
3794         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
3795         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
3796
3797 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3798
3799         * link/z80/lkmain.c (afile),
3800         * as/hc08/lkmain.c (afile),
3801         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
3802         prevent a pointer problem when a filename has no directory and
3803         no extension specified.
3804
3805 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3806
3807         * link/z80/lkmain.c (afile): allow periods in directory names
3808         * link/z80/lkmain.c (afile),
3809         * as/mcs51/lkmain.c (afile),
3810         * as/hc08/lkmain.c (afile): allow linker script file to have an
3811         extension other than ".lnk"
3812         * link/z80/lklex.c (getfid),
3813         * link/z80/lkmain.c (parse),
3814         * as/mcs51/lklex.c (getfid),
3815         * as/mcs51/lkmain.c (parse),
3816         * as/hc08/lklex.c (getfid),
3817         * as/hc08/lkmain.c (parse): Support comments in the linker script
3818         file on lines by themselves and after filenames
3819
3820 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3821
3822         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
3823
3824 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3825
3826         * src/z80/peeph-z80.def: removed some peephole rules that don't
3827         work with multibyte arithmetic (fixed bug #937126)
3828         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
3829         to registers and not global variables
3830         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
3831         geniCodePreInc, geniCodePostDec, geniCodePreDec,
3832         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
3833         checking for assignments not internally generated (fixed bug #931895)
3834         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
3835         structure member (fixed bug #930072)
3836
3837 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3838
3839         * src/SDCCmain.c (linkEdit),
3840         * src/hc08/main.c (_hc08_parseOptions),
3841         * as/hc08/Makefile.in,
3842         * as/hc08/aslink.h,
3843         * as/hc08/asm.h,
3844         * as/hc08/m08pst.c,
3845         * as/hc08/lkrloc.c (relr, rele),
3846         * as/hc08/lkarea.c (lnkarea)
3847         * as/hc08/lkmain.c (afile, parse),
3848         * as/hc08/lkelf.c: support for ELF output
3849         * as/hc08/lks19.c (s19),
3850         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
3851
3852 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3853
3854         * as/mcs51/lkihx.c: Fixed bug #899105.
3855
3856 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3857
3858         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
3859         .dsp files from Unix to DOS.
3860
3861 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3862
3863         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
3864         function pointers; we have been compliant for several months now.
3865         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
3866         change that was accidently commented out
3867         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
3868         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
3869         bug #922319
3870
3871 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3872
3873         * src/hc08/gen.c: output of all of the internal debugging information
3874         is now controlled by the D() macro; it is disabled by default
3875
3876 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3877
3878         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
3879         harder to keep the same registers during a CAST iCode
3880         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
3881         long via int can be done in a single cast, if the signedness is
3882         correct.
3883         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
3884         putchar() in tinibios.c in ds390's library
3885
3886 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
3887
3888         * src/SDCCast.c (decorateType): fixed bug #898889,
3889         cast result of a literal complement too
3890         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
3891         fixed check for bitfields
3892
3893 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
3894
3895         * src/SDCCicode.c (geniCodeLogic): made it static,
3896         (geniCodeLogicAndOr): added in order to fix bug #905492,
3897         (ast2iCode): fixed bug #905492
3898         * support/regression/tests/bug-905492.c: added
3899         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
3900         (processParms): fixed bug #927659: don't copy parms, this will clear
3901         decorated flag
3902         * support/regression/tests/bug-927659.c: added
3903
3904 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
3905
3906         * src/SDCCast.c (addCast): don't cast float to char
3907         * device/lib/libsdcc.lib: added _memmove
3908
3909 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
3910
3911         * device/lib/large/Makefile: fixed parallel execution by
3912         replacing `make` by `$(MAKE)`
3913
3914 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3915
3916         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
3917         offsets (fixes bug #923936)
3918
3919 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
3920
3921         * device/lib/small/Makefile: fixed parallel execution by
3922         replacing `make` by `$(MAKE)`
3923
3924 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
3925
3926         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
3927
3928 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
3929
3930         * src/pic/gen.c (genCpl): multi-byte complements were not working.
3931         * src/regression/Makefile: Regression test was not running.
3932
3933 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
3934
3935         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
3936         complement if possible
3937         * src/SDCCval.c (valComplement),
3938         * src/SDCCicode.c (operandOperation): fixed complement of literal
3939         * support/regression/tests/onebyte.c (testComplement): added
3940
3941 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
3942
3943         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
3944         return an optimized tree; actually replace actParm with the new tree
3945         * src/SDCCast.h: added some parantheses to remove side effects
3946         * support/regression/tests/bug-920866.c
3947
3948 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
3949         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
3950         Bit operands were not being handled properly in the pic14 port.
3951         (now src/regression/add.c passes again).
3952
3953 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3954
3955         * src/SDCC.y (labeled_statement): case and default no longer require
3956         a following statement (RFE #893037)
3957
3958 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3959
3960         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
3961         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
3962         disabled (fixes bug #916294)
3963         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
3964         "mov a,acc"; patch provided by Lenny Story
3965         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
3966
3967 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3968
3969         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
3970         functions
3971         * src/ds390/gen.c (genFunction, genEndFunction),
3972         * src/ds390/ralloc.c (ds390_assignRegisters),
3973         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
3974         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
3975         pushed if there are parameters passed on the stack. Also, a cleaner
3976         way to decide if r0/r1 should be pushed/popped. (Together they fix
3977         bug #918693)
3978
3979 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3980
3981         * doc/sdccman.lyx,
3982         * device/lib/mcs51/crtpagesfr.asm,
3983         * device/lib/mcs51/crtxinit.asm,
3984         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
3985         to avoid confusion with Si Lab's SFRPAGE register.
3986
3987 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3988
3989         * src/SDCCglue.c (emitMaps): allow public sfr variables
3990         * src/SDCCglue.c (initialComments): include compiler build date
3991         with compiler version and put the timestamp of the generated
3992         assembly file on a serperate line to be less confusing.
3993         * src/port.h: added genInitStartup hook
3994         * src/avr/main.c,
3995         * src/ds390/main.c,
3996         * src/hc08/main.c,
3997         * src/pic/main.c,
3998         * src/pic16/main.c,
3999         * src/xa51/main.c,
4000         * src/z80/main.c: genInitStartup initialize as NULL (default to
4001         historical behaviour)
4002         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
4003         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
4004         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
4005         library instead of hard coding it into the compiler.
4006         * support/regression/ports/mcs51-stack-auto/spec.mk,
4007         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
4008         * device/lib/mcs51/Makefile,
4009         * device/lib/small/Makefile,
4010         * device/lib/large/Makefile,
4011         * device/lib/mcs51/crtpagesfr.asm,
4012         * device/lib/mcs51/crtstart.asm,
4013         * device/lib/mcs51/crtxclear.asm,
4014         * device/lib/mcs51/crtxinit.asm,
4015         * device/lib/mcs51/crtclear.asm,
4016         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
4017         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
4018         and into user configurable files.
4019         * device/lib/clean.mk: clean mcs51 directory too
4020         * support/regression/tests/longlit.c: added static to T1 declaration
4021         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
4022         accesses in the initialization code
4023
4024 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4025
4026         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
4027         OSCTRIMVAL as noted in bug #916008
4028
4029 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4030
4031         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
4032         in loops with multiple exits (reported as incorrect registers
4033         used by Martin Helmling in Sdcc-user list)
4034
4035 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4036
4037         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
4038         made ds390 register extensions look less like error messages
4039
4040 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4041
4042         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
4043         reported by Adam Wozniak in Sdcc-user list
4044
4045 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
4046
4047         * src/SDCCast.c (decorateType): fixed with bug and promotion in
4048         arithmetic optimizations, added debug output
4049
4050 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
4051
4052         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
4053         * sdcc.spec: updated and split sdcc into 3 rpms
4054         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
4055         needed for literals of LEFT_OP and '+'
4056         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
4057         introduced RESULT_TYPE_NOPROM
4058         (geniCodeMultiply): fixed logic for decision if mul is optimized to
4059         left shift
4060         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
4061         limited promotion to int only for '*'
4062         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
4063
4064 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
4065
4066         * src/pic16/gen.c (genSkip),
4067         (genc16bit2lit), (gencjneshort): commented out
4068         (is_LitOp): new helper function, checks operand type
4069         (genCmpEq): rewritten
4070
4071 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
4072
4073         * support/regression/tests/bug-908454.c: added
4074
4075 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
4076
4077         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
4078         * src/SDCCicode.c (usualBinaryConversions): op needs int type
4079         (geniCodeCast): cosmetic, don't preserve bit storage class
4080         (geniCodeLeftShift): added promotion
4081         (geniCodeLogic): fixed regression
4082         * src/SDCCsymt.c (computeTypeOr): accept bits too
4083         (compareType): 2nd part of fix for bug #908454, needed for bitfields
4084
4085 2004-03-07  Borut Razem <borut.razem AT siol.net>
4086
4087         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
4088
4089 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
4090
4091         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
4092         version of pic16_genPackRegisters which does not check if ic is a
4093         CAST operator,
4094         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
4095         function cause string1.c regression test fails
4096
4097 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
4098
4099         * sim/ucsim/configure.in,
4100         * sim/ucsim/configure,
4101         * sim/ucsim/doc/Makefile.in: use docdir
4102         * src/SDCC.y: fixed sbit atrributes
4103         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
4104         * src/SDCCast.c (decorateType): |^& need special promotion handling
4105         * src/SDCCast.h,
4106         * src/SDCCsymt.h: moved definition of RESULT_TYPE
4107         * src/SDCCsymt.h (computeType),
4108         * src/SDCCicode.c: computeType() needs op
4109         * src/SDCCsymt.c (checkTypeSanity),
4110         * doc/sddman.lyx: "plain" bitfields are unsigned
4111         * src/SDCCsymt.c (computeTypeOr): added
4112         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
4113         |^& ops
4114         * src/SDCCval.c (val*): computeType() needs op
4115         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
4116         * support/regression/tests/onebyte.c: added tests for |^&
4117
4118 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
4119
4120         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
4121         for writing icode into asm output.
4122
4123 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
4124
4125         * src/pic16/device.c: added some debug lines enabled
4126         with macro DEBUG_CHECK,
4127         * src/pic16/genarith.c: more debug in genPlus,
4128         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
4129         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
4130         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
4131         * (aopForSym): onStack symbols are re-placed in data memspace,
4132         and onStack flag is cleared,
4133         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
4134         copy temporary pcodeop,
4135         * (genPcall): added warning for not updating PCLATU,
4136         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
4137         always true for pic16 port,
4138         * (genMultOneWord): NEW, supports integer multiplication,
4139         * (genMult): modified to call genMultOneWord,
4140         * (ifxForOp): added warning when return NULL,
4141         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
4142         flag is set before call to operandFromSymbol for implicit
4143         added structures,
4144         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
4145         options.intlong_rent are set by default,
4146         * (_hasNativeMulFor): modified to allow port generation of integer
4147         multiplication,
4148         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
4149         set regtype to REG_SFR for all registers, restricting seting the
4150         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
4151
4152 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4153
4154         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
4155         more than 500 times in the regression tests
4156
4157 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4158
4159         * support/Util/SDCCerr.h,
4160         * support/Util/SDCCerr.c,
4161         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4162         enumerator_list),
4163         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
4164         for symbol conflicts.
4165         * support/valdiags/tests/enum.c,
4166         * support/valdiags/tests/tentdecl.c,
4167         * support/valdiags/tests/struct.c: expect possible error messages
4168         referring to original symbol definitions.
4169         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
4170         * src/SDCCsymt.h,
4171         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
4172
4173 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
4174
4175         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
4176
4177 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
4178
4179         * src/pic16/ralloc.c (newReg): fixed bug #908929
4180
4181 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4182
4183         * src/ds390/gen.c: added missing #include "main.h"
4184
4185 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
4186
4187         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
4188         checking if symbol is already in set,
4189         * src/pic16/device.h: prototype for checkAddSym,
4190         * src/pic16/gen.c: (_G): added entry interruptvector,
4191         * (assignResultValue): removed some commented out lines,
4192         * (genFunction): check for ISR via sym->type, absolute section for
4193         interrupt code is created via a new pBlock, the goto instruction is
4194         placed now correctly at the interrupt vector position, changed all
4195         references from ivec to _G.interruptvector,
4196         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
4197         is the interrupt is a high priority one, same for return from ISR,
4198         * src/pic16/glue.c: changed all calls of addSetHead for publics and
4199         externs to calls of checkAddSym,
4200         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
4201         pic16_pcode_verbose flag is set,
4202         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
4203         * src/pic16/pcoderegs.c: message about how many registers are saved
4204         will only be emitted if pic16_pcode_verbose flag is set,
4205
4206 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4207
4208         * src/ds390/ralloc.h,
4209         * src/ds390/ralloc.c (ds390_regWithIdx),
4210         * src/ds390/gen.c (emitcode),
4211         * src/ds390/main.h,
4212         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
4213         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4214         ds390operandCompare, getRegsRead, getRegsWritten,
4215         initializeAsmLineNode): customized instruction size calculation for
4216         ds390, started basis for some register optimizations
4217         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
4218         corresponding assembly output
4219         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
4220         missing push/pop of r0/r1. Optimized push/pops
4221
4222 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4223
4224         * src/mcs51/main.c (instructionSize): fixed ACALL size
4225         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
4226
4227 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
4228
4229         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
4230         the sorting of rlist with NULL elements
4231         * (print_idataType, print_idata): NEW to create idata sections
4232         * src/pic16/device.h: idataSymSet new variable
4233         * src/pic16/gen.c (genFunction): fixed some bugs in string
4234         comparing, improved the absolute section creation for ISRs,
4235         added FSR0L/FSR0H in registers that are saved in an ISR,
4236         * (genInline): fixed the processing of inline snippets,
4237         now they undergo no process by the peephole optimizer
4238         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
4239         are placed in idataSymSet,
4240         * (pic16emitStaticSeg): extern symbols are added in externs,
4241         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
4242         switching when aboslute variables are placed in access bank memory
4243         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
4244         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
4245         commented out with #if,
4246         * (pic16_packRegisters): reintroduce the check for CAST because some
4247         symbols are not correctly handled,
4248         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
4249         pCodeInstruction instead of pCode,
4250         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
4251         pCodeAsmDir definition,
4252         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
4253         directive, then the argument directive is emitted without the leading
4254         tab, hack for inline labels which must be in the first column,
4255         * (compareLabel,pic16_findNextInstruction),
4256         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
4257         * (insertBankSwitch): modified for the new pCodeAsmDir,
4258
4259 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4260         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
4261
4262         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
4263         instance,
4264         * (pushSide): commented out with #if,
4265         * (assignResultValue): fixed some typos in saving
4266         registers,
4267         * (genPcall): FIXED and sync'ed with genCall,
4268         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
4269         * (genNearPointerGet): fixed to handle some more cases,
4270         implementation scheme via table reads,
4271         * (genConstPointerGet): modified to access code memory correct,
4272         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
4273         and improved to handle some cases
4274         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
4275         instead of "RETLW" for init data
4276         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
4277         not IN_DIRSPACE, work around to reduce bank switching when aboslute
4278         variables are placed in access bank memory (<0x80 and >=0xf80),
4279         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
4280         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
4281         TBLWT_POSTDEC,TBLWT_PREINC
4282         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
4283         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
4284         directives
4285         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
4286         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
4287         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
4288         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
4289
4290 2004-02-29  Borut Razem <borut.razem AT siol.net>
4291
4292         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
4293         support/Util/findme.h, support/Util/system.h: enhance binary relative
4294         search for lib and include by using findProgramPath()
4295
4296 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4297
4298         * src/SDCCpeeph.h,
4299         * src/SDCCpeeph.c (pcDistance),
4300         * src/port.h,
4301         * src/mcs51/ralloc.h,
4302         * src/mcs51/ralloc.c (mcs51_regWithIdx),
4303         * src/mcs51/main.h,
4304         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
4305         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
4306         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
4307         size calculation port specific, started basis for some register
4308         optimizations
4309         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
4310         missing push/pop of r0/r1. Optimized push/pops
4311         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
4312         * device/lib/_modsint.c (_modsint),
4313         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
4314         and stack version so regression tests pass
4315
4316 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
4317
4318         * src/Makefile.in (dep): include SLIBOBJS in dependency check
4319         * src/SDCCast.c (decorateType): catch another small optimization
4320         with '?' operator
4321         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
4322         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
4323         modified to finally use computeType() all over SDCC,
4324         see Feature Request #877103
4325         * src/SDCCval.h: cosmetic
4326         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
4327         valCompare(); regression tested in muldiv.c
4328         * support/regression/tests/muldiv.c (testMod): mod sign follows
4329         dividend only
4330
4331 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
4332
4333         * src/SDCCast.c (decorateType): fixed bug #902362
4334         * doc/INSTALL.txt: fixed install instructions for win32
4335
4336 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
4337
4338         * device/include/Makefile.in (install): fixed by replacing spaces
4339         by tabs
4340         * doc/README.txt,
4341         * doc/INSTALL.txt: updated for release
4342         * doc/sdccman.lyx: added warning for --xstack being buggy
4343
4344 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
4345
4346         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
4347         to eliminate build warnings.
4348         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
4349
4350 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
4351            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4352
4353         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
4354         removed -penable-stack, added comment for stack pragma, added
4355         warning for not initializing the stack/frame registers, removed
4356         comment at interrupts section
4357
4358         Stack is made permanent, there is no ability to disable stack usage.
4359         * src/pic16/device.h,
4360         * src/pic16/device.c: removed all references to USE_STACK macro,
4361         * src/pic16/device.c (pic16_dump_section): when no elements in
4362         rlist, free rlist before return,
4363         * (pic16_dump_int_registers): NEW, internal registers are a new set
4364         of general purpose registers reused by each function,
4365         * (checkAddReg): returns 1 if registers is added to set,
4366         * (pic16_groupRegistersInSection): when a registers is of type
4367         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
4368         * src/pic16/device.h: memRange and Assigned Memory are deleted,
4369         SRCASECMP macro is moved here from device.c
4370         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
4371         PO_PCLATU, PO_PRODL, PO_PRODH,
4372         * (pic16_pCodeOpType, genMinus,
4373         changed compares to "a" register, with AOP_ACC,
4374         * (pic16_genPlus): fixed some bugs and indented properly,
4375         * (pic16_addSign): changed size to size+offset in the MOVWF
4376         instruction,
4377         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
4378         multiply 8-bit operand by literal, result is 8-bit,
4379         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
4380         multiply 2 8-bit operand, result is 8-bit,
4381         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
4382         genUMult8X*_16,
4383         * src/pic16/gen.c: changed accUse to contain WREG only,
4384         * (pic16_emitcomment): renamed to pic16_emitpcomment,
4385         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
4386         true, do not use immediate addressing any more unless sym is a
4387         pointer in codespace,
4388         * (aopForRemat): do not use immediate addressing when symbol not in
4389         codespace and when symbol's address is requested,
4390         * (aopOp): for-loop in if(sym->accUse) is modified for the new
4391         accUse size (= 1),
4392         * (aopGet): added case for AOP_ACC and don't return "accumulator
4393         bug" but WREG instead,
4394         * (popGetTempReg): pushes contents of temporary register in stack,
4395         * (popReleaseTempReg): pops contents of temporary register from
4396         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
4397         * (pic16_popGet): separated case AOP_ACC to return register WREG
4398         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
4399         or PO_IMMEDIATE and initializes their instance/offset appropriately,
4400         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
4401         the use of immediate pointers to certain cases only.
4402
4403         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
4404         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
4405         * (assignResultValue, genCall, genRet): modified to use the new
4406         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
4407         genPcall is still broken,
4408         * (genFunction): added code to create 'A' type pBlocks when
4409         interrupt functions are generated, code not extensively tested yet,
4410         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
4411         * (genEndFunction): modified so ISRs pop stored registers from stack,
4412         * (genMultOneByte): cleanup,
4413         * (AccRsh): added flag andmask, to and result with appropriate mask,
4414         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
4415         * (genDataPointerGet): fixed and reenabled its use,
4416         * (genNearDataPointerGet): bugs fixed,
4417         * (genDataPointerSet): bugs fixed,
4418         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
4419         pic16_DumpSymbol, pic16_DumpOp,
4420         * src/pic16/genutils.h: function prototypes for the above functions,
4421         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
4422         pointers,
4423         * (pic16emitRegularMap): many many many improvements, but needs a
4424         major cleanup,
4425         * src/pic16/main.c: enable_stack in pic16_options is removed,
4426         * (_pic16_parseOptions): removed command line options -penable-stack,
4427         * (_process_pragma): emit stack symbol only when stack pragma is
4428         processed,
4429         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
4430         redirected to FSR0L/FSR0H pair,
4431         * (pic16_get_op, pic16_get_op2): modifications and improvements,
4432         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4433         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
4434         for immediates,
4435         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
4436         * (dumpPicOptype): NEW,
4437         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
4438         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
4439         with movff instruction,
4440         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
4441         added pic16_int_regs, some packRegsFor* functions are commented out,
4442         because produce errors,
4443         * src/pic16/NOTES: minor modifications
4444
4445 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4446
4447         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
4448         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
4449         --pack-iram.
4450         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
4451         * as/mcs51/lkaomf51.c: fixed bug #895763
4452
4453 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
4454
4455         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
4456
4457 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4458
4459         * doc/sdccman.lyx: added details about the HC08 storage classes and
4460         interrupts, fixed the register usage info for z80 & gbz80
4461
4462 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
4463
4464         * doc/sdccman.lyx: added more pic16 port documentation
4465         * device/include/pic16/: added header pic18fregs.h
4466
4467 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
4468
4469         * doc/sdccman.lyx: added Vangelis' contribution
4470
4471 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4472
4473         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
4474         extend to the next CALL or PCALL, not just to the next CALL.
4475
4476 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
4477
4478         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
4479
4480 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4481
4482         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
4483         bug #895752 and a better fix for bug #716790
4484
4485 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4486
4487         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
4488
4489 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4490
4491         * doc/sdccman.lyx: minor changes, minor changed
4492
4493 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
4494
4495         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
4496         which can't handle SDCC_NEWONEBYTEOPS,
4497         (geniCodeMultiply): removed conversion from mult to shift for pic14
4498         and pic16
4499
4500 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4501
4502         * src/hc08/gen.h,
4503         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
4504         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
4505         thus fixing bug #895406
4506
4507 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
4508
4509         * device/lib/_modsint.c,
4510         * device/lib/_modslong.c: sign follows divisor only
4511         * src/hc08/gen.c (genMultOneByte): if result size is 1,
4512         signs or signedness can be ignored
4513         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
4514         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
4515         added optimization for IFX,
4516         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
4517         arguments;
4518         reenabled optimization for IFX, which was removed on 2004-01-11
4519         * src/SDCCast.h: added return type IFX
4520         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
4521         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
4522         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
4523         SDCC_OLDONEBYTEOPS selects the old behaviour
4524         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
4525         changed again and commented promotion rule
4526         * src/SDCCval.c (valDiv): promotion no longer necessary
4527         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
4528         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
4529         rewritten
4530         * support/regression/tests/onebyte.c: added
4531
4532 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
4533
4534         * gen.c (genInline): reverted to old code for assemnling inline
4535         code because of bug reported James Chadd
4536
4537 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
4538
4539         * ralloc.h: missing declarations from previous patch,
4540         seems that patch for ralloc.h was never applied, fixed
4541
4542 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4543            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
4544
4545         * pcode.c,
4546         * pcode.h,
4547         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
4548         indirect addressing. Marked FSR0 as deprecated
4549         * gen.c (pointerCode): commented out, not needed now
4550         (pic16_popGet2p): new MOVFF helper function
4551         (genGenPointerGet),
4552         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
4553         (shiftRLong): removed duplicate debugging info
4554
4555 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4556
4557         * src/ds390/gen.c (genNearPointerGet),
4558         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
4559         optimization with bits, but not bitfields.
4560         * src/ds390/ralloc.c (packRegisters),
4561         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
4562
4563 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
4564
4565         * src/SDCCcse.c (algebraicOpts): copy operands before modification
4566
4567 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4568
4569         * src/SDCCsymt.h,
4570         * src/SDCCicode.c (operandFromSymbol),
4571         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
4572         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
4573         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
4574         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
4575         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
4576         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
4577         bug #892038
4578         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
4579         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
4580         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
4581         * src/SDCCsymt.c (newSymbol),
4582         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4583         enumerator_list),
4584         * src/SDCCval.h,
4585         * src/SDCCval.c (newiList): fixed bug #885705
4586
4587 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4588
4589         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
4590         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
4591
4592 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4593
4594         * device/include/c8051f120.h,
4595         * device/include/c8051f300.h,
4596         * device/include/c8051f310.h: added/updated header files for Silicon
4597         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
4598         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
4599         in new section Submitting patches
4600
4601 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4602
4603         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
4604         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4605         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4606         genGenPointerSet),
4607         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
4608         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4609         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4610         genGenPointerSet),
4611         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
4612         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4613         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4614         genGenPointerSet),
4615         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
4616         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4617         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4618         genGenPointerSet): fixed bug #892400
4619         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
4620         to eliminate build warnings.
4621         * src/SDCCast.c (processParms),
4622         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
4623         fixed bug 751859
4624         * support/valdiag/valdiag.py: added GCC to the list of defines active
4625         when compiling with gcc
4626
4627 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4628
4629         * support/Util/SDCCerr.h,
4630         * support/Util/SDCCerr.c,
4631         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
4632         with an incomplete type (fixed bug #883734)
4633         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
4634
4635 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4636
4637         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
4638
4639 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4640
4641         * src/SDCCast.c (decorateType),
4642         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
4643         function pointer implementation
4644         * support/regression/tests/funptrs.c: added tests to verify both forms
4645         of function pointers work correctly. Added tests to verify parameters
4646         are passed in the correct order.
4647
4648 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
4649
4650         * device.c (regCompare): registers are sorted by ascending
4651         address and increasing size,
4652         * main.c (_pic16_finaliseOptions): removed the declaration
4653         of compiler macro MCU. Now a macro of the format pic18fxxxx
4654         will be defined from the command line
4655
4656 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4657             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
4658
4659         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
4660         PCOP_RLCF was overwritten!
4661         * gen.c (genSkip): commented out calls to pic16_emitcode,
4662         * (genCmpEQ): fixed "long" compares, only high word did get compared,
4663         * (genlshTwo),
4664         * (genRRC): added debugging info,
4665         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
4666         overwritten while shifting,
4667         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
4668         overwritten while shifting,
4669         * (AccLsh),
4670         * (AccRsh),
4671         * (shiftLLeftOrResult),
4672         * (shiftRLeftOrResult),
4673         * (shiftRLong),
4674         * (shiftLLong): Implemented with pic16_emitpcode
4675         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
4676         * (genLeftShift): Fixed bug, operand for shift by variable always
4677         was "and"ed with 0x0f,
4678         * (genLeftShiftLiteral),
4679         * (genrshTwo),
4680         * (genRightShiftLiteral): added debugging info,
4681         * (genrshFour): added comment,
4682         * (genRightShift): determined signedness from operand "left"
4683         instead of "result"
4684
4685 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4686
4687         * src/SDCCicode.c (geniCodeParms),
4688         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
4689         function pointers, fixed function pointer bugs #861242 and #861896
4690
4691 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4692
4693         * device/include/c8051f000.h,
4694         * device/include/c8051f120.h,
4695         * device/include/c8051f300.h: added header files for Silicon
4696         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
4697
4698 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
4699
4700         * src/SDCCast.c (processParams): added new type flow and restructured
4701         (gatherAutoInit): added new type flow
4702         (addCast): cosmetic changes
4703         (getLeftResultType): added new type flow for array indices, patch
4704         provided by Stas, see FR #877103
4705         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
4706         array index patch by Stas
4707         * src/SDCCast.h: added prototype getResultTypeFromType()
4708         * src/SDCCval.h,
4709         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
4710         * src/pic/glue.c (pic14emitStaticSeg),
4711         * src/pic16/glue.c (pic16emitStaticSeg),
4712         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
4713         for initialization of symbols
4714         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
4715         * support/Util/SDCCerr.h:
4716         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
4717         * .version: bumped version number to 2.3.8
4718         * device/include/Makefile.in (install),
4719         * doc/Makefile (install): changed to 'rm `find ...`' construct to
4720         avoid warnings
4721
4722 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
4723
4724         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
4725         Slade Rich fixed an optimization bug
4726         * src/pic/pcodepeep.c,
4727         * src/pic/pcoderegs.c
4728         * doc/Makefile (install): added test for directory
4729
4730 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4731
4732         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
4733         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
4734         * src/pic/ralloc.c (getRegPtr, getRegGpr),
4735         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
4736         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
4737         * as/mcs51/asexpr.c (term),
4738         * as/hc08/asexpr.c (term): fixed bug #887146
4739
4740 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4741
4742         * src/z80/gen.c (genMult): handle single byte result product
4743         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
4744         DUMMY_READ_VOLATILE (fixed bug #886367)
4745
4746 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
4747
4748         * support/regression/tests/libmullong.c: fixed logic, on little endian
4749         hosts we ended without a mullong_wrapper()
4750
4751 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4752
4753         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
4754         virus/worm forged address usage.
4755
4756 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
4757
4758         Fixed promotion, it should be done on AST level:
4759         * src/SDCCast.c (addCast): added promotion to int
4760         (decorateType): updated call to upCast()
4761         * src/SDCCicode.c (geniCodeLeftShift): removed call to
4762         usualUnaryConversions()
4763
4764 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
4765
4766         * support/regression/tests/literalop.c (mulWrapper): Added a
4767         wrapper to remove integer overflow warnings.
4768
4769         * support/regression/tests/float_trans.c: Made work on host.
4770
4771         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
4772         location of sz80.
4773
4774         * support/regression/generate-cases.py (main): Changed from inline
4775         to a main method.
4776
4777         * doc/Makefile (install): Changed to depth first to get rid of
4778         missing directory install warning.
4779
4780         * as/Makefile (install-doc): Made work on Mac.
4781
4782 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
4783
4784         * src/SDCCast.c: added an additional type flow in decorateType() of
4785         opposite direction, see feature request #860006; it's enabled at runtime
4786         by setting the environment variable SDCC_NEWTYPEFLOW
4787         * src/SDCCast.h: changed prototype of decorateType()
4788         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
4789         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
4790         'char' to 'int' can be omitted, if both operands are 'unsigned char';
4791         see feature request #877103
4792         * src/SDCCval.c: updated call of decorateType()
4793         (valBitwise): fixed bug #882876
4794         (valMinus): added promotion
4795         (valLogicAndOr): result is unsigned
4796         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
4797         * src/SDCCsymt.c (computeType),
4798         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
4799         must not cause an unsigned operation
4800         * src/pic/glue (pic14emitRegularMap),
4801         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
4802
4803 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
4804
4805         * src/pic/pcode.c (PCodeID): commented out left over debug code
4806
4807 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
4808
4809         * support/valdiag/tests/overflow.c: added shift tests
4810         * src/pic/device.c,
4811         * src/pic/gen.c,
4812         * src/pic/gen.h,
4813         * src/pic/glue.c,
4814         * src/pic/main.c,
4815         * src/pic/pcode.c,
4816         * src/pic/pcode.h,
4817         * src/pic/pcodepeep.c,
4818         * src/pic/pcoderegs.c,
4819         * src/pic/ralloc.c,
4820         * src/pic/ralloc.h: applied patch from Slade Rich;
4821         added support for multiple code pages and multiple RAM banks on the
4822         PIC 14 port. The ASM files now no longer simply assume all the
4823         code / RAM are in the same page / bank. This means the linker can
4824         safely allocate code/RAM of separate ASM files to different pages/banks.
4825         * doc/sdccman.lyx: added Slade's tips
4826         * src/mcs51/peeph.def: fixed bug #880768
4827
4828 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4829
4830         * src/hc08/ralloc.c (rematStr): fixed bug #879282
4831         * src/SDCCast.c (decorateType): fixed bug #880197
4832
4833 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
4834
4835         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
4836         getopt.h.
4837
4838         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
4839         strtof is not part of C89 and isn't included with Mac OS X.
4840
4841 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4842
4843         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
4844         shiftL2Left2Result): fixed bug #879326
4845         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
4846         (genMultOneByte): fixed bug in signed vs unsigned multiplication
4847         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
4848         address fetch for clr instruction
4849         * device/lib/hc08/_mulint.c: created optimized assembly version
4850         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
4851
4852 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
4853
4854         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
4855         proposed in FR #877103
4856
4857 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
4858
4859         * src/SDCCval.c (cheapestVal): added missing checks
4860         * src/SDCCicode.c (usualBinaryConversions): fixed condition
4861         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
4862
4863 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
4864
4865         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
4866         equal operands
4867
4868 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
4869
4870         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
4871         loaded with the linker search paths (-L arguments) and the libraries
4872         to be linked with the current source (-l arguments). Changes
4873         currently will affect only the pic16 port.
4874         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
4875         include path the port specific paths and port specific libraries,
4876         * gplink command now contains the $3 argument,
4877         * src/pic16/device.h,
4878         * src/pic16/device.c,: structure PIC_device is made public and
4879         renamed to PIC16_device, the same for variable Pics which is renamed
4880         to Pics16. Updated all references to them.
4881         * src/pic16/glue.c (pic16glue): corrected bug with code
4882         initialization which bypassed the variable initializations block.
4883
4884         * device/lib/pic16/Makefile.rules: removed --penable-stack from
4885         COMPILE_FLAGS and added the --nostdinc option
4886
4887 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4888
4889         * device/include/mc68hc908jb8.h: Register defs for another member
4890         of the hc08 family. Contributed by Bjorn Bringert - thanks!
4891
4892 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
4893
4894         Documenting changes from previous commits.
4895         * configure.in (version 1.56),
4896         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
4897         when generating output files to configure the pic16 library,
4898         but now I've commented it out, since gputils aren't installed in the
4899         SF compile farm, so library won't compile
4900
4901         * device/lib/Makefile.in (version 1.56): initially I've added in
4902         target 'all' the prerequestive 'model-pic16' so it compiled the
4903         pic16 library, but now I've commented it out for the same reasons
4904         above,
4905         * added targets 'model-pic16' and 'objects-pic16' to compile the
4906         library
4907         * added target 'port-specific-objects-pic16' to handle the
4908         generated libraries and copy them into the build/ directory
4909         * added target 'clean-intermediate-pic16' to clean intermediate
4910         files into pic16 directory
4911         * in target 'installdirs' added line to create directory pic16 in
4912         the installation path
4913
4914         * device/include/Makefile.in (version 1.11): in target 'install'
4915         added lines to copy all header files to installation path,
4916         * in target 'installdirs' added line create directory for pic16
4917         headers in the installation path
4918
4919 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
4920
4921         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
4922          a function call
4923
4924 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
4925
4926         * configure,
4927         * device/lib/configure.in,
4928         * device/lib/configure: fixed for autoconf 2.57
4929
4930 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4931
4932         * src/z80/main.c (_parseOptions): fixed the portmode= command line
4933         option so that it actually works. Made it specific to the z80, since
4934         the gbz80 doesn't have these kinds of I/O ports.
4935
4936 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4937
4938         * device/include/z180.h,
4939         * device/lib/_memcpy.c,
4940         * device/lib/_memmove.c,
4941         * device/lib/_mulint.c,
4942         * device/lib/ser_ir.c,
4943         * device/lib/ser_ir_cts_rts.c,
4944         * device/lib/_strcmp.c,
4945         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
4946         * src/z80/main.c (_process_pragma): add support for pragmas bank and
4947         portmode; added deprecation warning for bank= and protmode= forms.
4948         Also, guard against buffer overflow.
4949         * src/z80/gen.c (aopGet): generate better code for sfr banked read
4950
4951 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4952
4953         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
4954         changed interrupt vector table generation to only emit declared vectors.
4955         * device/include/Makefile.in: added missing backslash
4956         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
4957
4958 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
4959
4960         Mainly changes to support compilation of the device libraries
4961         * src/pic16/device.c: stack is allocated via symbol and not
4962         via literal number. The symbol is placed in the corresponding
4963         position of the data ram
4964         * (pic16_dump_section): relocatable and absolute uninitialized
4965         data are now emitted in sorted order to reduce section naming,
4966         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
4967         weren't marked as being in the access bank,
4968
4969 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
4970
4971         Added portion of GNU PIC Library under the directory
4972         device/include/pic16 and device/lib/pic16. These files
4973         contain the declarations of SFRs for the PIC18Fxx2 devices.
4974         The directory is initialized via configure from toplevel.
4975
4976 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
4977
4978         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
4979         the spilllocations to be compared correctly
4980
4981 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
4982
4983         * src/SDCCast.c (decorateType): fixed bug introduced today
4984
4985 2004-01-12  Borut Razem <borut.razem AT siol.net>
4986
4987         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
4988         doc/sdccman.lyx: upper case pragmas are deprecated
4989
4990 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
4991
4992         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
4993         in simpler and even better code
4994
4995 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
4996
4997         * src/SDCCicode.c (operandOperation): fixed bug #874819
4998         * src/SDCCast.c (decorateType): fixed
4999         char foo (unsigned long ul) { return ul > 0; }
5000
5001 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5002
5003         * doc/sdccman.lyx: Moved and added some sections, small changes
5004         all over. Telling LaTeX to be less strict with word spacing
5005         to better keep the right margin. Changed some notes about
5006         maintainance of the ports in section 3.2.1 - is it OK like this?
5007
5008 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
5009
5010         SDCC source changes:
5011         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
5012         convilong): modified to inform the pic16 port that builtin functions
5013         are external
5014
5015         PIC16 PORT specific changes:
5016         * src/pic16/device.c pic16_dump_equates() added,
5017         processor registers declared internally by the port are emitted in
5018         the translation as equates,
5019         * src/pic16/gen.c: inline code is passed unprocessed to the
5020         translation,
5021         * (pic16_popGetLit2): fnuction modified to take second operand as
5022         pCodeOp pointer and not as literal,
5023         * (popRegFromIdx): prefixed with pic16_,
5024         * (pic16_popCombine2): modified to receive already allocated pCode
5025         operands,
5026         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
5027         * (genFunction): initializes local stack frame and pushes on stack
5028         all the registers used by this function,
5029         * (genEndFunction): restores all registers from stack and restores
5030         stack frame,
5031         * src/pic16/glue.c (pic16emitRegularMap): various changes and
5032         improvements,
5033         * (pic16glue): changed the program startup sequence,
5034         * added new dbName code 'A' for functions placed in absolute section
5035         * src/pic16/main.c: added function attribute _naked,
5036         * added pragma 'code' to place a fnuction at an absolute address,
5037         * added command line arguments --debug-ralloc and --pcode-verbose,
5038         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
5039         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
5040         * (pic16_newpCodeOpLit2): modified to take the second operand as
5041         pCodeOp pointer,
5042         * (pic16_printpBlock): modified to emit each function in a separate
5043         section,
5044         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
5045         UPPER for immediate operands,
5046         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
5047         instruction,
5048         * src/pic16/peeph.def: all peepholes with movff are commented out,
5049         because there is a problem in the pcode peep optimizer,
5050         * src/pic16/ralloc.c: the register allocator can now reuse local
5051         function symbols for another function. This saves register usage.
5052         * src/pic16/ralloc.h: added flag isLocal in structure regs,
5053
5054         Added file src/pic16/NOTES with information about program writing on
5055         the current port version.
5056
5057 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5058
5059         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
5060         and peephole 252 (array access)
5061
5062 2004-01-09  Borut Razem <borut.razem AT siol.net>
5063
5064         * src/SDCCmain.c : fixed #872250: -l command line defined library
5065           files are scanned before standard library files
5066
5067 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5068
5069         * src/SDCCast.c (decorateType): fixed bug #874046
5070
5071 2004-01-09  Borut Razem <borut.razem AT siol.net>
5072
5073         * support/scripts/sdcc.nsi: remove previous installation
5074
5075 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5076
5077         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
5078         bytes for last interrupt vector (mcs51)
5079         * sdcc.spec: fixed typo
5080
5081 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5082
5083         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
5084         gen51Code): more efficient parameter receive for --model-large
5085         ("bug" #845294)
5086
5087 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5088
5089         * src/ds390/main.c,
5090         * src/z80/main.c: added missed needLinkerScript flags (more than
5091         one port structure defined in these file)
5092         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
5093         bug #795325
5094
5095 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
5096
5097         * src/SDCCmain.c: removed various references to DEFAULT_PORT
5098         * src/port.h: added flag needLinkerScript in port->linker
5099         structure to inform whether to create a .lnk file or not,
5100         * src/avr/main.c,
5101         * src/ds390/main.c,
5102         * src/hc08/main.c,
5103         * src/mcs51/main.c,
5104         * src/pic/main.c,
5105         * src/pic16/main.c,
5106         * src/xa51/main.c,
5107         * src/z80/main.c: changed appropriately to configure
5108         needLinkerScript flag
5109         * src/pic/gen.c,
5110         * src/pic16/gen.c (genAddrOf): fixed bug #863624
5111         * src/pic/glue.c: added variable udata_section_name to
5112         override default uninitialized data segment definition for
5113         devices only with SHAREBANK memory (reported from Erik Epetrich)
5114         * (pic14emitOverlay): modified to emit a commented overlay segment
5115         directive when no overlay data exist
5116         * (picglue): modified to emit uninitialized data segment
5117         according to udata_section_name
5118         * src/pic/main.c (_pic14_parseOptions): added command line
5119         options --udata-section-name=[name] to override default
5120         udata definition name
5121         * modified _linkCmd and _asmCmd to include compiler passed
5122         arguments via -W option
5123         * src/pic16/main.c: added $l in _asmCmd, changed extension for
5124         object file from '.rel' to '.o' in port->linker structure,
5125         changed size of fptr from 2 to 3 in port structure
5126
5127 2004-01-07  Borut Razem <borut.razem AT siol.net>
5128
5129         * support/scripts/sdcc.nsi: update PATH
5130         * support/scripts/sdcc.ico: craeted
5131
5132 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
5133
5134         * device/include/Makefile.in: fix install
5135         * doc/Makefile: fix install
5136
5137 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5138
5139         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
5140         in bug #860505
5141         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
5142         how the function variable allocation summary is displayed; also
5143         include information about variables allocated to the overlay
5144         segment
5145
5146 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5147
5148         * as/mcs51/lkmain.c: Help about -Y option
5149         * as/mcs51/lkarea.c: Fixed gcc warnings
5150
5151 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5152
5153         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
5154         fixed warning
5155         * support/valdiag/tests/overflow.c: added
5156         * src/SDCCast.c (decorateType),
5157         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
5158         LEFT_OP (left shift)
5159
5160 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5161
5162         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
5163         (default behaviour).
5164
5165 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5166
5167         A python script to validate compiler diagnostic messages. It can be
5168         used to verify that sdcc complains about bad c source code and
5169         gives a good location of the error.
5170         * support/valdiag/Makefile,
5171         * support/valdiag/valdiag.py,
5172         * support/valdiag/tests/*
5173
5174 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5175
5176         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
5177         * src/SDCCsymt.c (newEnumType),
5178         * src/SDCCsymt.h
5179         * support/Util/SDCCerr.c,
5180         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
5181         enum related bugs.
5182         * support/regression/tests/enum.c: added test for enum values that
5183         require at least 2 bytes of storage.
5184
5185 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5186
5187         * src/common.h: added ifndef/define/endif macros
5188         around the header file.
5189         Bug reported from Jesus Calvino-Fraga
5190
5191 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
5192
5193         * sdcc.spec: updated
5194         * device/include/Makefile.in: don't install CVS directories
5195         * device/lib/Makefile.in: added removal of CVS directories after install
5196         * doc/Makefile: fixed install, added local_icons
5197         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
5198         * src/mcs51/gen.c (genRightShift): fixed bug #870788
5199         * src/ds390/gen.c (genRightShift): fixed bug #870788
5200         * src/SDCCast.c (decorateType): fixed bug #870781
5201
5202 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
5203
5204         PIC16 port related changes:
5205         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
5206         added variable stackPos,
5207
5208         * gen.c: genCall, assignResultValue: added support for
5209         pushing/retrieving function parameters to/from stack,
5210         genFunction,genEndFunction: setup stack frame for the
5211         generated function,
5212         genAddrOf: will be changed according to bug 863624
5213
5214         * added files genutils.c and genutils.h which contain gen*
5215         debugged and optimised functions extracted from gen.c
5216
5217         * glue.c: added variable 'externs' which holds extern symbols,
5218         pic16emitRegularMap: is modified to properly handle relocatable
5219          symbols under the new scheme,
5220         pic16createInterruptVect: is modified
5221         pic16printPublics: is modified to emit 'global' assembler directives,
5222         added pic16_printExterns to print extern symbols,
5223         pic16glue: initializes stack/frame pointer in the beginning of
5224         the assembly output. Temporary hack, will be corrected later,
5225         because gplink yet does not support stack and SDCC does not
5226         yet support a type of crt0.o object to create the final binary.
5227
5228         * Removed many lines that contain 8051 legacy code.
5229         * The code is finally placed under a 'code' directive.
5230         * Added port specific options.
5231
5232         * _process_pragma: simplified since now we do not need *special*
5233         include file to define SFR registers. But a separate header
5234         will be needed. This will be developed later.
5235         * _pic16_parseOptions: added, parses port specific options:
5236         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
5237         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
5238         --preplace-udata-with=
5239
5240         * _pic16_setDefaultOptions: modified to initialize section names,
5241         but hack is temporarly out of order since it needs improvement.
5242         * _pic16_genAssemblerPreamble: configuration words are emitted by
5243         their address instead of their name. This part is incomplete and
5244         supports only the 18Fxx2 devices. Other devices will emit an error
5245         during assembly since they do not contain the same set of config
5246         registers
5247         * _pic16_genIVT: is modified,
5248
5249         * pcode.c: added definitions for some hardware registers that are needed
5250         for stack support
5251         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
5252         All PCI entries are updated. Now LFSR is supported.
5253         * Removed pic16_pciTRIS is mentioned by mdubuc in source
5254         * added pic16_newpCodeOpLit2 to support instructions with
5255         two literal arguments
5256         * pic16_pCode2str: corrected code that emits assembler instructions
5257         with two literal operands and those that have an access bit modifier
5258         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
5259         this fixes a bug which caused some labels to be lost, when an
5260         assembler directive was added, i.e. banksel,
5261         * pic16_FixRegisterBanking: improved logic that causes the insertion
5262         of bank switching,
5263         * InlineFunction: functions that are called once, are not any more
5264         inlined. This can be a port option in the future,
5265
5266         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
5267
5268         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
5269         hold the corresponding uninitialized symbols,
5270         * pic16_allocProcessorRegister: registers have explicit marked the
5271         accessBank field,
5272         * pic16_allocInternalRegister: registers are explicit marked as
5273         not used,
5274         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
5275         processing list, so bit registers were lost,
5276         *
5277
5278         * ralloc.h: added field 'accessBank' and original symbol operand
5279         in register definition,
5280         * removed the field isMapped from register definition,
5281
5282         ** Several functions have been removed from various sources:
5283         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
5284         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
5285         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
5286         pic16_assignRelocatableRegisters
5287
5288         ** others have been introduced:
5289         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
5290         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
5291
5292 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
5293
5294         * support/scripts/inc2h.pl: changed definition of BIT_AT
5295         to emit 'sbit at' instead of 'bit at'. This was a request.
5296
5297         PIC16 port related preliminary changes:
5298         * gen.c: prefixed function popRegFromString with
5299         pic16_ and all references to it corrected
5300         * pcode.c: all pic16_pc_* hardware registers prefixed
5301         with underscore (_),
5302         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
5303         * ralloc.c: newReg(): when register is REG_SFR then
5304         set address to rIdx,
5305         pic16_allocProcessorRegister(): marks register wasUsed=0
5306         pic16_writeUsedRegs(): added a call to assign processor
5307         registers via pic16_assignFixedRegisters
5308
5309 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5310
5311         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
5312         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
5313         variables in unused register banks.  Also the SSEG is placed
5314         wherever there is enough space for it, and IDATA can be anywhere
5315         in internal RAM.  For now compile using -Wl-Y[stack_size].
5316         The mem file is different for this option as well, since it
5317         makes no sense of talking about DSEG lenght.
5318
5319 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
5320
5321         * src/SDCClrange.c: fixed bug 869095 that caused segfault
5322         in certain cases, e.g. when ROM assignment, patch provided
5323         from Albert den Haan.
5324
5325 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
5326
5327         Many signedness and type propagation fixes:
5328         * src/SDCCicode.c: made geniCodeCast() static
5329         replaced SPEC_ by IS_ (cosmetic)
5330         (operandOperation): fixed div and mod operation
5331         (usualBinaryConversions): added support for promotion of char
5332         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
5333         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
5334         (geniCodeAdd): an array index will stay unsigned, even if promoted
5335         from char to int
5336         (geniCodeArray): ditto
5337         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
5338         * src/SDCCsymt.c (computeType): added more support for char;
5339         promotion of char is selectable by promoteCharToInt, fixed signedness
5340         for all cases
5341         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5342         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
5343         * src/SDCCval (val*): replaced signedness calculation by
5344         computeType()
5345         rearranged if-branches (cosmetic)
5346         (valShift): added warning W_SHIFT_CHANGED
5347         (valCompare): fixed problem with different types
5348         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
5349         * support/regression/tests/literalop.c: added many cases
5350         * support/regression/tests/ast_constant_folding.c: changed finally to
5351         'unsigned int'
5352         * .version: new year, new version: 2.3.7
5353         * src/SDCCmain.c (main): applied patch #866468
5354         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
5355         provided by Scott Bronson
5356         * doc/sdccman.lyx: updated documentation for sdcdb
5357         updated and added chapter tips
5358
5359 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5360
5361         * src/SDCCsymt.h: missing from yesterday's commits
5362
5363 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5364
5365         * src/SDCC.y (struct_or_union_specifier),
5366         * support/Util/SDCCerr.c,
5367         * support/Util/SDCCerr.h: verify that struct & union tags are used
5368         as declared.
5369
5370 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5371
5372         * src/SDCCglobl.h: missing from yesterday's commits
5373
5374 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5375
5376         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
5377         sft_attributes, struct_declaration, parameter_declaration,
5378         type_name, start_block, declaration_list),
5379         * src/SDCC.lex (check_type): support redefinition of typedef names
5380
5381 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5382
5383         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
5384         aligned xdata arrays. Erik helped me with the if clause.
5385
5386 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5387
5388         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
5389         warning
5390
5391 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5392
5393         * src/SDCCast.h,
5394         * src/SDCCast.c (newAst_),
5395         * src/SDCCicode.h,
5396         * src/SDCCicode.c (ast2iCode, newiCode),
5397         * src/SDCCglobl.h,
5398         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
5399         expr, statement, expression_statement, selection_statement,
5400         iteration_statement, expr_opt, jump_statement): foundation for tracking
5401         sequence points
5402         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
5403         point code too)
5404
5405 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5406
5407         * support/Util/SDCCerr.c,
5408         * src/SDCCast.h,
5409         * src/SDCCast.c (createCase, createDefault, decorateType),
5410         * src/SDCClabel.c (labelUnreach),
5411         * src/SDCC.y (labeled_statement, jump_statement): More improvements
5412         to error messages.
5413         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
5414         (with thanks to Stas Sergeev)
5415         * device/include/time.h,
5416         * device/lib/time.c (CheckTime): suppress unreachable code warning
5417
5418 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5419
5420         * src/SDCCast.c (createIvalCharPtr),
5421         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
5422         bug #753752)
5423         * support/regression/tests/nullstring.c: tests for these two bugs
5424
5425 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5426
5427         * support/Util/SDCCerr.h,
5428         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
5429         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
5430         about storage class and 'at' used inside struct or union
5431         * src/SDCCBBlock.c (iCodeFromeBBlock),
5432         * src/SDCCcse.c (ifxOptimize),
5433         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
5434         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
5435         printIval, emitStaticSeg, emitOverlay),
5436         * src/SDCClabel.c (deleteIfx),
5437         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
5438         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
5439         gatherAutoInit, processParms),
5440         * support/Util/SDCCerr.h,
5441         * support/Util/SDCCerr.c (werrorfl): Support for better error location
5442         reporting for post-parse errors.
5443
5444 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5445
5446         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
5447         implicit casts via union; they don't work on big endian systems
5448         (possible fix for bug #861138)
5449
5450 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5451
5452         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
5453         * src/mcs51/main.c: fixed the fix for bug #737001
5454
5455 2003-12-15  Borut Razem <borut.razem AT siol.net>
5456
5457         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
5458
5459 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5460
5461         * support/makebin/makebin.c: put output in binary mode
5462
5463 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5464
5465         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
5466         xdata and data memory on startup. Set the environment variable
5467         SDCC_NOGENRAMCLEAR to disable this.
5468         * src/mcs51/peephole.def,
5469         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
5470         (allows non-interrupt and interrupt code to safely compete for a resource
5471         without the non-interrupt code having to disable interrupts)
5472
5473 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5474
5475         * src/SDCCicode.c (geniCodeAdd),
5476         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
5477         with valFromType if type might be a pointer and host is big endian).
5478         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
5479         types, not just integer types.
5480         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
5481         multiply defined with mismatching "at" address.
5482
5483 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5484
5485         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
5486         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
5487         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
5488         with embedded nulls (fixed bug #753752)
5489
5490 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5491
5492         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
5493         Apparently this did not see much testing (endless loop)
5494
5495 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5496
5497         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
5498
5499 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5500
5501         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
5502         gracefully handle NULL memmap pointers
5503
5504 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5505
5506         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
5507         instead of deleting the iCode when an operand is volatile
5508         * src/z80/gen.c (genDummyRead),
5509         * src/mcs51/gen.c (genDummyRead),
5510         * src/ds390/gen.c (genDummyRead),
5511         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
5512         not just IC_RIGHT
5513         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
5514         * src/SDCC.y: fixed bug #850420
5515
5516 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5517
5518         Applied z80 i/o port patch from Peter Townson and fixed some operators
5519         to better handle operands in A register.
5520         * device/include/z180.h
5521         * src/SDCC.y
5522         * src/SDCCglue.c
5523         * src/z80/gen.c
5524         * src/z80/gen.h
5525         * src/z80/main.c
5526         * src/z80/peeph-z80.def
5527         * src/z80/peeph.def
5528         * src/z80/z80.h
5529
5530 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5531
5532         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
5533
5534 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5535
5536         * device/lib/hc08/_mullong.c: Removed extra #endif
5537
5538 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5539
5540         * sim/ucsim/hc08.src/inst.cc,
5541         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
5542         carries from x to h
5543         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
5544         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
5545         * device/include/stdarg.h: fixed varargs for hc08
5546         * device/lib/Makefile.in,
5547         * device/lib/hc08/Makefile,
5548         * device/lib/hc08/_mulint.c,
5549         * device/lib/hc08/_mullong.c: fixed some endian problems
5550
5551 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5552
5553         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
5554         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
5555         * device/lib/_gptrget.c,
5556         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
5557
5558 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5559
5560         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
5561         * src/SDCCast.c (astErrors): fixed bug #846007
5562         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
5563
5564 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5565
5566         * src/SDCCast.c (decorateType): disabled a transformation I added in
5567         revision 1.188 (access to fields of a structure at an absolute address);
5568         it breaks with bitfields, extern declarations, and gcse analysis.
5569         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
5570         could be assigned through a pointer, so don't complain.
5571         * src/SDCCast.c (astErrors),
5572         * src/SDCCast.h,
5573         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
5574
5575 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
5576
5577         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
5578         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
5579         output of __config directives, since gpasm now supports them
5580         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
5581         pre-processor macro, i.e. -DMCU=p18f452
5582         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
5583         and modified to handle 'cast' icode similarly to '=' icode
5584         * src/pic16/device.h (typedef struct PIC_device): added field
5585         'extMIface' to indicate that chip has external memory interface
5586         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
5587         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
5588         18F8720
5589
5590 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5591
5592         * src/SDCC.y (pointer): fixed bug #846006
5593         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
5594         * src/SDCCast.c (decorateType): fixed bug #846009
5595         * src/ds390/peeph.def,
5596         * src/ds390/gen.c (genAnd, genOr),
5597         * src/mcs51/peeph.def,
5598         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
5599
5600 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5601
5602         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
5603         * src/SDCCdflow.c
5604         * src/SDCCcse.c
5605         * src/SDCCcse.h
5606         * src/SDCCBBlock.h
5607         * src/SDCCBBlock.c
5608
5609 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
5610
5611         fixed bug #845089
5612         * src/SDCCbitv.h,
5613         * src/SDCCbitv.c: added function to free a bitvector
5614         * src/SDCClrange.h,
5615         * src/SDCClrange.c: added function to recompute the liveranges
5616         * src/avr/ralloc.c,
5617         * src/ds390/ralloc.c,
5618         * src/hc08/ralloc.c,
5619         * src/mcs51/ralloc.c,
5620         * src/pic/ralloc.c,
5621         * src/pic16/ralloc.c,
5622         * src/xa51/ralloc.c,
5623         * src/z80/ralloc.c: recompute the liveranges after register packing
5624
5625 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
5626
5627         * src/SDCCloop.c (newInduction): fixed bug #845630
5628
5629 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5630
5631         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
5632         inadvertantly left behind from my 2003-11-12 change
5633
5634 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5635
5636         Updated headers I neglected to commit yesterday.
5637         * src/SDCClrange.h,
5638         * src/SDCCicode.h
5639
5640 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5641
5642         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
5643         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
5644         * src/SDCCopt.c (eBBlockFromiCode),
5645         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
5646         the creation of the key hash table from the sequencing so it can be used
5647         earlier (for some GCSE bug fixes still pending)
5648
5649 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5650
5651         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
5652         * support/regression/tests/addsub.c: testing genPlus shortcut
5653
5654 2003-11-15  Borut Razem <borut.razem AT siol.net>
5655
5656         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
5657
5658 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5659
5660         * src/SDCCcse.c (cseBBlock): fixed bug #527779
5661         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
5662         ordering is immaterial.
5663         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
5664
5665 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5666
5667         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
5668         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
5669         (SIGSEV) of bug #840381
5670         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
5671         unlink new file before rename if new and old filenames are the same)
5672
5673 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5674
5675         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
5676         uninitialized variables) for the mcs51. Set environment variable
5677         SDCC_GENRAMCLEAR to test.
5678         xdata initialization slightly shorter
5679
5680 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5681
5682         * src/SDCCsymt.h,
5683         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
5684         #838241 & 780691 (basicly the same bug)
5685         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
5686         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
5687
5688 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
5689
5690         * src/SDCCmain.c (linkEdit): "fix" #834252
5691
5692 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5693
5694         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
5695         * src/SDCCast.h,
5696         * src/SDCC.y: fixed bug #819403
5697
5698 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5699
5700         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
5701         the reentrant attribute.
5702         * src/hc08/gen.c (genPackBits): added missing stack readjustment
5703         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
5704         simulation
5705         * src/SDCCast.c (decorateType): fixed bug with storage class not being
5706         updated during pointer dereference; f.e. ~(((char *)1)*) was being
5707         erroneously reduced to a literal.
5708         * src/hc08/ralloc.c (packRegisters, rematStr),
5709         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
5710         some cases
5711
5712 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5713
5714         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
5715         * doc/sdccman.lyx: changed from 'article' to 'book'
5716         * doc/Makefile: readded test_suite_spec and cdbfileformat
5717
5718 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
5719
5720         * device/include/stdlib.h: include malloc.h to comply with ANSI
5721         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
5722
5723 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5724
5725         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
5726         * doc/clean.mk: also remove *.out files
5727         * doc/sdccman.lyx: some additions, larger top/bottom margins
5728
5729 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5730
5731         * src/SDCC.y: fixed bug #837365
5732         * support/regression/tests/bitopcse.c
5733         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
5734         a symbol (might be valop instead)
5735         * device/lib/Makefile.in: added errno.c to HC08SOURCES
5736         * device/lib/clean.mk: added hc08 to the cleaning list
5737
5738 2003-11-04  Borut Razem <borut.razem AT siol.net>
5739
5740         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
5741           made 2003-11-04
5742         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
5743           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
5744           malloc is declared in standard stdlib.h
5745
5746 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5747
5748         * device/lib/hc08/Makefile: need to clean .rel not .o files
5749         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
5750
5751 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5752
5753         * src/port.h,
5754         * src/hc08/main.c,
5755         * src/mcs51/main.c,
5756         * src/ds390/main.c,
5757         * src/z80/main.c,
5758         * src/avr/main.c,
5759         * src/pic/main.c,
5760         * src/pic16/main.c,
5761         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
5762         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
5763         tests (which uses the port's oclsExpense function)
5764         * src/SDCC.y,
5765         * src/SDCCast.c,
5766         * src/SDCCicode.c,
5767         * src/hc08/gen.c,
5768         * src/ds390/gen.c,
5769         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
5770
5771 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5772
5773         * src/SDCCcse.c (ifxOptimize),
5774         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
5775         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
5776         deleting the IFX iCode.
5777         * src/hc08/ralloc.c: reduced unneeded slocs
5778         * src/hc08/gen.c: fixed bug in asmopToBoolean
5779
5780 2003-11-04  Borut Razem <borut.razem AT siol.net>
5781
5782         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
5783           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
5784           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
5785           transferred to configure
5786
5787 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
5788
5789         Use headers defined in the C[++] standards:
5790         * sim/ucsim/gui.src/serio.src/fileio.cc
5791         * sim/ucsim/gui.src/serio.src/frontend.cc
5792         * sim/ucsim/gui.src/serio.src/main.cc
5793         * sim/ucsim/gui.src/serio.src/posix_signal.cc
5794         * support/Util/NewAlloc.c
5795         * as/hc08/lklibr.c
5796         * as/mcs51/lklibr.c
5797         * as/z80/aslist.c
5798         * as/z80/assym.c
5799
5800 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5801
5802         * Added MSVC projects for hc08 assembler and linker:
5803         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
5804         /as/hc08/link_hc08.dsp
5805
5806 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
5807
5808         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
5809
5810 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
5811
5812         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
5813
5814 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5815
5816         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
5817
5818 2003-10-31  Borut Razem <borut.razem AT siol.net>
5819
5820         * support/cpp2/cpplib.h,
5821           support/cpp2/cpplib.c,
5822           support/cpp2/cpplex.c,
5823           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
5824           to switch _asm block preprocessing on / off. Default is
5825           #pragma preproc_asm +
5826
5827 2003-10-31  Borut Razem <borut.razem AT siol.net>
5828
5829         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
5830           when outputting comment blocks (when executed with -C option) and
5831           _asm (SDCPP specific) blocks
5832
5833 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5834
5835         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
5836
5837 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
5838
5839         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
5840
5841 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
5842
5843         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
5844         * src/SDCCast.c (decorateType): fixed bug #832664
5845
5846 2003-10-31  Borut Razem <borut.razem AT siol.net>
5847
5848         * support\cpp2\cpplex.c: fixed for SDCPP:
5849           comments(when executed with -C option) and _asm blocks
5850           were included even if they where in skipped #if block.
5851           Applied solution from GCC cpp 3.3.2
5852
5853 2003-10-31  Borut Razem <borut.razem AT siol.net>
5854
5855         * src/SDCC.lex: sdcc now understands both formats:
5856           '# <line_number> <file_name>' and
5857           '#line <line_number> <file_name>'
5858         * support/cpp2/cppmain.c: sdcpp now generates the standard
5859           '# <line_number> <file_name>' instead of former
5860           '#line <line_number> <file_name>'
5861
5862 2003-10-30  Borut Razem <borut.razem AT siol.net>
5863
5864         * support/cpp2/cpphash.h,
5865         * support/cpp2/cpplib.h
5866         * support/cpp2/cpplex.c,
5867         * support/cpp2/cppmain.c,
5868         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
5869
5870 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5871
5872         Fixed a number of problems revealed by bug #827883.
5873         * src/SDCCloop.c (loopInvariants): Spill location of the
5874         result operand should be recomputed if extracted from
5875         a loop. Also, don't extract assignments of an iTemp
5876         from a literal.
5877         * src/SDCCast.c (isConformingBody): loop reversal should
5878         not occur if the control variable is involved with a
5879         relational operator.
5880
5881 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
5882
5883         * .version: bumped to 2.3.6 to reflect the big improvements
5884         made by Erik and Klaus. Thanks!
5885
5886 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
5887
5888         Replaced the livrange code.
5889         * src/SDCClrange.c: added new LR code
5890         * src/SDCCloop.c,
5891         * src/SDCCBBlock.h: removed remainig parts from old LR code
5892         * src/ds390/ralloc.c,
5893         * src/ds390/gen.c: minor fixes to make it work with new code
5894
5895 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5896
5897         * as/hc08/asm.h,
5898         * as/hc08/lkrloc.c,
5899         * src/hc08/gen.c,
5900         * src/hc08/ralloc.c: Fix various warnings related to the hc08
5901         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
5902         (tweaked fix for bug #818696)
5903
5904 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5905
5906         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
5907
5908 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5909
5910         * src/SDCCmain.c,
5911         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
5912         * src/mcs51/gen.c (gencjneshort),
5913         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
5914         more efficient (per Scott Bronson's suggestion)
5915
5916 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5917
5918         Extended the semantics of the critical keyword to include
5919         individual statements. See RFE #827755 and #799831
5920         * src/SDCC.y
5921         * src/SDCCicode.c
5922         * src/SDCCopt.c
5923         * src/SDCCast.c
5924         * support/Util/SDCCerr.c
5925         * support/Util/SDCCerr.h
5926         * src/mcs51/gen.c
5927         * src/ds390/gen.c
5928         * src/hc08/gen.c
5929
5930 2003-10-19  Borut Razem <borut.razem AT siol.net>
5931
5932         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
5933
5934 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5935
5936         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
5937         Fixed bug #818696
5938         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
5939         and predecrement operand is displayed
5940
5941 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
5942
5943         * src/SDCCval.c (valMinus): fixed bug #826041
5944
5945 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5946
5947         Some hc08 related updates that I missed earlier
5948         * sim/ucsim/stypes.h
5949         * support/regression/ports/hc08/spec.mk
5950
5951 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5952
5953         New target "hc08" for the Motorola 68hc08 family of micros
5954
5955         * configure
5956         * configure.in
5957         * Makefile
5958         * src/hc08/*
5959         * src/SDCCmain.c
5960         * src/port.h
5961         * sim/ucsim/hc08.src/*
5962         * sim/ucsim/configure.in
5963         * src/ucsim/configure
5964         * sim/ucsim/packages_in.mk
5965         * as/hc08/*
5966         * as/Makefile
5967         * device/include/mc68hc908qy.h
5968         * device/lib/hc08/*
5969         * device/lib/Makefile.in
5970         * support/regression/ports/hc08/*
5971         * support/regression/Makefile
5972
5973 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5974
5975         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
5976         regression test
5977         * src/ds390/gen.c (genCast): fixed bug #821957
5978
5979 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
5980
5981         * device/lib/logf.c: "fixed" overlay bug
5982         * support/regression/ports/host/spec.mk: added m library
5983         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
5984         * support/regression/tests/float_trans: added (for Eric)
5985
5986 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
5987
5988         * src/mcs51/gen.c (genCpl): fixed bug
5989         http://sf.net/mailarchive/message.php?msg_id=6263915
5990
5991 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
5992
5993         * src/SDCCast.c (decorateType): added extended constant folding
5994         * src/SDCCsymt.c (computeType): cleanup
5995         * src/SDCCval.c (valShift): minor optimization
5996         * support/regression/tests/ast_constant_folding.c: added
5997
5998 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5999
6000         * src/SDCCmain.c: removed some unintended changes
6001
6002 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6003
6004         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
6005         * src/z80/gen.c: fixed part of bug #817589
6006         * src/SDCCsymt.c (checkFunction): fixed bug #817895
6007
6008 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
6009
6010         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
6011         * src/SDCCcflow.c
6012         * src/SDCCcse.c
6013         * src/SDCCdflow.c
6014         * src/SDCClabel.c
6015         * src/SDCClrange.c
6016         * src/SDCCmem.c
6017         * src/SDCCopt.c
6018         * src/SDCCpeeph.c
6019         * src/SDCCset.c
6020         * src/avr/ralloc.c
6021         * src/ds390/ralloc.c
6022         * src/izt/ralloc.c
6023         * src/mcs51/ralloc.c
6024         * src/pic/ralloc.c
6025         * src/pic16/ralloc.c
6026         * src/xa51/ralloc.c
6027         * src/z80/ralloc.c
6028         * src/z80/gen.c: removed unused label "release:"
6029
6030 2003-10-06  Borut Razem <borut.razem AT siol.net>
6031
6032         * src/SDCC.lex: removed definition of unused variables
6033           save_optimize and save_options
6034
6035 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
6036
6037         * clean.mk: removed '=' in "-maxdepth=1"
6038         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
6039         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
6040
6041 2003-10-06  Borut Razem <borut.razem AT siol.net>
6042
6043         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
6044           my_unput() replaced by unput()
6045
6046 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
6047
6048         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
6049         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
6050         type-punned pointer will break strict-aliasing rules"
6051         Old LR behaviour is again default; Klaus' LR can be choosen by
6052         defining the environment variable LRKLAUS
6053         * src/SDCCBBlock.h
6054         * src/SDCCloop.c
6055         * src/SDCClrange.c
6056         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
6057         * clean.mk: fixed removal of files in bin/CVS/
6058         * device/lib/clean.mk: fixed removal of directories small and large
6059         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
6060         * src/SDCCicode.c,
6061         * src/SDCCval.c: removed superflous test for pedantic
6062
6063 2003-10-05  Borut Razem <borut.razem AT siol.net>
6064
6065         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
6066           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
6067           message "unmatched #pragma SAVE and #pragma RESTORE"
6068
6069 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6070
6071         * doc/sdccman.lyx: various additions and updates (interrupts, inline
6072           assembly, critical functions, atomic, nojtbound)
6073
6074 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
6075
6076         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
6077         * src/SDCCBBlock.h
6078         * src/SDCCloop.c
6079         * src/SDCCloop.h
6080         * src/SDCClrange.c
6081
6082 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6083
6084         * src/z80/gen.h,
6085         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6086         * src/mcs51/gen.h
6087         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6088         * src/ds390/gen.h
6089         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
6090         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
6091         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
6092
6093 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6094
6095         * src/z80/gen.c (genRet): fixed bug #524753
6096         * src/z80/gen.c (genCast): fixed internal error on cast from
6097         pointer to long
6098         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
6099         fix for bug #477835 to the z80
6100         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
6101         for tracking iCodes in the peephole optimizer for z80
6102
6103 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6104
6105         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
6106         the other part of bug #814548
6107         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
6108
6109 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
6110
6111         * src/SDCCcse.c: fixed part of bug #814548
6112
6113 2003-09-28  Borut Razem <borut.razem AT siol.net>
6114
6115         * src/asm.c: rewrite of printILine() to use temporary file instead
6116           a pipe
6117         * src/xa51/main.c: commented out declaration of int rewinds
6118
6119 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6120
6121         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
6122
6123 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6124
6125         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
6126         * src/asm.c (printILine): Fixed bug #811015
6127
6128 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6129
6130         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
6131         freeing.
6132
6133 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6134
6135         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
6136         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
6137         to correctly handle general case of AOP_PAIRPTR
6138         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
6139
6140 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6141
6142         * src/mcs51/ralloc.c (fillGaps),
6143         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
6144         register positioning bug)
6145
6146 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
6147
6148         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
6149
6150 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6151
6152         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
6153         genCodePointerGet, genGenPointerGet, genFarPointerSet,
6154         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
6155         (ralloc doesn't intentionally do this now, but perhaps later)
6156         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
6157         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
6158         register positioning bugs (Fixed bug #762602 and #795325)
6159         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
6160         (Fixed bug #808779)
6161         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
6162         lines that --i-code-in-asm generates
6163
6164 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6165
6166         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
6167         trying to fclose a FILE* that was already closed.
6168
6169 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6170
6171         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
6172         of const struct should be treated as if const themselves)
6173
6174 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
6175
6176         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
6177
6178 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6179
6180         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
6181         Unix (/n) and DOS (/r/n) line terminations.
6182
6183 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6184
6185         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
6186         bug #613775
6187
6188 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6189
6190         * src/mcs51/gen.c (genFunction, genEndFunction),
6191         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
6192         and restore of EA so that stack offsets to parameters are
6193         correct when using both critical and reentrant/stack-auto.
6194         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
6195         size (can be triggered in error if sloc is shared between
6196         different sized objects)
6197         * device/include/float.h: fixed macros to explicitly use
6198         unsigned long where needed
6199
6200 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
6201
6202         Feature req. 799831: added code to allow nesting of critical functions
6203         * src/mcs51/gen.c (genFunction, genEndFunction)
6204         * src/ds390/gen.c (genFunction, genEndFunction)
6205
6206 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6207
6208         * src/SDCCsymt.c (sclsFromPtr),
6209         * src/SDCCsymt.h,
6210         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
6211         support for standard C idiom of memory mapped variables; for
6212         example, *((xdata int*)0x1234) = 1 is now internally equivalent
6213         to xdata int at 0x1234 tempvar = 1.
6214         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
6215         provided by Akiya ISHIDA
6216
6217 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
6218
6219         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
6220         * src/SDCCval.c (constVal): added reduction from int to char
6221         * src/SDCCval.c (valMult, valDiv): fixed sign handling
6222         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
6223         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
6224         to ignore the sign
6225         * support/regression/tests/shifts.c: fixed
6226
6227 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6228
6229         * src/z80/gen.c (genXor): Fixed bug #805445
6230
6231 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6232
6233         Fixed bug #621531 (const & volatile confusion in the type chain).
6234         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
6235         refer to the const or volatile state of the pointer itself.
6236
6237         * src/SDCCast.c
6238         * src/SDCCglue.c
6239         * src/SDCCicode.c
6240         * src/SDCCsymt.c
6241         * src/SDCCval.c
6242         * src/SDCC.y
6243         * src/SDCCsymt.h
6244         * src/pic/gen.c
6245         * src/pic/ralloc.c
6246         * src/pic16/gen.c
6247         * src/pic16/ralloc.c
6248         * support/regression/tests/const.c
6249
6250 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6251
6252         When checking for duplicated modules, use absolute paths
6253         instead of relative paths.  Files changed:
6254
6255         * as/mcs51/lklib.c
6256         * link/z80/lklib.c
6257
6258 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6259
6260         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
6261
6262 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6263
6264         * device/include/string.h: added size_t typedef, changed
6265         prototypes to use size_t, eliminated separate reentrant and
6266         non-reentrant declarations, added _memmove declaration
6267         * device/lib/_memcpy.c: changed to use size_t instead of int,
6268         changed /4 to >>2 to avoid division library call
6269         * device/lib/_memcmp.c,
6270         * device/lib/_memset.c,
6271         * device/lib/_strncat.c,
6272         * device/lib/_strncpy.c,
6273         * device/lib/_strncmp.c: changed to use size_t instead of int
6274         * device/lib/_memmove.c: new file (fixed bug #772294)
6275         * device/lib/Makefile.in: added _memmove.c
6276         * device/lib/z80/asm_strings.s: fixed bug #772290
6277         * support/regression/tests/bitfields.c: attempt to fix host assertion
6278         failure on amd64-unknown-linux2.2
6279
6280 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6281
6282         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
6283         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
6284         * as/z80/asmain.c (main): fixed bug #801766
6285
6286 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
6287
6288         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
6289         compilers
6290
6291 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6292
6293         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
6294         reported in bug #800609
6295
6296 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
6297
6298         * Top header beautifications in src/pic16 directory:
6299           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
6300           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
6301           pcoderegs.h, ralloc.c, ralloc.h
6302         * main.c: added top header and GPL license notice
6303         * pcode.c: fixed the if-conditional warning
6304
6305 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
6306
6307         * device/lib/_mullong.c: replaced int by short for gcc
6308
6309 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6310
6311         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
6312         and JUMPTABLE iCodes properly now (worked by accident before)
6313         * src/mcs51/gen.c (leftRightUseAcc),
6314         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
6315         iCode properly now. Use getSize instead of nRegs since a & b
6316         aren't part of the nRegs tally.
6317
6318 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
6319
6320         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
6321         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
6322           before instructions that use the _STATUS register
6323
6324 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
6325
6326         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
6327         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
6328         fetching of the pointer
6329         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
6330         copied from genNearPointerSet()
6331         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
6332         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
6333         If they pop r0/r1 they must be called in the opposite order than aopOp().
6334         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
6335         (resp. --stack-auto), prepared for --xstack
6336
6337 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6338
6339         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
6340
6341 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
6342
6343         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
6344         these ports have their own __sdcc_external_start()
6345
6346 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
6347
6348         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6349         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
6350         type for bits was changed. It resulted in bit variables becoming
6351         global, which is not permitted in PIC 14 assembly output.
6352
6353 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6354
6355         * doc/sdccman.lyx: various additions and updates. Rearranged sections
6356
6357 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6358
6359         Z80 and MCS51 linkers complaint if a public symbol is defined
6360         in more than one library module:
6361
6362         * as/mcs51/lklib.c
6363         * link/z80/lklib.c
6364         * as/mcs51/Makefile.in
6365
6366 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6367
6368         A few small changes that speed up the peephole optimizer.
6369
6370         * src/SDCCpeeph.c
6371
6372 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6373
6374         Try to make the peephole optimizer smarter by maintaining
6375         an association between the assembly source code and the
6376         iCodes that originated them. Put this information to use
6377         with a new peephole rule condition "notVolatile" so that
6378         the rules can be aggressive yet still safe.
6379
6380         * src/SDCCpeeph.c
6381         * src/SDCCpeeph.h
6382         * src/mcs51/gen.c
6383         * src/mcs51/peeph.def
6384
6385 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6386
6387         Fixed bug #741761
6388
6389         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
6390         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
6391         if the left or right operand symbols have the accuse flag set.
6392
6393 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6394
6395         Changed the type of the result of the ! (NOT) operator to char;
6396         previously it returned the same type as the source. This allows
6397         us to eliminate all the genFloatNot functions (all of its target
6398         implementations were very buggy) since !float can use the same
6399         code as !long now.
6400
6401         * src/SDCCicode.c (ast2iCode): ! returns char
6402         * src/mcs51/gen.c (genNot, genNotFloat),
6403         * src/ds390/gen.c (genNot, genNotFloat),
6404         * src/z80/gen.c (genNot, genNotFloat),
6405         * src/pic/gen.c (genNot, genNotFloat),
6406         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
6407
6408 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
6409
6410         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6411         1. Interrupt would not compile properly. Ensure PCLATH register is saved
6412            during interrupts. Ensure WSAVE is located at a shared bank address.
6413         2. Fixed page selection in some places
6414         3. Fixed BTFSS/C to where necessary use registers directly and not simply
6415            the registers name strings.
6416         4. Fixed "signed / unsigned compare" compiler warnings.
6417         5. The PIC port manages its own allocation of the general purpose
6418            registers, but makes no attempt to reuse them. As a result when
6419            compiling it soon runs out of general purpose registers. Some
6420            additional code was added to the files pcode.c and device.c to walk
6421            through the function call tree and rename the registers so that they
6422            get reused.
6423
6424         * src/pic/device.c
6425         * src/pic/gen.c
6426         * src/pic/glue.c
6427         * src/pic/pcode.c
6428         * src/pic/pcode.h
6429         * src/pic/ralloc.c
6430         * src/pic/ralloc.h
6431         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
6432         genPlus() & genMinus() when the result is the same as left or right
6433
6434 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6435
6436         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
6437
6438 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6439
6440         Made bitfield a distinct type from bit so that bitfields
6441         convert as per ANSI C and bits retain their traditional
6442         boolean style behaviour. Implemented bitfield support in
6443         the z80 port.
6444
6445         * src/SDCCsymt.h,
6446         * src/SDCCsymt.c,
6447         * src/SDCCast.c,
6448         * src/cdbFile.c,
6449         * src/mcs51/gen.c,
6450         * src/ds390/gen.c: bit v bitfield split
6451         * src/z80/gen.c: New support for bitfields
6452         * support/regression/tests/bitfields.c: reenabled z80,
6453         added more tests
6454
6455 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6456
6457         Rules 246.x, 247.x relate to bitfields, the others speed up
6458         access to xdata mapped I/O devices.
6459
6460         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
6461
6462 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6463
6464         Cleaned up genPackBits and genUnpackBits and added two helper
6465         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
6466         for literal assignments in genPackBits (thanks to Frieder for
6467         reminding me).
6468
6469         * src/mcs51/gen.c
6470         * src/ds390/gen.c
6471
6472 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6473
6474         Fixed bug #748310 (pointer to function type mishandled when the
6475         function name is omitted). Also fixed a SIGSEGV when a function
6476         attribute (reentrant, etc) is used on a non-function or on a
6477         function but misplaced before the parameter list.
6478
6479         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
6480         bug #748310
6481         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
6482         * support/Util/SDCCerr.h,
6483         * support/Util/SDCCerr.c: Added func attr misuse error msg
6484
6485 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6486
6487         Fixed bug #787649 by anonymous
6488         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
6489         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
6490
6491 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6492
6493         Fixed numerous bitfield problems.
6494
6495         * src/SDCC.y: More bitfield related error checking
6496         * src/SDCCsymt.h,
6497         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
6498         * support/Util/SDCCerr.h,
6499         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
6500         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6501         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6502         * support/regression/tests/bitfields.c: tests added
6503
6504 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6505
6506         Made the constant following the "interrupt" keyword optional. If
6507         omitted, the function will not automatically be given an entry
6508         in the interrupt vector table (similar to #pragma NOIV, but
6509         less syntacticly kludgy). The interrupt number is also now
6510         range checked. Also fixed a bug in the high order bit example
6511         in the manual.
6512
6513         * src/SDCC.y
6514         * src/SDCCmem.c
6515         * src/SDCCglue.c
6516         * src/SDCCsymt.h
6517         * support/Util/SDCCerr.c
6518         * support/Util/SDCCerr.h
6519         * doc/sdccman.lyx
6520
6521 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6522
6523         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
6524         * src/SDCCicode.c (operandOperation): rewritten some ops
6525         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
6526         * src/SDCCsymt.c (computeType): literals are handled the same way as any
6527         other type
6528         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
6529         be re-activated by defining REDUCE_LITERALS)
6530         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
6531         unsigned, but are signed by default
6532         * src/SDCCval.c (constVal): rearranged
6533         * src/SDCCval.c (valMod): preliminary fix
6534         * src/SDCCval.c (valCastLiteral): use TYPE_* types
6535         * support/regression/literalop.c: added, work in progress
6536
6537 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6538
6539         Generate warnings for useless declarations like "char data;"
6540         that don't do what new users expect.
6541
6542         * src/SDCC.y
6543         * support/Util/SDCCerr.h
6544         * support/Util/SDCCerr.c
6545
6546 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
6547
6548         * src/SDCCval.c (valMult): fix overflow detection of negative int
6549
6550 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6551
6552         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
6553
6554         Changes to support big endian targets:
6555
6556         * src/ports.h
6557         * src/SDCCglue.c
6558         * src/avr/main.c
6559         * src/ds390/main.c
6560         * src/izt/i186.c
6561         * src/mcs51/main.c
6562         * src/pic/main.c
6563         * src/pic16/main.c
6564         * src/xa51/main.c
6565         * src/z80/main.c
6566
6567 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
6568
6569         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
6570         * device/lib/time.c: fixed warning "integer overflow in expression"
6571
6572 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
6573
6574         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
6575         * src/SDCCval.c (constVal): changed default to signed; hex and octal
6576         constants are unsigned; added recognition of "u" flag for unsigned
6577         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
6578         * src/SDCCval.c (valDiv, valMod): fixed signdness
6579         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
6580         signedness of modulo, left and right shift
6581         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
6582         * support/Util/SDCCerr.h: added warning W_INT_OVL
6583         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
6584         * src/SDCCast.c (ast_print): improved output of constants
6585
6586 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6587
6588         Fixed some warnings when building with MSVC:
6589
6590         * as\mcs51\asdata.c
6591         * as\z80\asdata.c
6592         * as\mcs51\asm.h
6593         * as\z80\asm.h
6594         * link\z80\aslink.h
6595         * link\z80\lkdata.c
6596         * link\z80\lkeval.c
6597         * link\z80\lkgb.c
6598         * link\z80\lkihx.c
6599         * link\z80\lks19.c
6600         * link\z80\lksym.c
6601         * support\cpp2\cpplib.c
6602         * src\ds390\gen.c
6603         * src\mcs51\gen.c
6604
6605 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
6606
6607         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
6608
6609 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6610
6611         * support\librarian\clean.mk: Do not remove Makefile.
6612         * support\librarian\Makefile: added.
6613
6614 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6615
6616         Added librarian to MSVC build:
6617         * all.dsp
6618         * sdcc.dsw
6619         * support\librarian\librarian.dsp
6620
6621         'configure' not needed for librarian, removed:
6622         * support\librarian\configure
6623         * support\librarian\configure.in
6624         * support\librarian\config_in.h
6625         * support\librarian\Makefile.in
6626
6627         Hopefully these ones built the librarian and the rest of sdcc properly:
6628         * Makefile
6629         * Makefile.common.in
6630
6631         Messed up 'configure', so revert to previous version:
6632         * configure
6633         * configure.in
6634
6635 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
6636
6637         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
6638         there, while the mantissa of a double is "only" 53 bits wide.
6639
6640 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6641
6642         Adding sdcclib to the build.  MSVC project coming soon.
6643         Files added/changed:
6644
6645         * support\librarian\clean.mk
6646         * support\librarian\configure
6647         * support\librarian\configure.in
6648         * support\librarian\config_in.h
6649         * support\librarian\Makefile.bcc
6650         * support\librarian\Makefile.in
6651         * support\librarian\sdcclib.c
6652         * Makefile.bcc
6653         * Makefile
6654         * Makefile.common.in
6655         * configure
6656         * configure.in
6657
6658 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6659
6660         Linker now complaints if linked modules have conflicting options, for
6661         example, one compiled using --model-large and another one compiled with
6662         --model-small.  The following files were modified:
6663
6664         * as\mcs51\asdata.c
6665         * as\mcs51\aslink.h
6666         * as\mcs51\asm.h
6667         * as\mcs51\asmain.c
6668         * as\mcs51\asout.c
6669         * as\mcs51\i51pst.c
6670         * as\mcs51\lkdata.c
6671         * as\mcs51\lklibr.c
6672         * as\mcs51\lkmain.c
6673         * as\z80\asdata.c
6674         * as\z80\asm.h
6675         * as\z80\asmain.c
6676         * as\z80\asout.c
6677         * as\z80\z80pst.c
6678         * link\z80\aslink.h
6679         * link\z80\lkdata.c
6680         * link\z80\lklibr.c
6681         * link\z80\lkmain.c
6682         * src\SDCCglue.c
6683
6684 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6685
6686         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
6687         as/mcs51/lklibr.c: Generate a warning when a library is not found.
6688
6689 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
6690
6691         * src/z80/mappings.i: fix _mul[us][int,long] entries
6692
6693 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6694
6695         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
6696
6697 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
6698
6699         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
6700         * support/regression/tests/bitopcse.c: added
6701         fixed warning:
6702         * src/avr/gen.c:
6703         * src/pic/gen.c:
6704         * src/pic16/gen.c:
6705         * src/z80/gen.c:
6706         * src/xa51/gen.c:
6707
6708 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6709
6710         added support for new library format to z80, gbz80 linkers:
6711         *link/z80/aslink.h
6712         *link/z80/lklex.c
6713         *link/z80/lklib.c
6714         *link/z80/lklist.c
6715
6716 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
6717
6718         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
6719         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
6720
6721 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
6722
6723         added DUMMY_READ_VOLATILE:
6724         * src/SDCC.y:
6725         * src/avr/gen.c:
6726         * src/xa51/gen.c:
6727         * src/z80/gen.c:
6728         * src/pic/gen.c:
6729         * src/pic16/gen.c:
6730         * src/mcs51/gen.c:
6731         * src/ds390/gen.c:
6732         * src/SDCCcse.c (algebraicOpts): many improvements
6733         * src/SDCCcse.h: removed algebraicOpts()
6734         * src/SDCCicode.c (picDummyRead): added
6735
6736 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6737
6738         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
6739         "Insufficient space in data memory".
6740
6741 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6742
6743         * src/mcs51/gen.c: fixed bug #771358
6744         * src/z80/gen.c: fixed bug #759087
6745
6746 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
6747
6748         * src/pic16/glue.c: minor cleanup by Vangelis
6749
6750 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6751
6752         * device/include/regc515c.h: fixed #758477
6753         * device/lib/_gptrget.c: saving some cycles in generic pointer get
6754         * device/lib/_gptrput.c: saved a few bytes
6755         * my tab spacing is 8, yours too?)
6756         * device/lib/_ser.c: process RX bytes earlier than TX bytes
6757         * device/lib/serial.c: process RX bytes earlier than TX bytes
6758         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
6759
6760 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6761
6762         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
6763
6764 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6765
6766     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
6767
6768 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
6769
6770         * device/lib/Makefile.in: bad fix, reverted to 1.43
6771
6772 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
6773
6774         * device/lib/Makefile.in: added missing z80 object files
6775
6776 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
6777
6778         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
6779         pic16 progress by Vangelis:
6780         * src/SDCCglobl.h:
6781         * src/SDCCmain.c:
6782         * src/pic/Makefile:
6783         * src/pic:
6784         * pic/Makefile:
6785         * pic16/device.c:
6786         * pic16/device.h:
6787         * pic16/gen.c:
6788         * pic16/gen.h:
6789         * pic16/genarith.c:
6790         * pic16/glue.c:
6791         * pic16/main.c:
6792         * pic16/pcode.c:
6793         * pic16/pcode.h:
6794         * pic16/pcodepeep.c:
6795         * pic16/peeph.def:
6796
6797 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6798
6799     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
6800
6801 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6802
6803     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
6804     added gbz80 build to MSVC project.
6805     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
6806     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
6807     from 8051 stuff and setup so it links using a .lnk file.
6808
6809 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6810
6811     * support/librarian/sdcclib.c: sdcc librarian.
6812     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
6813     with sdcclib.
6814
6815 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6816
6817     * as/mcs51/lkmain.c: properly handle extensions in function afile.
6818
6819 2003-07-02  Borut Razem <borut.razem AT siol.net>
6820
6821         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
6822         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
6823         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
6824         src/xa51/main.c, src/z80/main.c:
6825         virtualization of glue() function: each port has it's own glue function,
6826         which is accessed by do_glue function pointer in PORT.general structure
6827
6828 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
6829
6830         * DS800C400 fun, improved ROM interface and tinibios.
6831
6832 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
6833
6834         * More support for DS80C400. Now includes beginning of interface to ROM.
6835
6836 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
6837
6838         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
6839
6840 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6841
6842         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
6843
6844 2003-06-19  Borut Razem <borut.razem AT siol.net>
6845
6846         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
6847
6848 2003-06-19  Borut Razem <borut.razem AT siol.net>
6849
6850         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
6851         fixed Z80 port - crt0.o: cannot open.
6852
6853 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
6854
6855         * support/Util/MySystem.c (merge_command): revert bad fix
6856
6857 2003-06-18  Borut Razem <borut.razem AT siol.net>
6858
6859         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
6860
6861 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6862
6863         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
6864         option --use-stdout sends errors to stdout instead of stderr.
6865
6866 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
6867
6868         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
6869
6870 2003-06-15  Borut Razem <borut.razem AT siol.net>
6871
6872         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
6873         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
6874         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
6875         fixed width array of pointers replaced with sets;
6876         multiple include and lib paths ared transferred to preprocessor and linker
6877         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
6878         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
6879         fixed width array of pointers
6880         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
6881         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
6882         fixupPath(), getPathDifference()
6883         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
6884         fixed width array of pointers
6885
6886 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
6887
6888         * src/pic16/ralloc.c: fix warnings
6889         * src/pic16/pcode.c: fix warning
6890
6891 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
6892
6893          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
6894         know all the details, but essentially this set of changes enable
6895         the pic16 port to generate movff instructions and generate assembler
6896         directives,
6897         * src/SDCCmain.c:
6898         * src/pic16/gen.c:
6899         * src/pic16/glue.c:
6900         * src/pic16/pcode.c:
6901         * src/pic16/device.c:
6902         * src/pic16/main.c:
6903         * src/pic16/pcode.h:
6904         * src/pic16/pcoderegs.c:
6905         * src/pic16/ralloc.c:
6906         * src/pic16/ralloc.h:
6907
6908 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6909
6910         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
6911         added option --vc, so sdcc errors and warnings are compatible with
6912         Microsoft Visual Studio.
6913
6914 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6915
6916         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
6917           device/lib/libfloat.lib: added atof function.
6918
6919 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
6920
6921         * doc/sdccman.lyx: updated to Lyx 1.3
6922         * doc/cdbfileformat.lyx: updated to Lyx 1.3
6923         * doc/test_suite_spec.lyx: updated to Lyx 1.3
6924         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
6925
6926 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
6927
6928         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
6929
6930 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6931
6932         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
6933           additions to the "related tools/documentation" section
6934
6935 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
6936
6937         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
6938
6939 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
6940
6941         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
6942         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
6943
6944 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
6945
6946         * doc/sdccman.lyx: fix double dash and other minor things
6947         * doc/Makefile: fix double dash
6948
6949 2003-05-28  Karl Bongers(patches from Martin Helmling)
6950         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
6951           condition and ignore commands.
6952
6953 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6954
6955         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
6956           is in parts still quite out of date, I did changes as far as I felt makes sense
6957           for a non-native english speaker.
6958           Please feel free to add to the manual or to correct my changes.
6959         * doc/Makefile: undid touching the date of intermediate tex files.
6960
6961 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6962
6963         * doc/sdccman.lyx: Manual has an index now
6964
6965 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
6966
6967         Finalize muluint/mulsint and mululong/mulslong merging:
6968         * device/lib/_mulint.c
6969         * device/lib/_mullong.c
6970         * device/lib/gbz80/mul.s
6971         * device/lib/gbz80/stubs.s
6972         * device/lib/z80/mul.s
6973         * device/lib/z80/stubs.s
6974         * src/SDCCsymt.c (initCSupport)
6975
6976 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6977
6978         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
6979         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
6980           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
6981           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
6982           instead of /Zm500.
6983
6984 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6985
6986         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
6987           the regression tests I'm not brave enough to enable 245.b, 245.c
6988         * doc/sdccman.lyx: added latex preamble for hyperref package.
6989           Using pdflatex this will give you a hyperlinked pdf file with
6990           bookmarks. (prepend '%' before /usepackage if this breaks something)
6991
6992 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6993
6994          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
6995
6996 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
6997
6998         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
6999
7000 2003-05-21    <johan AT balder>
7001
7002         * src/SDCCglue.c (printIval): fixed bug #739934
7003
7004 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7005
7006         Applied patch from bug 737905 (renamed yylineo to mylineno):
7007         * src/altlex.c
7008         * src/SDCCast.c
7009         * src/SDCglobl.h
7010         * src/SDCC.lex
7011         * src/SDCCsymt.c
7012         * src/SDCCval.c
7013         * src/pic16/pcode.c: Cleaned warnings
7014         * src/pic16/pcodeflow.c: Cleaned warnings
7015         * src/pic16/pcoderegs.c: Cleaned warnings
7016
7017 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
7018
7019         * src/pic16/pcode.c: Cleaned warnings
7020         * src/pic16/pcodepeep.c: Cleaned warnings
7021         * src/pic16/ralloc.c: Cleaned warnings
7022
7023 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
7024
7025         * doc/sdccman.lyx: fixed bug 739745
7026         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
7027
7028 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
7029
7030         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
7031         it can be defined with CFLAGS when running configure
7032         * src/SDCCmain.c: fixed compiling + linking with object files
7033
7034 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
7035
7036         * configure.in: configure for pic16 port,
7037             added --disable-pic16-port
7038         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
7039         * src/SDCCmain.c: linkOptions is changed to set *,
7040             added if/endif conditional macros to remove options help
7041             messages from optionsTable when a port is not configured, added
7042             support for the PIc16 port in the ports table, when executing
7043             the compiler with no port specified on command line, a default
7044             port is selected with the new macro DEFAULT_PORT which is
7045             defined in port.h, in setDefaultOptions() linkOptions is removed
7046             from initialization assignment, since now it is a set,
7047             parseCmdLine uses setParseWithComma for linkOptions, in
7048             linkEdit() linkOptions are accessed with new function indexSet()
7049             which returns the i'th item of a set variable. See SDCCset.c, in
7050             linkEdit() when calling buildCmdLine(), added linkOptions as
7051             last argument. Now users can pass arguments to gplink via the
7052             -Wl option, main() uses pic16glue() to glue up pic16 programs
7053         * src/SDCCpeeph.c: various changes to support pic16
7054         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
7055             return the i'th item of the set
7056         * src/SDCCset.h: added function prototype for indexSet()
7057         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
7058         * src/clean.mk: added pic16 in CLEANALLPORTS variable
7059         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
7060             added macro DEFAULT_PORT
7061         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
7062         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
7063             generated
7064         * src/pic16/glue.c: commented out some error producing lines
7065         * src/pic16/main.c: __config directives are commented out to stop
7066             gpasm complaining and test the linkage with gplink, _linkCmd and
7067             _asmCmd changed to be more gplink and gpasm friendly
7068         * src/pic16/peeph.def: peep rule 3 is commented out, since it
7069             produced an error when parsed, peep rule 12 is added to utilize
7070             movff, but it is commented out since the pCode does not support
7071             yet a command with 2 address arguments
7072
7073 2003-05-18    <johan AT balder>
7074
7075         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7076         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
7077 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
7078
7079         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
7080   Added feature to script commands from file.
7081
7082 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
7083
7084         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
7085         * src/SDCCutil.c: include ctype.h for win32
7086
7087 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
7088
7089         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
7090
7091 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
7092
7093         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
7094   Fixed so you can set breakpoints prior to run, run does not stop
7095   on entry now.  Add tbreak.  Other enhancements and fixes for use
7096   with ddd.
7097
7098 2003-05-12  Borut Razem <borut.razem AT siol.net>
7099
7100         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
7101
7102 2003-05-11  Borut Razem <borut.razem AT siol.net>
7103
7104         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
7105         the path of bin directory, so that PATH is the only env. variable, which has to be set
7106         in case of standard installation.
7107         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
7108         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
7109         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
7110
7111 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7112
7113         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
7114         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
7115         temp files are in the port dir; clean the gen/test directory when
7116         generating new test.c
7117         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
7118         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
7119         * support/regression/tests/zeropad.c: added
7120
7121 2003-05-09    <johan AT balder>
7122
7123         * src/SDCCglue.c: fixed bug #597940
7124
7125 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
7126
7127         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7128   cache sfr, optimize next,step, fix off by one sourceline,
7129   support ddd list function.
7130         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
7131
7132 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
7133
7134         * support/regression/HTMLgen.py: added compare_s2f()
7135         * support/regression/Makefile: redo 1.27
7136         * support/regression/generate-cases.py: redo 1.5
7137
7138 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
7139
7140         * support/regression/tests/float.c: workaround 33 bit hex constant
7141         * support/regression/tests/simplefloat.c: fix division for host
7142
7143 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
7144
7145         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
7146         that tame's the PIC's over-aggressive optimizer.
7147
7148 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7149
7150          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
7151          support for MSVC.
7152
7153 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
7154
7155         Initial support for DS80C400. "Hello world" runs on TINIm400
7156         (with polled I/O).
7157
7158 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
7159
7160          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
7161          * Some notes on ddd usage added in debugger/README
7162          Martin Helmling adding more features and fixes for ddd GUI debugger.
7163          Code added for nexti, stepi, up, down, and other adjustments.
7164
7165 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
7166
7167         * src/pic/pCodepeep.c non-wildcard asmops are now handled
7168         * src/pic/peeph.def Added two rules to optimize carry manipulation
7169         * src/pic/* removed debug printfs
7170
7171 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
7172
7173         * debugger/mcs51/cmd.c: added header newalloc.h
7174
7175 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
7176
7177         * as/Makefile: new EXEEXT
7178         * as/z80/Makefile: remove trailing slash of BUILDIR
7179         * as/z80/clean.mk: new EXEEXT
7180         * Makefile.common.in: add to CFLAGS (and others), don't replace it
7181         * support/cpp2/Makefile.in: new EXEEXT
7182         * src/pic/glue.c (pic14emitRegularMap): fixed warning
7183
7184 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
7185
7186         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
7187         EXEEXT was introduced to fix all related problems with targets
7188         "clean", "install" and "uninstall"; a couple of further flaws
7189         especially with "clean" have been fixed too
7190         * as/mcs51/Makefile.in
7191         * as/mcs51/clean.mk
7192         * as/z80/Makefile
7193         * Makefile
7194         * clean.mk
7195         * debugger/mcs51/Makefile.in
7196         * debugger/mcs51/clean.mk
7197         * link/z80/Makefile
7198         * link/z80/Makefile.in
7199         * link/z80/clean.mk
7200         * link/Makefile
7201         * packihx/Makefile.in
7202         * packihx/clean.mk
7203         * sim/ucsim/Makefile
7204         * sim/ucsim/clean.mk
7205         * sim/ucsim/avr.src/Makefile.in
7206         * sim/ucsim/avr.src/clean.mk
7207         * sim/ucsim/s51.src/Makefile.in
7208         * sim/ucsim/s51.src/clean.mk
7209         * sim/ucsim/xa.src/Makefile.in
7210         * sim/ucsim/xa.src/clean.mk
7211         * sim/ucsim/z80.src/Makefile.in
7212         * sim/ucsim/z80.src/clean.mk
7213         * sim/ucsim/main_in.mk
7214         * sim/ucsim/packages_in.mk
7215         * sim/ucsim/gui.src/Makefile.in
7216         * sim/ucsim/gui.src/serio.src/Makefile.in
7217         * sim/ucsim/gui.src/serio.src/clean.mk
7218         * src/Makefile.in
7219         * src/clean.mk
7220         * support/cpp2/Makefile.in
7221         * support/cpp2/clean.mk
7222         * support/makebin/Makefile
7223         * support/makebin/clean.mk
7224         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
7225         * doc/sdccman.lyx: --program-suffix no longer needed
7226
7227 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
7228
7229          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
7230          Martin Helmling added support for ddd GUI debugger.
7231          Code added to display assembly, set variables, and other commands
7232          to interface to ddd.
7233
7234 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
7235
7236         * as/Makefile: fix target clean
7237         * as/clean.mk: fix target clean
7238         * as/z80/clean.mk: fix target clean
7239
7240 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
7241
7242         * Makefile.common.in: added  AT EXEEXT AT
7243         * configure.in: removed all mingw32 stuff
7244         * configure: rebuilt from configure.in
7245         * doc/sdccman.lyx: updated section "installation"
7246         * support/scripts/sdcc_mingw32: adapted to configure
7247         * support/scripts/sdcc_cygwin_mingw32: added
7248
7249 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
7250
7251         * src/pic Added object file support for the PIC port
7252         * src/pic Applied patch from Craig Franklin (this started the object file support)
7253         * src/regression Updated the PIC regression tests for object files
7254
7255 2003-04-20  Borut Razem <borut.razem AT siol.net>
7256
7257         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
7258           lklex.c: In function `getfid':
7259           lklex.c:203: warning: array subscript has type `char'
7260         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
7261           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
7262         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
7263           stack handling macros
7264
7265 2003-04-19  Borut Razem <borut.razem AT siol.net>
7266
7267         * "handling space characters in file path" task:
7268         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
7269         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
7270         * support/Util/MySystem.h: make it self-sufficient
7271         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
7272           src/z80/main.c, sdcc/as/mcs51/lklex.c:
7273           handling space characters in file path
7274         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
7275           (it will be used by assemblers, which have their own includes, e.g. gpasm)
7276         * support/Util/MySystem.c: handling space characters in executable's path
7277
7278 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
7279
7280         * as/z80/Makefile: fix permanent rebuild of z80
7281         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
7282         * support/regression/tests/bitfields.c: added Johan's bitfields.c
7283
7284 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
7285
7286         * src/SDCCopt.c: add special case optimization to replace modulo by
7287           a power of two with a bitwise AND.
7288
7289 2003-04-18    <johan AT balder>
7290
7291         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
7292
7293 2003-04-17    <johan AT balder>
7294
7295         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
7296         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
7297
7298 2003-04-13  Borut Razem <borut.razem AT siol.net>
7299
7300         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
7301         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
7302           fixed mingw problem in adl_NORMALIZE_PATH
7303
7304 2003-04-12  Borut Razem <borut.razem AT siol.net>
7305
7306         * fixed "#pragma SAVE/RESTORE can not be nested":
7307         * src/SDCC.lex: reworked pragma handling functions
7308         * sdcc/src/SDCCglobl.h: reworked stack handling macros
7309         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
7310
7311 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7312
7313         * src/SDCCutil.c (pathEquivalent): defined but not used
7314         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
7315         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
7316         * configure: rebuilt from configure.in
7317         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7318         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
7319         * device/include/Makefile.in: replace sdcc_datadir
7320         * device/lib/Makefile.in: replace sdcc_datadir
7321         * Makefile.common.in: add LDFLAGS from configure
7322         * packihx/Makefile.in: use LDFLAGS
7323         * src/Makefile.in: use LDFLAGS
7324         * support/cpp2/Makefile.in: add LDFLAGS from configure
7325         * support/makebin/Makefile: use LDFLAGS
7326         * .version: bumped version number to 2.3.5
7327
7328 2003-04-12  Borut Razem <borut.razem AT siol.net>
7329
7330         * completed "different paths" task:
7331         * src/SDCCmacro.c: fixed bug in handling quotes
7332         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
7333         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
7334
7335 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
7336
7337         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
7338
7339 2003-04-11 kevin Vigor <kevin AT vigor.nu>
7340
7341         * ds390/gen.c ds390/peeph.def: fix bug 706781
7342
7343 2003-04-11  Borut Razem <borut.razem AT siol.net>
7344
7345         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
7346
7347 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
7348
7349         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
7350         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
7351          set - this bit used to not be set...).
7352         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
7353           bad code in PIC Port
7354         * src/regression/and2.c added to test bug 609268
7355         * src/regression/Makefile added and2.c to regression test
7356
7357
7358 2003-04-08    <johan AT CP255758-A>
7359
7360         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
7361         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
7362         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
7363
7364 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
7365
7366         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
7367         fix bug #487815
7368         * support/cpp2/Makefile.in: fix bug #487815
7369         * configure: rebuilt from configure.in
7370         * Makefile.common.in: docdir changed, new path suffixes
7371         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7372         * sdcc_vc_in.h: reflect changes from sdccconf.h
7373         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
7374         * src/SDCCutil.h: remove BINDIR hack
7375         * doc/sdccman.lyx: update new path hierarchy
7376
7377 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7378
7379         * src/SDCCpeeph.c: added okToRemoveSLOC test
7380
7381 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7382
7383         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
7384
7385 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7386
7387         * src/SDCCpeeph.c: added labelIsReturnOnly test
7388         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
7389
7390 2003-04-05    <johan AT balder>
7391
7392         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
7393         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
7394         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
7395         * src/SDCCast.c: fixed a warning
7396         * src/SDCCast.h: fixed a warning
7397         * src/SDCCicode.c (operandFromAst): fixed a warning
7398
7399 2003-04-04    <johan AT balder>
7400
7401         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
7402         * src/SDCCast.c (decorateType): fixed bug #715076
7403         * src/SDCC.y: fixed bug #702907
7404
7405 2003-04-03    <johan AT balder>
7406
7407         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
7408         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
7409         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
7410         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
7411         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
7412
7413 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
7414
7415         * _decdptr.c: fix return values
7416         * _gptrget.c: fix return values
7417         * _gptrgetc.c: fix return values
7418         * _gptrput.c: fix return values
7419         * _mulint.c: fix return values
7420         * as/z80/Makefile: fix 'make -j' problem
7421
7422 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
7423
7424         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
7425         * configure.in: big cleanup, updated to autoconf 2.5x
7426         * configure: rebuilt from configure.in
7427         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7428         * sdcc_vc_in.h: reflect changes from sdccconf.h
7429         * doc/Makefile: fixed a flaw in "make install"
7430
7431 2003-04-02    <johan AT balder>
7432
7433         * src/ds390/gen.c (genCmp): no comments
7434         * src/mcs51/gen.c (genCmp): no comments
7435         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
7436         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
7437
7438 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
7439
7440         * support/regression/generate-cases.py: place generated file in given sub directory
7441         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
7442         * support/regression/Makefile: improvements for 'make -j';
7443         side effect: it's simpler and faster now
7444
7445 2003-03-31  Borut Razem <borut.razem AT siol.net>
7446
7447         * src/z80/main.c: link-{port} and as-{port} defined without path
7448         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
7449
7450 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
7451
7452         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
7453
7454 2003-03-30  Borut Razem <borut.razem AT siol.net>
7455
7456         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
7457           changed type of list parameter to set
7458         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
7459         * src/port.h: changed type of do_assemble() parameter to set
7460         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
7461           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
7462           definition of "cppoutfilename" macro with NULL value in preProcess()
7463         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
7464         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
7465         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
7466           replaced with set *binPathSet
7467         * shash_add() deallocates the item, if allready exsists, before adding the new one
7468         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
7469
7470 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
7471
7472         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
7473           a nested for loop bug in the PIC port
7474         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
7475           for loops
7476
7477 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
7478
7479         * support/Util/dbuf.h: remove C++ stuff to make it portable
7480
7481 2003-03-28  Borut Razem <borut.razem AT siol.net>
7482
7483         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
7484           literal strings in stringLiteral()
7485         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
7486         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
7487           to the project
7488
7489 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
7490
7491         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
7492
7493 2003-03-26    <johan AT balder>
7494
7495         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
7496         * src/ds390/gen.c (saveRegisters): catched symbol abuse
7497         * src/SDCCast.c (decorateType): fixed " -v < 3"
7498
7499 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
7500
7501         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
7502         Added Lenny Story's debug infrastructure changes:
7503         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
7504         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
7505         * src/cdbFile.c: added
7506         * src/SDCCdebug.c: added
7507         * src/SDCCdebug.h: added
7508         * src/SDCCast.c (createFunction)
7509         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
7510         * src/SDCCmain.c (parseCmdLine, main)
7511         * src/SDCCmem.c (redoStackOffsets)
7512         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
7513         * src/SDCCsymt.h
7514         * src/common.h
7515         * src/avr/gen.c (genAVRCode)
7516         * src/ds390/gen.c (gen390Code)
7517         * src/mcs51/gen.c (gen51Code)
7518         * src/pic/gen.c (genpic14Code)
7519         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
7520         * src/xa51/gen.c (genXA51Code)
7521         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
7522
7523 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7524
7525         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
7526         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
7527
7528 2003-03-22    <johan AT balder>
7529
7530         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
7531
7532 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
7533
7534         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
7535         * doc/cdbfileformat.lyx: added, written by Lenny Story
7536         * doc/Makefile: added cdbfileformat.lyx
7537         * doc/clean.mk: added cdbfileformat.lyx
7538
7539 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
7540
7541         * src/mcs51/peeph.def: fix bug #705773
7542
7543 2003-03-20    <johan AT balder>
7544
7545         An sfr/sbit can have an "at #" AND an initializer
7546         * src/SDCCsymt.c (checkSClass):
7547         * src/SDCCmem.c (allocGlobal):
7548         * src/SDCCmem.c (allocLocal):
7549         * src/SDCCast.c (createBlock):
7550
7551 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
7552
7553         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
7554
7555 2003-03-16    <johan AT balder>
7556
7557         Undid the hackup of const and volatile, the problem is much bigger
7558         * src/SDCC.y:1.65
7559         * src/SDCCast.c:1.171
7560         * src/SDCCglue.c:1.138
7561         * src/SDCCicode.c:1.146
7562         * src/SDCCsymt.c:1.150
7563         * src/SDCCval.c:1.65
7564
7565 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
7566
7567         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
7568         * src/ds390/gen.c (genAddrOf): fixed bug #704087
7569
7570 2003-03-13    <johan AT balder>
7571
7572         Hackup const and volatile modifiers in type chains a bit:
7573         * src/SDCC.y:1.63
7574         * src/SDCCast.c:1.169
7575         * src/SDCCglue.c:1.136
7576         * src/SDCCicode.c:1.143
7577         * src/SDCCsymt.c1.146
7578         * src/SDCCsymt.h1.59
7579         * src/SDCCval.c:1.63
7580
7581 2003-03-12    <johan AT balder>
7582
7583         * src/SDCCBBlock.h: more LRH debugging junk
7584         * src/SDCCcflow.h: more LRH debugging junk
7585         * src/SDCCloop.c: more LRH debugging junk
7586         * src/SDCC.y (struct_declaration): fixed bug #697590
7587         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
7588         * src/ds390/gen.c (aopForRemat): fixed bug #700031
7589         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
7590
7591 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7592         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
7593         test function names must now match exactly).
7594         * src/SDCCcse.c: added special case in findCheaperOp to allow
7595         extending a short integer. Makes less awful code for bug 700121 test case.
7596
7597 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7598
7599         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
7600         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
7601
7602 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7603
7604         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
7605         actually called (operandsNotEqual() was called for all
7606         operandsNotEqualX tests).
7607
7608 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7609
7610         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
7611         with shorter literals. Fixes bug 700121.
7612
7613 2003-03-11    <johan AT balder>
7614
7615         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
7616
7617 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
7618
7619         * src/SDCCloop.c (mergeRegions): an evil beast is dead
7620         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
7621
7622 2003-03-10  Borut Razem <borut.razem AT siol.net>
7623
7624         * src/SDCCmain.c: pipe preprocessor's output
7625         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
7626         * sdcc_vc_in.h: define pclose as _pclose for WIN32
7627         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
7628         which closes all pipes in pipeSet set
7629         * src/SDCCset.c: free deleted item in function deleteSetItem()
7630         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
7631         moved from z80 to src subproject
7632         * .version: increased version number to 2.3.4
7633
7634 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
7635
7636         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
7637         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
7638         * support/regression/ports/xa51/spec.mk: fix typo
7639
7640 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
7641
7642         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
7643
7644 2003-03-09  Borut Razem <borut.razem AT siol.net>
7645
7646         * src/SDCCmain.c: pipe preprocessor's output
7647         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
7648         * sdcc_vc_in.h: define pclose as _pclose for WIN32
7649         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
7650         which closes all pipes in pipeSet set
7651         * src/SDCCset.c: free deleted item in function deleteSetItem()
7652         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
7653         moved from z80 to src subproject
7654
7655 2003-03-09  Borut Razem <borut.razem AT siol.net>
7656
7657         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
7658         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
7659         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
7660         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
7661         * src/SDCCglobl.h: unification of WIN32 native definitions
7662
7663 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7664
7665         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
7666
7667 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
7668
7669         * src/configure.in:   check for endianess (even while cross-compiling)
7670         * src/configure:      check for endianess (even while cross-compiling)
7671         * src/configure_in.h: check for endianess (even while cross-compiling)
7672         * src/avr/gen.c:        remove old endianess stuff
7673         * src/mcs51/gen.c:      remove old endianess stuff
7674         * src/ds390/gen.c:      remove old endianess stuff
7675         * src/pic/gen.c:        remove old endianess stuff
7676         * src/pic/genarith.c:   remove old endianess stuff
7677         * src/pic/glue.c:       fix endianess check
7678         * src/pic16/gen.c:      remove old endianess stuff
7679         * src/pic16/genarith.c: remove old endianess stuff
7680         * src/pic16/glue.c:     fix endianess check
7681         * src/xa51/gen.c:       remove old endianess stuff
7682         * src/z80/gen.c:        fix endianess check
7683         * src/SDCCglue.c:       fix endianess check
7684         * src/ds390/peeph.def: fix bug 700036
7685
7686 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
7687
7688         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
7689         * src/configure: find appropriate data-types on host for SDCC's int and long
7690         * src/configure.in: find appropriate data-types on host for SDCC's int and long
7691         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
7692         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
7693
7694 2003-03-07    <johan AT balder>
7695
7696         Just a big NOOP:
7697                 some minor cleanups before the big shot
7698                 OP_DEFS and OP_USES now use Kevin's protection
7699                 new option --nolabelopt
7700
7701         * src/SDCCBBlock.c:
7702         * src/SDCCast.c,:
7703         * src/SDCCcflow.c:
7704         * src/SDCCcse.c:
7705         * src/SDCCicode.c:
7706         * src/SDCCicode.h:
7707         * src/SDCClabel.c:
7708         * src/SDCCloop.c:
7709         * src/SDCCmain.c:
7710         * src/ds390/ralloc.c:
7711         * src/mcs51/ralloc.c:
7712         * src/pic/ralloc.c:
7713         * src/xa51/ralloc.c:
7714         * src/z80/ralloc.c:
7715
7716 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
7717
7718         * src/pic/pcode.c (get_op): fix 64 bit warnings
7719         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
7720         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
7721         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
7722         * support/regression/tests/malloc.c: fix 64 bit warnings
7723
7724 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
7725
7726         * src/mcs51/gen.c (genMinus): fixed bug 696436
7727
7728 2003-03-02  Borut Razem <borut.razem AT siol.net>
7729
7730         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
7731
7732 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
7733
7734         * configure.in: test for mkstemp
7735         * sdccconf_in.h: add HAVE_MKSTEMP
7736
7737 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
7738
7739         * device/include/ctype.h: removed warning while using --stack-auto
7740         * device/include/malloc.h: removed warning while using --stack-auto
7741         * device/include/string.h: removed warning while using --stack-auto
7742
7743 2003-02-23  Borut Razem <borut.razem AT siol.net>
7744
7745         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
7746         because NDEBUG is defined (see man assert)
7747         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
7748
7749 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7750
7751         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
7752         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
7753
7754 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7755
7756         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
7757         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
7758
7759 2003-02-18    <johan AT balder>
7760
7761         * as/mcs51/asmain.c (asmbl): module can start with a digit
7762         * as/z80/asmain.c (asmbl): module can start with a digit
7763
7764 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
7765
7766         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
7767         * src/asm.c: fix pipe() for Mingw32
7768
7769 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
7770
7771         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
7772         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
7773         make -V work again; --c1mode reads now from stdin
7774         * doc/sdccman.lyx: added --c1mode
7775         * support/Util/SDCCerr.c: new messages for c1 mode
7776         * support/Util/SDCCerr.h: new messages for c1 mode
7777         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
7778
7779 2003-02-15    <johan AT balder>
7780
7781         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
7782
7783 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
7784
7785         * doc/sdccman.lyx: Environment variables, -o and other minor things
7786
7787 2003-02-14    <johan AT balder>
7788
7789         * src/xa51/main.c: before anyone really tries to use it :)
7790
7791         * Install doc's in share/sdcc/doc
7792         * removed some obsolete files
7793         * Do a proper make distclean and uninstall
7794         M Makefile.common.in
7795         R sdccbuild.sh
7796         M as/Makefile
7797         M device/include/Makefile.in
7798         M device/lib/Makefile.in
7799         M doc/sdccman.lyx
7800         M link/Makefile
7801         M sim/ucsim/doc/Makefile.in
7802         M src/clean.mk
7803         R src/avr/peeph.rul
7804         R src/xa51/peeph.rul
7805         M support/cpp2/Makefile.in
7806         M support/makebin/Makefile
7807
7808
7809 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
7810
7811         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
7812
7813 2003-02-10  Borut Razem <borut.razem AT siol.net>
7814
7815         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
7816         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
7817         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
7818         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
7819         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
7820         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
7821         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
7822         src/z80/Makefile.bcc: Borland Makefile cleanup
7823         * as/z80/Makefile.bcc: Added Borland Makefile
7824         * support/cpp2/borland.h: Removed
7825
7826 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
7827
7828         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
7829         * src/SDCC.lex: new pragma NOIV
7830         * src/SDCCglobl.h: new pragma NOIV
7831         * src/SDCCmem.c: new pragma NOIV
7832
7833 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
7834
7835         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
7836
7837 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
7838
7839         * src/SDCCmain.c: signal handling is switched off by --debug
7840         * doc/Makefile: small fix for install; use clean.mk again
7841         * doc/clean.mk: clean *.pdf and *.html too
7842
7843 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
7844
7845         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
7846         * device/lib/printfl.c: fix a ds390 bug by making it portable
7847         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
7848         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
7849         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
7850         * debugger/mcs51/cmd.c: converted multi-line string literals
7851         * sim/ucsim/globals.cc: converted multi-line string literals
7852         * src/SDCCmain.c: introduced signal handler to remove temp files
7853         * doc/Makefile: small tweaks, implement clean
7854         * doc: removed generated files
7855
7856 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7857
7858         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
7859         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
7860         Address Record is not correctly generated for DS390."
7861
7862 2003-02-02  Borut Razem <borut.razem AT siol.net>
7863
7864         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
7865         * as/mcs51/asm.h: fixed compilation with Borland C
7866         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
7867         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
7868         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
7869         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
7870         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
7871         src/z80/Makefile.bcc: delete $(LIB) only if exist
7872         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
7873
7874 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
7875
7876         * device/include/malloc.h: introduced NULL
7877         * device/include/string.h: introduced NULL
7878         * device/include/stdlib.h: introduced NULL
7879         * device/lib/_memcpy.c: removed NULL
7880         * device/lib/_strcat.c: removed NULL
7881         * device/lib/_strchr.c: removed NULL
7882         * device/lib/_strcmp.c: removed NULL
7883         * device/lib/_strcpy.c: removed NULL
7884         * device/lib/_strcspn.c: removed NULL
7885         * device/lib/_strlen.c: removed NULL
7886         * device/lib/_strncat.c: removed NULL
7887         * device/lib/_strncmp.c: removed NULL
7888         * device/lib/_strncpy.c: removed NULL
7889         * device/lib/_strpbrk.c: removed NULL
7890         * device/lib/_strrchr.c: removed NULL
7891         * device/lib/_strspn.c: removed NULL
7892         * device/lib/_strstr.c: removed NULL
7893         * device/lib/_strtok.c: removed NULL
7894         * device/lib/malloc.c: removed NULL, include own header
7895
7896 2003-02-02    <johan AT balder>
7897
7898         * 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
7899         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
7900         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
7901         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
7902         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
7903         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
7904
7905 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7906
7907         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
7908         area 'DATA'"
7909
7910 2003-02-01    <johan AT balder>
7911
7912         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
7913
7914 2003-01-31    <johan AT CP255758-A>
7915
7916         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
7917
7918 2003-01-30    <johan AT balder>
7919
7920         * src/SDCCBBlock.c: automatic bug detection
7921         * src/SDCCicode.c: automatic bug detection
7922
7923 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7924
7925         * src/SDCCglobl.h:   now --xram-size 0 works
7926         * src/SDCCmain.c:    now --xram-size 0 works
7927
7928 2003-01-29    <johan AT balder>
7929
7930         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
7931
7932 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7933
7934         * as/mcs51/aslink.h: Added options --xram-size and --code-size
7935         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
7936         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
7937         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
7938         * src/SDCCglobl.h:   Added options --xram-size and --code-size
7939         * src/SDCCmain.c:    Added options --xram-size and --code-size
7940
7941 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
7942
7943         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
7944         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
7945
7946 2003-01-27    <johan AT balder>
7947
7948         * src/SDCC.y: fixed bug #613764
7949
7950 2003-01-26    <johan AT balder>
7951
7952         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
7953         * src/SDCCsymt.h: fixed bug #673374
7954         * src/SDCCglue.c: fixed bug #661910
7955         * src/SDCCast.c: fixed bug #458099 and 673374
7956
7957 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
7958
7959         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
7960         * as/mcs51/strcmpi.h: added
7961         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
7962         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
7963         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
7964         * as/mcs51/assym.c: strcmpi -> as_strcmpi
7965         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
7966         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
7967         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
7968         * as/mcs51/Makefile.aslink: new module strcmpi
7969         * as/mcs51/Makefile.asx8051: new module strcmpi
7970         * as/mcs51/Makefil.bcc: new module strcmpi
7971         * as/mcs51/Makefile.in: new module strcmpi
7972         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
7973
7974 2003-01-26    <johan AT balder>
7975
7976         * src/SDCCglue.c: reverted back to 1.124
7977         * src/SDCCast.c: reverted back to 1.156
7978         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
7979
7980 2003-01-25    <johan AT balder>
7981
7982         * src/SDCCglue.c: A better fix for bug #661910
7983         * src/SDCCast.c: A better fix for bug #661910
7984         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
7985
7986 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
7987
7988         * src/Makefile.in: remove spawn.o
7989         * src/SDCCmain.c: remove spawn.h
7990         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
7991         * src/spawn.c: removed
7992         * src/spawn.h: removed
7993         * support/regression/ports/ds390/spec.mk: link with -r
7994
7995 2003-01-24    <johan AT CP255758-A>
7996
7997         * src/ds390/gen.c (aopOp): fixed bug #667458
7998         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
7999         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
8000         (createIvalCharPtr): an ival doesn't always have a storage class anymore
8001
8002 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
8003
8004         * src/mcs51/peeph.def: better assembler identation by Frieder
8005         * src/mcs51/gen.c: better assembler identation by Frieder
8006
8007 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
8008
8009         * as/z80/string.h: removed for gcc 3.2
8010         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
8011         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
8012
8013 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8014
8015         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
8016         * src/SDCCpeeph.c (replaceRule): fix bug #663503
8017         * support/regression/Makefile: separate temp files for ports
8018         * support/regression/generate-cases.py: separate temp files for ports
8019         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8020         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
8021
8022 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
8023
8024         * moved tinitalk to device/examples/ds390
8025
8026 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
8027
8028         * as/mcs51/lkmem.c: rflag is for DS390
8029         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
8030         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
8031                          (linkEdit): move mem- and map-files the same way as ihx-files
8032         * src/z80/main.c (_setDefaultOptions): removed --generic
8033         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
8034         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
8035         * src/pic/glue.c (picglue): --c1mode works again
8036         * src/pic16/glue.c (pic16glue): --c1mode works again
8037         * src/asm.c (printCLine): fix #660034
8038
8039 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
8040
8041         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
8042         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
8043         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
8044         * as/mcs51/lkmem (summary): better fix for sp problem
8045         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
8046         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
8047         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
8048                                               remove --stack-after-data
8049
8050 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
8051
8052         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
8053         * src/SDCCutil.c (join): ugly bug: missing '\0'
8054         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
8055
8056 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8057
8058         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
8059         * src/port.h: typo
8060         * src/pic/main.c (_asmCmd): gpasm supports -o
8061         * src/z80/main.c: more general macros
8062         * device/lib/Makefile.in: remove intermediate files
8063
8064 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
8065
8066         * .version: Bumped version number to 2.3.3
8067         * src/SDCCBBlock.c: new option -o
8068         * src/SDCCglobl.h: new option -o
8069         * src/SDCCglue.c: new option -o
8070         * src/SDCCmain.c: new option -o
8071         * src/asm.c: new option -o
8072         * src/ds390/main.c: new option -o
8073         * src/pic/glue.c: new option -o
8074         * src/pic/pcode.c: new option -o
8075         * src/pic/ralloc.c: new option -o
8076         * src/pic16/glue.c: new option -o
8077         * src/pic16/pcode.c: new option -o
8078         * src/pic16/ralloc.c: new option -o
8079         * src/z80/main.c: new option -o
8080         * device/lib/Makefile.in: use -o
8081         * support/regression/ports/ds390/spec.mk: use -o
8082         * support/regression/ports/gbz80/spec.mk: use -o
8083         * support/regression/ports/mcs51/spec.mk: use -o
8084         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
8085         * support/regression/ports/z80/spec.mk: use -o
8086         * support/regression/ports/ucz80/spec.mk: use -o
8087         * support/regression/ports/xa51/spec.mk: use -o
8088         * support/regression/fwk/lib/timeout.c: fix usage string
8089
8090 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
8091         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
8092
8093 2003-01-07    <johan AT balder>
8094
8095         * src/SDCCast.c (decorateType): fixed bug #600035
8096
8097 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
8098         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
8099         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
8100         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
8101         * src/pic/pcode.c: outcommented unused variable to remove warnings
8102         * src/pic/ralloc.c: outcommented unused variable to remove warnings
8103
8104 2003-01-06    <karl AT turbobit.com>
8105         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
8106    regression tests.
8107
8108 2003-01-06    <johan AT balder>
8109
8110         * src/SDCCicode.c: fixed array add
8111
8112 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
8113         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
8114         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
8115
8116 2003-01-04    <johan AT balder>
8117
8118         * src/SDCCval.c (getNelements): fixed the initialized array of structures
8119
8120 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8121         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
8122
8123 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8124         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
8125         * support/regression/tests/bug-524697.c: fit mem usage into 8032
8126
8127 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
8128         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
8129
8130 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
8131         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
8132
8133 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
8134         * src/mcs51/main.c: removed {bindir}{sep} from aslink
8135
8136 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8137
8138     * in \sdcc\as\mcs51\ changed these files in order to create an
8139     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
8140     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
8141     following files to include the previous two files: aslink.dsp,
8142     Makefile.aslink, Makefile.bcc, and Makefile.in.
8143
8144     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
8145     .adb instead of .cdb
8146
8147 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8148
8149         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
8150         value from option --iram-size.
8151
8152 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8153
8154         * \sdcc\as\mcs51\lklist.c: added boundary check before using
8155         dram[] array.
8156
8157 2002-09-18    <wiml AT hhhh.org>
8158
8159         * SDCClrange.h: exposed setFromRange() and setToRange()
8160         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
8161           packRegsForAccUse() (bug 542397)
8162         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
8163           multiple times and emitting the fetch operations more than once
8164           added aopGetUsesAcc() function to allow binary operators to
8165           fetch their operands in the correct order; made genMinus() emit
8166           compact code for X = LITERAL - Y
8167
8168 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8169         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
8170         sprintf() in line 1267.
8171
8172 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8173         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
8174         like ports.
8175
8176 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8177         Changes to aslink (All the changes are marked with 'JCF'):
8178
8179         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
8180         summary().
8181
8182         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
8183         area BSEG.  Also moves, if possible, the DATA area down into the internal
8184         ram so more space is available.
8185
8186         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
8187         sflag.
8188
8189         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
8190         not bytes.  Function summary() which creates a memory usage summary
8191         file with extension .mem.  Reports of overlaping stack and small stack
8192         size.  If the space for the stack is less than 16 bytes aslink trows a
8193         warning.
8194
8195         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
8196         the 8051.  Option 'y' for memory summary output file.
8197
8198         Changes to sdcc (All the changes are marked with 'JCF'):
8199
8200         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
8201
8202         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
8203         overlaying area for it (uses RegBankUsed[4]).
8204
8205         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
8206         bank zero as used by default.  By default aslink locates the stack
8207         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
8208         the creation of the .mem file.  Delegates the allocation of data area
8209         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
8210         the begining of the stack area to aslink.
8211
8212         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
8213         glue() in SDCCglue.c creates an area for it.
8214
8215 2002-09-03  Borut Razem <borut.razem AT siol.net>
8216         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
8217         sdcc/src/pic/glue.c:
8218         introduced atexit() handler for teporay files removal in case of
8219         errors, assertions, ...
8220
8221 2002-08-29  Borut Razem <borut.razem AT siol.net>
8222         * sdcc/support/cpp2/auto-host_vc_in.h:
8223         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
8224         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
8225         Maybe there is a similar problem with BORLANDC? It should be checked!
8226
8227         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
8228         corrected improper use of assert: the assignment to clr variable was done inside the assert.
8229         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
8230         was not executed, and the compiler (cl) launched a warning:
8231         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
8232
8233 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8234         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
8235
8236 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
8237         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
8238
8239         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8240           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
8241           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
8242           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8243           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
8244           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
8245           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
8246         - added Release configuration in VS projects
8247         - review of compiler an linker options
8248         - VC .exe files are generated in bin_vc directory, not to interfere
8249           with binaries generated from other projects (cygwin, mingw, bcc ...)
8250
8251         * sdcc/src/yacc.dsp: added
8252
8253         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
8254         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
8255         and insert the version number definitions from .version
8256
8257         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
8258
8259         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
8260         added - genarate auto-host.h using auto-host_vc_in.h as template
8261
8262         * sdcc/sdcc_vc.h,
8263         removed from CVS, generated automatically
8264
8265 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
8266         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
8267
8268 2002-08-11  Borut Razem <borut.razem AT siol.net>
8269         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
8270
8271 2002-08-10  Borut Razem <borut.razem AT siol.net>
8272         * src/SDCCmain.c (main):
8273         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
8274         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
8275         The consequence was that some temporary files were not removed.
8276
8277         * src/SDCCglue.c:
8278         unification of code in functions tempfilename() and tempfile():
8279         function tempnam() is defined in Visual Studio 6.0 and .NET
8280
8281         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
8282
8283         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
8284           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
8285         - removed compiler command line option /WX: Treats all warnings as errors
8286         - update a list of source files, included into the project
8287
8288         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
8289           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
8290         changed project type to Generic Project so that can be correcly converted to VS.NET project
8291
8292         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
8293
8294         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
8295
8296         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
8297
8298         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
8299         added return 0 statements after assert() to make compiler happy
8300
8301         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
8302         added newline in the def file to keep MSC compiler satisfied
8303
8304         * sdcc/src/z80/gen.c:
8305         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
8306           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
8307         - solved MSC error in function aopDump()
8308
8309         * sdcc_vc.h: define PREFIX as "\\sdcc"
8310
8311 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
8312         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
8313
8314 2002-06-22  Scott Dattalo <scott AT dattalo.com>
8315         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
8316         - Rewrote the register banking algorithm.
8317         - Added pCode live-range analysis to registers (for now, only non-used and
8318         singly-used registers optimized away)
8319
8320         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
8321
8322         * 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.
8323
8324 2002-05-10  Scott Dattalo <scott AT dattalo.com>
8325         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
8326
8327 2002-04-22  Michael Hope  <michaelh AT vroom>
8328
8329         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
8330
8331         * configure.in (DD_COPT): Added include support required for gbdk.
8332
8333         * .version: Bumped version number just to increase it.
8334
8335         * src/SDCCmain.c: Added -nostdinc to the default options.
8336
8337 2002-04-15  Michael Hope  <michaelh AT vroom>
8338
8339         * device/lib/z80/printf.c (sprintf): Added.
8340
8341         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
8342
8343         * src/z80/peeph.def: Added transpose redundent load rule.
8344
8345         * src/z80/main.c: Added force callee saves for jaune.
8346
8347         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
8348
8349         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
8350
8351 2002-03-28  Johan Knol  <johan AT balder>
8352
8353         * src/SDCCval.c: fixed bug #532436
8354
8355 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8356         * /src/port.h:
8357         Added "char *Processor" field to the port structure.
8358
8359         * /src/SDCCmain.c:
8360         Added -p option. Allows port dependent processor to be specified.
8361
8362         * all ports:
8363         Initialized the new field char *Processor field to NULL in all ports
8364
8365         * /src/pic/*:
8366         Compiler generated registers for interrupt context saving
8367         were not getting allocated.
8368
8369 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
8370
8371         * /src/SDCCast.c:
8372         Fixed left shift. Will promote the left side of a left shift
8373         if a) left shifting more than size of operand or b) when assigned
8374         to something size > size of left side
8375
8376 2002-03-14  Scott Dattalo <scott AT dattalo.com>
8377         * src/pic/*
8378         tons of changes. Register allocation has been
8379         rewritten. Added customization for the various PICs. Flow
8380         analysis is restructured. ...
8381
8382         * src/pic/device.h:
8383         Added
8384
8385         * src/pic/device.c:
8386         Added. device.c is a PIC port hack to accomodate variations
8387         in PIC devices.
8388
8389 2002-03-13  Michael Hope  <michaelh AT vroom>
8390
8391         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
8392
8393 2002-03-04  johanknol  <johanknol AT manik>
8394
8395         * /src/SDCCval.c: fixed
8396
8397         const unsigned char arr[][2] = { { 0, 1 } };
8398         t18.c:1: error: Initializer element is not constant
8399
8400 2002-03-04  bela  <bela AT manik>
8401
8402         * /device/include/mcs51reg.h:
8403         ds89c420 register definition update
8404
8405 2002-03-03    <johan AT FRIJA>
8406
8407         * support/Util/SDCCerr.c: did something, but don't no why anymore
8408
8409         * support/regression/tests/bug-524691.c: made it a little less shy
8410
8411         * src/SDCCast.c (decorateType): fixed bug #524697
8412
8413         * src/SDCCast.c: made some lineno improvements
8414
8415         * src/SDCCval.c (getNelements): changed warning to error
8416
8417         * src/SDCCglue.c (printIvalArray): changed warning to error
8418
8419         * src/SDCCicode.c: fixed a warning for mingw
8420
8421         * src/SDCCast.c (decorateType): fixed the << promotion for ops
8422
8423         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
8424
8425 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
8426
8427         * src/ds390/peeph.def:
8428         Added some more peephole rules
8429
8430         * src/ds390/gen.c: Various fixes & enhancements
8431
8432         * src/SDCClrange.c, src/SDCClrange.h:
8433         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
8434
8435         * src/ds390/ralloc.c:
8436         various fixes & enhancements (ds390) specific
8437
8438         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
8439         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
8440         from rallocs.
8441
8442         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
8443
8444 2002-03-02    <johan AT FRIJA>
8445
8446         * src/SDCCast.c (decorateType): fixed bug #524708
8447
8448         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
8449
8450         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
8451
8452 2002-03-01  Michael Hope  <michaelh AT vroom>
8453
8454         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
8455
8456         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
8457
8458 2002-03-01    <johan AT FRIJA>
8459
8460         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
8461
8462         * src/SDCCast.c (decorateType): fixed bug #524209
8463
8464         * src/SDCCval.c (valNot): fixed bug #524195
8465
8466 2002-02-26    <johan AT balder>
8467
8468         * src/xa51/gen.c: fixed a warning
8469
8470         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
8471
8472         * src/SDCCast.c (decorateType): fixed bug #522534
8473
8474 2002-02-23    <johan AT balder>
8475
8476         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
8477
8478 2002-02-22    <johan AT balder>
8479
8480         * src/SDCCast.c: fixed bug #514865
8481
8482         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
8483
8484 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
8485
8486         * sdcc/src/SDCCloop.c:
8487         Previous fix was not good. basic blocks that have "break" or "return" are
8488         not really partof a loop , but live ranges used in these blocks should
8489         be live thru the entire loop, so set partOfLoop but don't add them to
8490         loop region
8491
8492 2002-02-21    <johan AT FRIJA>
8493
8494         * src/SDCCcse.c: fixed bug #514308
8495
8496 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
8497
8498         * src/SDCCloop.c:
8499         Fixed BUG #519583. If a conditional block ended in a return/break
8500         statement inside a loop, it was not being considered part of the loop.
8501
8502         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
8503
8504 2002-02-10  Karl Bongers <karl AT turbobit.com>
8505
8506         * debugger/*:
8507         Fixed up SDCDB debugger somewhat.  Updated debugger/README
8508         with lots of comments and notes.
8509
8510         * device/examples/test2.c:
8511         Fix bug, "red" variable not being initialized(compiler complained).
8512
8513         * device/examples/Makefile, examples/test3.c:
8514         Add Makefile in device/examples folder, compiles test3.c
8515         for use as a multiple module SDCDB test case.
8516
8517         * sim/ucsim/cmd.src/cmdset.cc:
8518         Took out debug printfs in ucsim "next" command.
8519
8520         * sim/ucsim/xa.src:
8521         Karl and Johan start ucsim XA support.  Most dissassembly working,
8522         about 75% emulation done(plenty of work remaining).
8523
8524         * sim/ucsim/z80.src:
8525         Add Z80 support to ucsim, add test-ucz80 regression test,
8526         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
8527         Notice z80 compiler fails on examples/test3.c/crc code.
8528
8529 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
8530
8531         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
8532         Added support for --parms-in-bank1
8533
8534         * src/ds390/peeph.def:
8535         added a few more peephole optimzations
8536
8537         * src/ds390/main.c:
8538         1) added __builtin_inp & __builtin_outp used to read in data of given length
8539            from a memory mapped port
8540         2) added __builtin_memcmp
8541         3) added __builtin_swapw swap bytes of a short
8542
8543         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
8544         1) handle multiple send & receives from register bank1
8545         2) ralloc can now allocate DPTR1 to some liveRanges
8546
8547         * src/SDCCsymt.c, src/SDCCsymt.h:
8548         changes to handle multiple sends & receives
8549
8550         * src/SDCCptropt.h:
8551         added some pointer arithmetic optimization
8552
8553         * src/SDCCptropt.c:
8554         added some pointer arithmetic optimizations but not stable yet so not
8555         called from anywhere (will get this working shortly)
8556
8557         * src/SDCCopt.c: fixed for multiple sends & receives
8558
8559         * src/SDCCmain.c:
8560         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
8561         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
8562            set preprocessor defines (depending on options)
8563
8564         * src/SDCCicode.c, src/SDCCicode.h:
8565         changes made to handle multiple sends & receives
8566
8567         * src/SDCCglobl.h:
8568         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
8569
8570         * src/SDCCcse.c, src/SDCCcse.h:
8571         added function findbackward def (to be used in upcoming optimization)
8572
8573         * src/SDCCcflow.c, src/SDCCcflow.h:
8574         added function returnAtEnd - to determine if a basic block terminates with
8575         a RETURN iCode
8576
8577         * src/SDCCast.c, src/SDCCast.h:
8578         added option parms-in-bank1
8579
8580         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
8581         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
8582         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
8583         adjusted for --parms-in-bank1 option
8584
8585         * device/include/string.h:
8586         donot redefine "reentrant" keyword
8587
8588         * device/include/ds80c390.h: Added some more SFRs
8589
8590 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
8591
8592         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
8593
8594 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
8595
8596         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
8597
8598 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
8599
8600         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
8601
8602 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
8603
8604         * Added --xram-movc option
8605
8606 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
8607
8608         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
8609
8610 2002-01-11  Johan Knol
8611
8612         * Added math lib of Jesus Calvino-Fraga
8613
8614 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
8615
8616         * src/SDCCmain.c (processFile): fix processing of ../../src.c
8617         * support/regression/Makefile: new target test-mcs51-stack-auto
8618         * support/regression/ports/mcs51-stack-auto/spec.mk: added
8619
8620 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
8621
8622         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
8623
8624 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
8625
8626         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
8627
8628 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
8629
8630         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
8631
8632         * src/SDCCglue.h: add definition for printIvalChar()
8633
8634 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
8635
8636         * src/SDCCast.c: fix #498138 by Johan
8637
8638         * src/SDCCglue.c: fix #498138 by Johan
8639
8640 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
8641
8642         * support/regression/Makefile: fix clean
8643
8644         * support/regression/ports/ds390/support.c: fix transmission of last character
8645
8646 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
8647
8648         * /sdcc/src/ds390/gen.c:
8649         a) improved computing address of stack variable
8650         b) took out some #if 0 code
8651         c) improved parmBytes adjustment
8652         d) improved genPlusIncr & genMinusIncr
8653         e) genCmp could generate bad code (when left assigned to DPTR)
8654         f) Fixed bug in hasInc
8655
8656         * /sdcc/src/ds390/ralloc.c:
8657         a) packRegsForSupport could mess up live information (Fixed)
8658         b) packRegsDPTRuse could be incorrect for left & right shift
8659
8660         * /sdcc/src/mcs51/ralloc.c:
8661         packRegsForSupport could mess up the live information (Fixed)
8662
8663         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
8664
8665         * /sdcc/src/SDCCast.c:
8666         can reverse a loop even if function call is present as long
8667         as the loop control variable is local & is not passed as parameter
8668
8669 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8670
8671         * /sdcc/ChangeLog: *** empty log message ***
8672
8673         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
8674         More builtin function additions for TININative
8675
8676         * /sdcc/src/ds390/ralloc.c:
8677         Had broken the regression testsuite
8678
8679         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
8680
8681         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
8682         Added funcattr hasStackParms will be set for reentrant functions when there
8683         are paramteres on the stack, this helps in minimizing frame pointer generation
8684         typeFromStr can handle function pointers now
8685
8686         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
8687         *** empty log message ***
8688
8689 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8690
8691         * /src/ds390/gen.c, /src/ds390/main.c:
8692         More builtin function additions for TININative
8693
8694         * /src/ds390/ralloc.c:
8695         Had broken the regression testsuite
8696
8697         * /src/SDCCast.c: Fixed a bug in dumptree
8698
8699         * /src/SDCCsymt.c, /src/SDCCsymt.h:
8700         Added funcattr hasStackParms will be set for reentrant functions when there
8701         are paramteres on the stack, this helps in minimizing frame pointer generation
8702         typeFromStr can handle function pointers now
8703
8704         * /doc/builtins.txt, /doc/TININative.txt:
8705         *** empty log message ***
8706
8707
8708 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8709
8710         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
8711         ALPHA version for -mTININative
8712
8713         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
8714         updated to reflect changes in the port structure
8715
8716         * /src/port.h:
8717         added function do_assemble (similar to do_link) if non-null this function
8718         will be called to do assembly (-mTININative) requires a multi command
8719         assembly
8720         added function genAssemblerEnd will be called to generate assembler Epilogue
8721
8722         * /src/SDCCsymt.c:
8723         added _JavaNative to debug info printing
8724
8725         * /src/SDCCmain.c: added option --tini-libid
8726         added port->do_assemble function (-mTININative) has a multi command assemble
8727
8728         * /src/SDCCglue.c: Disabled "constExpr" check
8729         added port->genAssemblerEnd function
8730
8731         * /src/SDCCglobl.h: Added option --tini-libid value
8732
8733         * /src/SDCCast.h:
8734         tookout optimizeCompare from the header (has no external references)
8735
8736         * /src/SDCCast.c: made one more function "static"
8737
8738 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
8739
8740         * src/z80/mappings.i: Added z80asm support.
8741
8742         * src/z80/main.c: Added z80asm support on --asm=z80asm
8743
8744         * src/z80/gen.c: Fixed asm portability issues.
8745
8746         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
8747
8748         * src/SDCCglue.c (printExterns): Added global/extern split.
8749
8750 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
8751
8752         * support/regression/Makefile: added test for mcs51 model large
8753
8754         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
8755
8756         * support/regression/ports/gbz80/spec.mk: added -mgbz80
8757
8758 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
8759
8760         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
8761
8762 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
8763
8764         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
8765
8766         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
8767
8768 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
8769
8770         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
8771
8772         * support/regression/tests/simplefloat.c: Port to mcs51.
8773
8774 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
8775         * support/regression/tests/bug-485362.c: Added.
8776
8777         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
8778
8779         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
8780
8781         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
8782
8783         * src/z80/gen.c (aopDump): Added a dump function.
8784
8785 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
8786         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
8787
8788         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
8789
8790         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
8791
8792         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
8793
8794         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
8795
8796         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
8797
8798         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
8799
8800         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
8801
8802         * support/regression/ports/ds390/support.c: Use tinibios.
8803
8804         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
8805
8806 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
8807
8808         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
8809         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
8810
8811         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
8812
8813         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
8814
8815 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
8816
8817         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
8818
8819         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
8820         (packRegsForIYUse): Created and optimised.
8821
8822 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
8823
8824         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
8825 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
8826
8827         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
8828
8829         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
8830
8831         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
8832
8833 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
8834
8835         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
8836
8837         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
8838
8839 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
8840
8841         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
8842
8843         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
8844
8845         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
8846
8847 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
8848
8849         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
8850         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
8851         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
8852
8853         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
8854
8855         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
8856         (genNotFloat): Added.
8857         (genUminusFloat): Added.
8858
8859         * device/lib/z80/Makefile: Added floating pt stubs.
8860
8861         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
8862
8863         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
8864
8865         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
8866
8867 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
8868
8869         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
8870
8871         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
8872
8873         * sdcc/support/regression/Makefile: Add port ds390.
8874
8875         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
8876
8877         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
8878
8879         * sdcc/support/regression/ports/ds390/spec.mk: Added.
8880
8881         * sdcc/support/regression/ports/ds390/support.c: Added.
8882
8883         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
8884
8885         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
8886
8887         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
8888
8889 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
8890
8891         * device/include/malloc.h: Added z80 and gbz80 support.
8892
8893         * device/lib/gbz80/heap.s: Added.
8894
8895         * device/lib/z80/heap.s: Added.
8896
8897         * device/lib/malloc.c: Added z80 and gbz80 support.
8898
8899         * support/regression/tests/malloc.c (testMalloc): Added.
8900
8901         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
8902
8903         * support/regression/tests/bug-478094.c: Added.
8904
8905         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
8906
8907 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
8908
8909         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
8910
8911         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
8912
8913         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
8914
8915         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
8916
8917         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
8918
8919 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
8920
8921         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
8922
8923 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
8924
8925         * support/regression/tests/bug-477927.c: Added.
8926
8927         * src/z80/peeph.def: Added minor rules.
8928
8929         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
8930
8931         * src/z80/peeph.def: Added jump optimisation modification.
8932
8933 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
8934
8935         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
8936
8937 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
8938
8939         * support/regression/tests/funptrs.c: Added.
8940
8941 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
8942
8943         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
8944
8945 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
8946
8947         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
8948
8949         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
8950
8951         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
8952         (movLeft2ResultLong): Created.
8953
8954         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
8955         (joinPushes): Added.  Joins two char pushes into a word push.
8956
8957 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
8958
8959         * support/cpp2/Makefile.in (install): Added creation of dest dir.
8960
8961         * support/makebin/Makefile (install): Added creation of dest dir.
8962
8963 2001-10-24 Karl Bongers <karl AT turbobit.com>
8964
8965         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
8966
8967 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
8968
8969         * src/z80/ralloc.c: Turned off faulty pack for one use.
8970
8971         * src/z80/peeph-gbz80.def: Removed redundent restart options.
8972
8973         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
8974
8975 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
8976
8977         * support/regression/Makefile: Improved clean
8978
8979         * support/regression/ports/gbz80/spec.mk: Added clean
8980
8981         * support/regression/ports/host/spec.mk: Added clean
8982
8983         * support/regression/ports/z80/spec.mk: Added clean
8984
8985         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
8986
8987         * support/regression/ports/mcs51/timeout.c: little improvements
8988
8989 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
8990
8991         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
8992
8993         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
8994
8995         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
8996
8997 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
8998
8999         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
9000
9001         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
9002
9003 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
9004         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
9005
9006         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
9007
9008         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
9009
9010         * src/mcs51/main.c (_linkCmd): Added bin path to command.
9011
9012         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
9013
9014         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
9015
9016         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
9017
9018         * support/regression/tests/longor.c: Added.
9019
9020 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
9021
9022         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
9023
9024         * as/mcs51/aslink.h: define PATH_MAX
9025
9026         * as/mcs51/asm.h: define PATH_MAX
9027
9028         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
9029
9030         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
9031
9032         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
9033
9034         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
9035
9036         * src/SDCCglobl.h: define PATH_MAX
9037
9038         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
9039
9040         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
9041
9042 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
9043
9044         * src/z80/gen.c (gencjneshort): Fixed
9045
9046         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
9047
9048 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
9049
9050         * support/regression/tests/bug-469671.c: Added.
9051
9052         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
9053
9054 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
9055
9056         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
9057
9058         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
9059
9060 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
9061
9062         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
9063
9064         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
9065
9066         * src/device/lib/_mullong.c : removed hint: nooverlay bug
9067
9068         * src/device/lib/_divuint.c : removed hint: nooverlay bug
9069
9070         * src/device/lib/_divulong.c: removed hint: nooverlay bug
9071
9072         * src/device/lib/_moduint.c : removed hint: nooverlay bug
9073
9074         * src/device/lib/_modulong.c: removed hint: nooverlay bug
9075
9076 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
9077
9078         * 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.
9079
9080         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
9081
9082         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
9083
9084 2001-10-07    <johan AT FRIJA>
9085
9086         * device/lib/gets.c (gets): fixed the return value.
9087
9088 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
9089         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
9090
9091         * 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.
9092
9093         * 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.
9094
9095         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
9096
9097         * src/pic/gen.c: Removed Safe_strdup.
9098
9099         * configure.in: Added option to enable libgc support.
9100
9101         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
9102         (bitVectUnion): Optimised.
9103         (bitVectIntersect): Optimised.
9104         (bitVectBitsInCommon): Optimised.
9105         (bitVectCplAnd): Optimised.
9106
9107         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
9108
9109 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9110
9111         * src/SDCCmain.c: distinguish between assembler debug and plain options
9112
9113         * src/avr/main.c:   remove standard assembler options
9114
9115         * src/ds390/main.c: remove standard assembler options
9116
9117         * src/mcs51/main.c: remove standard assembler options
9118
9119         * src/port.h: removed "PENDING" comment
9120
9121 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9122
9123         * src/device/lib/_mulint.c  : new, with assember functions
9124
9125         * src/device/lib/_mullong.c : new, with assember functions
9126
9127         * src/device/lib/_divuint.c : with assember functions
9128
9129         * src/device/lib/_divsint.c : with assember functions
9130
9131         * src/device/lib/_divulong.c: with assember functions
9132
9133         * src/device/lib/_divslong.c: with assember functions
9134
9135         * src/device/lib/_moduint.c : with assember functions
9136
9137         * src/device/lib/_modsint.c : with assember functions
9138
9139         * src/device/lib/_modulong.c: with assember functions
9140
9141         * src/device/lib/_modslong.c: with assember functions
9142
9143         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
9144
9145         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
9146
9147         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
9148                                       replaced _mululong.c and _mulslong.c by _mullong.c
9149
9150 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
9151
9152         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
9153
9154 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9155
9156         * src/SDCCglue.c: test, if win32api is available for MINGW
9157
9158 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
9159
9160         * src/SDCCsymt.c: no more _modifier in printTypeChain()
9161         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
9162         * support/regression/ports/gbz80/spec.mk: removed GENERIC
9163         * support/regression/ports/host/spec.mk: removed GENERIC
9164         * support/regression/ports/mcs51/spec.mk: removed GENERIC
9165         * support/regression/ports/z80/spec.mk: removed GENERIC
9166
9167 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
9168
9169         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
9170
9171         * support/regression/tests/bug-467035.c: Created.
9172
9173 2001-10-01    <johan AT FRIJA>
9174
9175         * src/SDCC.y: fixed bug #466586 part 1
9176
9177 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
9178
9179         * SDCCicode.c: z80 has no generic pointers
9180         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
9181
9182 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
9183
9184         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
9185
9186 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
9187
9188         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
9189
9190         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
9191
9192 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
9193
9194         * configure.in: Fixed up so that ucsim is only configured once.
9195
9196         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
9197
9198         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
9199         (getPathDifference): As above.
9200
9201         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
9202
9203         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
9204
9205 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
9206         * .version: Updated to 2.3.1
9207
9208         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
9209         Added copyright header.
9210
9211         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
9212         (assemble): Added support for macro based assembler commands.
9213         (linkEdit): Added support for macro based linker commands.
9214         (preProcess): Changed the pre-processor to use macros.
9215         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
9216         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
9217
9218         * device/lib/z80/crt0.s: Added module name for debugging.
9219
9220 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
9221
9222         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9223
9224         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
9225
9226         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
9227
9228         * src/Makefile.in: Added SDCCmacro and SDCCutil
9229
9230 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
9231
9232         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
9233
9234 2001-09-16    <johan AT FRIJA>
9235
9236         * 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.
9237
9238 2001-09-15    <johan AT FRIJA>
9239
9240         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
9241         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
9242
9243 2001-09-11    <johan AT FRIJA>
9244
9245         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
9246
9247 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
9248
9249         * support/regression/tests/bug-460444.c: Added test case.
9250
9251         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
9252         (genCast): Added justification for all of the asserts.
9253
9254 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
9255
9256         * support/regression/support.c: _xdata replaced by xdata
9257
9258         * support/regression/spec.mk: removed _generic
9259
9260 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
9261
9262         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
9263
9264         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
9265         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
9266
9267         * src/z80/peeph.def: Added a rule to optimise shift then compare.
9268
9269         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
9270
9271         * support/regression/tests/bug-460010.c: Added test case.
9272
9273         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
9274
9275 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
9276
9277         * support/regression/Makefile: inter-port-clean adjusted for mcs51
9278
9279         * support/regression/testfwk.c: removed workaround for bug #436344
9280
9281         * support/regression/tests/bp.c: use less memory with mcs51
9282
9283         * support/regression/tests/bug-441448.c: use less memory
9284
9285         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
9286
9287         * support/regression/collate-results.py: typo
9288
9289 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
9290
9291         * support/regression/tests/fetchoverlap.c: Added new test case.
9292
9293         * support/regression/tests/bp.c: Added new test case.
9294
9295         * support/regression/tests/bug-448984.c: Added new test case.
9296
9297         * support/regression/tests/pow2shifts.c: Added new test case.
9298
9299         * src/z80/gen.c: Turned off the noise it normally generates for the release.
9300         (genlshTwo): Fixed right shift for count > 8.
9301
9302         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
9303
9304 2001-09-08    <johan AT FRIJA>
9305
9306         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
9307
9308 2001-09-07    <johan AT FRIJA>
9309
9310         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
9311
9312         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
9313
9314 2001-09-06    <johan AT FRIJA>
9315
9316         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
9317         * bernhard noted me at this: "() equals to (void)" (1.38)
9318
9319 2001-09-05    <johan AT FRIJA>
9320
9321         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
9322
9323 2001-09-04    <johan AT FRIJA>
9324
9325         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
9326
9327
9328 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
9329
9330         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
9331
9332 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
9333
9334         * link/z80/aslink.h: Fixed path for PATH_MAX
9335
9336 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
9337
9338         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
9339
9340         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
9341
9342         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
9343
9344         * 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.
9345
9346 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
9347
9348         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
9349         (genCmp): Fixed up genCmp for the GB with longs.
9350
9351         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
9352
9353         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
9354
9355         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
9356
9357         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
9358
9359 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
9360
9361         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
9362
9363 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
9364
9365         * 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.
9366
9367         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
9368
9369 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
9370
9371         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
9372
9373         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
9374
9375 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
9376
9377   * sim/ucsim/configure:    little improvement of Cygwin-detection
9378   * sim/ucsim/configure.in: little improvement of Cygwin-detection
9379   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
9380   * support/regression/tests/bug-221100.c: small changes for mcs51
9381   * support/regression/tests/bug-221168.c: small changes for mcs51
9382   * support/regression/tests/bug-227710.c: small changes for mcs51
9383   * support/regression/tests/staticinit.c: small changes for mcs51
9384   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
9385   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9386   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9387
9388 $Revision$