2f8968dc50c6fd84ca63c6fafb2683436ec05e3f
[fw/sdcc] / ChangeLog
1 2005-06-15 Raphael Neider <rneider AT web.de>
2
3         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
4         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
5         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
6           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
7           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
8
9 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
10
11         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
12           Marcel Telka in bug #1215704
13
14 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
15
16         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be located in shared memory bank.
17
18 2005-05-31 Raphael Neider <rneider AT web.de>
19
20         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
21           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
22           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
23
24 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
25
26         * device/lib/_strncpy.c: fixed the fix
27
28 2005-05-26 Raphael Neider <rneider AT web.de>
29
30         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
31           initializers with \0, bug #1208187
32         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
33           intializers with \0, bug #1208187
34
35 2005-05-26 Raphael Neider <rneider AT web.de>
36
37         * src/pic16/glue.c (pic16_printIvalChar): fixed string
38           initializers with \0, bug #1208187
39         * src/pic16/main.c (_process_pragma): added sanity checks
40           for stack position and size, emit warnings when appropriate
41
42 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
43
44         * device/lib/_strncpy.c: fixed not filling with \0
45
46 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
47
48         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
49           createFunction),
50         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
51           compound_statement),
52         * src/SDCCsymt.h,
53         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
54
55 2005-05-24 Raphael Neider <rneider AT web.de>
56
57         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
58
59 2005-05-24 Raphael Neider <rneider AT web.de>
60
61         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
62           TRISE definitions, closes bug #1162453
63
64 2005-05-22 Raphael Neider <rneider AT web.de>
65
66         * src/pic16/main.c (_process_pragma): check for missing
67           arguments to pragmas code and udata
68         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
69           consistency fixes to match other headers (thanks to Jim Paris)
70         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
71
72 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
73
74         * src/SDCCicode.c (isOperandEqual): fixed missing ;
75
76 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
77
78         * support/regression/tests/bug1198642.c: new test
79         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
80         * src/SDCCcse.c (findPrevIc): added comment, please have a look
81         * support/scripts/resource.h,
82         * support/scripts/resource.rc,
83         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
84         * support/scripts/sdcc.ico: added 32x32 icon
85
86 2005-05-18 Raphael Neider <rneider AT web.de>
87
88         * device/lib/pic16/libdev/pic18f*.c,
89         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
90           keywords to "__sfr" and "__at (X)"
91         * device/include/pic16/pic18fregs.h: added pic18f4520
92         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
93           #1203088 (MPLAB compatibility)
94
95 2005-05-17 Raphael Neider <rneider AT web.de>
96
97         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
98         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
99         * device/lib/pic16/pics.all: added new devices
100         * src/pic16/device.c: added support for pic18f4520
101
102 2005-05-16 Raphael Neider <rneider AT web.de>
103         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
104         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
105         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
106           convenience function for bit access
107
108 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
109
110         * device/lib/printf_large.c: fixed bug 1193299
111         * support/regression/tests/bug1057979.c: added test %3.3s
112
113 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
114
115         * device/include/mcs51/8051.h,
116         * device/include/mcs51/8052.h: made parseable with lint
117         * device/include/mcs51/lint.h: added include file for (sp)lint
118         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
119         * doc/cdbfileformat.lyx,
120         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
121
122 2005-05-14 Raphael Neider <rneider AT web.de>
123
124         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
125         * device/lib/pic16/libc/stdlib/itoa.c (new)
126         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
127         * device/lib/pic16/libio/Makefile: exclude subdir according to
128           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
129         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
130         * src/pic16/gen.c (genFunction): prevent annoying warning
131         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
132           nameclashes on BeOS
133         * support/cpp2/cppmain.c (cpp_output_string): new
134         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
135           fixes bug 1116802
136
137 2005-05-13 Borut Razem <borut.razem AT siol.net>
138
139         * src/SDCCmain.c (linkEdit): fixed bug 1195202
140
141 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
142
143         * .version: changed to version 2.5.1; back to bleeding edge development
144
145 2005-05-11 Borut Razem <borut.razem AT siol.net>
146
147         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
148           generate PDF version 1.3 documents
149
150 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
151
152         * .version: changed to version 2.5.0
153
154 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
155
156         * doc/sdccman.lyx: updated weblinks, index and smaller updates
157
158 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
159
160         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
161         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
162         well as many smaller updates.
163         * .version: changed to version 2.5.0-pre1
164
165 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
166
167         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
168
169 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
170
171         * support/regression/tests/bug1185672.c: added
172         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
173           bug 1185672
174         * src/mcs51/gen.c (genCall): added comments, made it look safer
175         * src/mcs51/gen.c (genEndFunction): simplified
176
177 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
178
179         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
180
181 2005-04-14 Borut Razem <borut.razem AT siol.net>
182
183         * fixed bug 1045046 - SIGSEGV with really simple code?:
184           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
185           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
186
187 2005-04-14 Borut Razem <borut.razem AT siol.net>
188
189         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
190           src/pic16/device.h: temporarily disabled experimental #inline pragma
191           for 2.5.0 release
192
193 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
194
195         * device/include/z80/stdio.h,
196         * device/include/z80/string.h: removed these highly incomplete files so
197           SDCC can use the default ones in device/include/
198
199 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
200
201         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
202         gcc warning.
203         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
204         fix sdcpp warnings.
205
206 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
207
208         * device/include/malloc.h: removed redundant __reentrant prototypes
209         * device/lib/_mullong.c: added working xstack variant in asm (C version
210           doesn't pass regression tests)
211         * device/lib/bpx.c: used __data and made bpx char for mcs51
212         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
213           (createFunction): fixed bug with xstackPtr
214         * src/SDCCcse.c: corrected comments
215         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
216           (killDeadCode, eBBlockFromiCode): removed unused code
217         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
218           corrected comments
219         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
220           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
221           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
222           (genModOneByte): fixed warning in MSVC
223         * src/mcs51/main.c (): added comments
224         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
225
226 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
227
228         * src/SDCCmain.c (linkEdit): oops, changed one line too many
229
230 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
231
232         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
233
234 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
235
236         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
237         characters arrays of larger size than the declared one.
238
239 2005-04-10 Borut Razem <borut.razem AT siol.net>
240
241         * src/pic/gen.c (genInline),
242           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
243           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
244           (findNextInstruction), (findPrevInstruction),
245           (findInstructionUsingLabel),
246           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
247         * src/pic/pcode.c (findLabel): added missing '\n'
248         * src/src.dsp: added SDCCdwarf2.c to the project
249
250 2005-04-09 Borut Razem <borut.razem AT siol.net>
251
252         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
253
254 2005-04-08 Raphael Neider <rneider AT web.de>
255
256         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
257           into the chain after a given one) and mergeDefmapSymbols (combine
258           defmap entries for each symbol per pcode)
259         * (createDefmap): have defmap entries merged in the end
260         * (defmapReplaceSymRef): split defmap entries covering two accesses to
261           a symbol before replacing one access type's symbol, merge symbols in
262           the end (replacement symbol might already have an entry)
263         * (assignValnums): keep reference to written WREG intact
264
265 2005-04-08 Raphael Neider <rneider AT web.de>
266
267         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
268           Alpha)
269
270 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
271
272         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
273         bytes
274
275 2005-04-07 Raphael Neider <rneider AT web.de>
276
277         * device/include/pic16/usart.h: added compatibility defines for
278           devices with more than one USART
279         * device/include/pic16/pic18f[68][567]20.h: activated above defines
280
281 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
282
283         * device/lib/Makefile.in: updated for port specific include
284
285 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
286
287         * support/regression/ports/mcs51/spec.mk: added mcs51 include
288
289 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
290
291         * device/include/8051.h,
292         * device/include/8052.h,
293         * device/include/at89S8252.h,
294         * device/include/at89c55.h,
295         * device/include/at89x051.h,
296         * device/include/at89x51.h,
297         * device/include/at89x52.h,
298         * device/include/mcs51reg.h,
299         * device/include/reg51.h,
300         * device/include/reg764.h,
301         * device/include/regc515c.h,
302         * device/include/sab80515.h: (re)moved these 12 files
303         * device/include/mcs51/8051.h,
304         * device/include/mcs51/8052.h,
305         * device/include/mcs51/at89S8252.h,
306         * device/include/mcs51/at89c55.h,
307         * device/include/mcs51/at89x051.h,
308         * device/include/mcs51/at89x51.h,
309         * device/include/mcs51/at89x52.h,
310         * device/include/mcs51/mcs51reg.h,
311         * device/include/mcs51/reg51.h,
312         * device/include/mcs51/reg764.h,
313         * device/include/mcs51/regc515c.h,
314         * device/include/mcs51/sab80515.h: and added them here
315
316 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
317
318         * device/include/stdarg.h: changed SDCC specific keywords to double
319           underlined form.
320         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
321           mcs51 and ds390.
322         * device/include/hc08/mc68hc908gp32.h,
323         * device/include/hc08/mc68hc908jb8.h,
324         * device/include/hc08/mc68hc908jkjl.h,
325         * device/include/hc08/mc68hc908qy.h: fixed comments
326         * device/include/mcs51/README: updated
327         * device/include/mcs51/c8051f120.h: added PINRSF
328         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
329         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
330           amidst code. Also inline is not supported.
331
332 2005-04-06 Raphael Neider <rneider AT web.de>
333
334         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
335         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
336           callers stack/frame pointers
337
338 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
339
340         * device/include/pic16/usart.h: added, missing in previous commit,
341         * device/include/pic16/adc.h: fixed typo,
342         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
343         commit,
344         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
345         <p18fxxx.inc>
346         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
347         uninitialized because a bug appears with gplink
348         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
349         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
350         complains for unrecognised option
351
352 2005-04-05 Raphael Neider <rneider AT web.de>
353
354         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
355           structs as well (using memcpy)
356         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
357           on ISRs (GOTO has no label)
358         * src/pic16/device.h: added OF_OPTIMIZE_DF
359         * src/pic16/main.c: added compiler switch --optimize-df to enable the
360           new data flow analysis/optimization
361         * src/pic16/pcode.c: added (prototypes for and implementation of)
362           dataflow analysis functions, fixed pCodeInstructions' inCond and
363           outCond values, made RCALL a branch instruction
364         * (pic16_unlinkpCode): keep C line if possible
365         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
366           C line moved if possible
367         * (pic16_getRegFrompCodeOp): NEW, improved version of...
368         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
369           to use new pic16_getRegFrompCodeOp (works for more SFRs)
370         * (pic16_BuildFlow): fixed skip instructions with label (did not start
371           new flow)
372         * (pic16_getJumptabpCode): NEW, needed in...
373         * (LinkFlow): fixed handling of jumptables, calls and conditional
374           branches
375         * (pic16_InsertCommentAfter): NEW
376         * (pic16_pCodeReplace): made verbose and flow preserving
377         * (AnalyzeFlow): added call to data flow analysis
378         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
379         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
380         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
381
382 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
383
384         * src/SDCCast.c (decorateType): fixed bug #1105626
385
386 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
387
388         * device/include/asm/pic16/features.h,
389         * pic18f*.h headers,
390         * device/include/pic16/adc.h,
391         * device/include/pic16/delay.h,
392         * device/include/pic16/i2c.h,
393         * device/include/pic16/malloc.h,
394         * device/include/pic16/stdio.h,
395         * device/include/pic16/stdlib.h,
396         * device/include/pic16/string.h,
397         * device/lib/pic16/libc/stdio/printf_tiny.c,
398         * device/lib/pic16/libc/stdio/printf_small.c,
399         * device/lib/pic16/libc/stdio/strmgpsim.c,
400         * device/lib/pic16/libc/stdio/strmmssp.c,
401         * device/lib/pic16/libc/stdio/strmusart.c,
402         * device/lib/pic16/libc/stdio/vfprintf.c,
403         * device/lib/pic16/libc/stdlib/ltoa.c,
404         * device/lib/pic16/libc/stdlib/putchar.c,
405         * device/lib/pic16/libc/stdlib/x_ftoa.c,
406         * device/lib/pic16/libc/stdlib/memchrpgm.c,
407         * device/lib/pic16/libc/stdlib/memchrram.c,
408         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
409         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
410         * device/lib/pic16/libio/adc/adcbusy.c,
411         * device/lib/pic16/libio/adc/adcread.c,
412         * device/lib/pic16/libio/adc/adcsetch.c,
413         * device/lib/pic16/libio/usart/ubaud.c,
414         * device/lib/pic16/libio/usart/ubusy.c,
415         * device/lib/pic16/libio/usart/udrdy.c,
416         * device/lib/pic16/libio/usart/uopen.c,
417         * device/lib/pic16/libio/usart/uputc.c,
418         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
419         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
420         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
421         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
422         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
423         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
424         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
425         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
426         specific keywords to double underlined form,
427         * device/lib/pic16/libc/Makefile.rules,
428         * device/lib/pic16/libsdcc/Makefile.rules,
429         * device/lib/pic16/libm/Makefile,
430         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
431         to compile with C standard set in Makefile.common
432         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
433         rand.c and crc.c in compilation process,
434         * device/lib/pic16/libsdcc/int/divuint.c,
435         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
436         `c' from signed to unsigned,
437         * device/lib/pic16/startup/crt0.c,
438         * device/lib/pic16/startup/crt0i.c,
439         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
440         keywords to double underlined form, bug fixes in _do_cinit function
441         which prevented the correct initialization of the .idata segment,
442         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
443         core to enter a infinite loop
444         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
445
446 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
447
448         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
449
450 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
451
452         * device/include/Makefile.in: add support for hc08 subdirectory
453         * device/include/hc08/: new subdirectory
454         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
455         Lucas Loizaga, thanks!
456         * device/include/hc08/mc68hc908qy.h,
457         * device/include/hc08/mc68hc908gp32.h,
458         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
459         their own directory. Changed internal macro names to use the compiler
460         reserved namespace. Changed SDCC specific keywords to double
461         underlined form.
462         * device/include/math.h,
463         * device/include/malloc.h,
464         * device/include/stdarg.h,
465         * device/include/stdbool.h
466         * device/include/string.h,
467         * device/include/tinibios.h,
468         * device/include/ds400rom.h,
469         * device/include/8051.h,
470         * device/include/8052.h,
471         * device/include/80c51xa.h,
472         * device/include/at89c55.h,
473         * device/include/at89S8252.h,
474         * device/include/at89x51.h,
475         * device/include/at89x52.h,
476         * device/include/ds80c390.h,
477         * device/include/reg764.h,
478         * device/include/regc515c.h,
479         * device/include/sab80515.h,
480         * device/include/mcs51/c8051f000.h,
481         * device/include/mcs51/c8051f018.h,
482         * device/include/mcs51/c8051f020.h,
483         * device/include/mcs51/c8051f040.h,
484         * device/include/mcs51/c8051f060.h,
485         * device/include/mcs51/c8051f120.h,
486         * device/include/mcs51/c8051f300.h,
487         * device/include/mcs51/c8051f310.h,
488         * device/include/mcs51/c8051f320.h,
489         * device/include/mcs51/c8051f330.h,
490         * device/include/mcs51/c8051f350.h,
491         * device/include/z180.h: Changed SDCC specific keywords to double
492         underlined form.
493
494 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
495
496         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
497         18F4455,
498         * (pic16_assignConfigWordValue): disable testing of configuration
499         register value with config mask,
500         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
501         function with port->fun_prefix,
502         * (genFunction): when generating a naked interrupt function never
503         create an absolute segment placed in interrupt vector address, place
504         the actual interrupt function at IVA instead, when an interrupt
505         function is generated with unspecified interrupt then do not create
506         the absolute section,
507         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
508         code for generating a call to generic pointer get/put function with
509         a call to function pic16_callGenericPointer(),
510         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
511         the call to the generic pointer get/put functions with prefixing the
512         function name with port->fun_prefix,
513         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
514         * src/pic16/main.c (_process_pragma): prefix function with
515         port->fun_prefix,
516         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
517         calling assembler, old 18Fxxxx macro is deprecated,
518         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
519         PC_ASMDIR in while condition,
520         * (findInstruction): add PC_ASMDIR in while condition,
521         * (buildCallTree): prefix main with port->fun_prefix,
522         * (pic16_pCode2str): fixed bug that didn't emit the memory access
523         identifier for variable with banked access in instructions BTFSS,
524         BTFSC, BCF, BSF, BTG
525         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
526         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
527         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
528         perform optimization when enviroment variable NO_REG_OPT is set,
529         * (insideLRBlock): NEW, return 1 if register is inside an
530         INF_LOCALREGS block,
531         * (RemoveRegFromLRBlock): remove a register that is completely
532         eliminated by register optimization, but it is still left in local
533         register store/restore in/from stack block,
534         * (Remove2pcodes): after removing register, check to see if it
535         should be removed from local register store/restore in/from stack
536         block,
537         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
538         DUMMY_READ_VOLATILE,
539
540         * device/include/pic16/adc.h: minor prototype modifications and
541         update,
542         * device/include/pic16/malloc.h: added GPL notice various
543         modifications,
544         * device/include/pic16/stdint.h: NEW, standard header for ints
545         * device/include/pic16/delay.h: NEW, header for delay functions,
546         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
547         delay1mtcy,
548         * device/include/pic16/signal.h: NEW, header providing helper macros
549         for implementing signal handlers,
550         * device/include/pic16/stdio.h: added prototypes for functions,
551         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
552         prototypes for stdin and stdout, added macro PUTCHAR to
553         automatically implement putchar function prototype,
554         * device/include/pic16/usart.h: modified and updated USART library,
555         * device/lib/pic16/libio/adc/,
556         * device/lib/pic16/libio/i2c: some modifications to improve library
557         performance,
558         * device/lib/pic16/libc/stdio/: modifications for the new printf*
559         family of functions,
560         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
561         family of functions and other sources,
562         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
563         of the PIC18Fxx[28] devices,
564         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
565         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
566         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
567         _do_cinit function, because the previous failed when local variables
568         where not placed in the same memory bank,
569         * device/lib/pic16/libsdcc/char/: various modifications to improve
570         library performance,
571         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
572         information on the new functions of the c library and more...
573
574 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
575
576         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
577
578 2005-03-26 Raphael Neider <rneider AT web.de>
579
580         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
581           if condition == CARRY)
582         * (genCmp): adapted to new genSkipc semantics
583         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
584           on rIfx (genCmp was broken)
585
586 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
587
588         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
589         * src/z80/main.c (_keywords[]),
590         * src/SDCCglobal.h (struct options),
591         * src/SDCC.y,
592         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
593         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
594         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
595         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
596         always available in leading double underscore form. The C99 support is
597         mostly missing, but it's a start.
598         * support/regression/tests/bug-227710.c: fixed nonconforming use of
599         reserved identifier "__data".
600
601 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
602
603         * src/mcs51/peeph.def: fixed bug 1170013
604
605 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
606
607         * device/include/mcs51reg.h: fixed bug 842007
608
609 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
610
611         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
612         last time.
613
614 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
615
616         * src/port.h (struct PORT),
617         * src/avr/ralloc.c (avr_assignRegisters),
618         * src/avr/main.c,
619         * src/ds390/ralloc.c (ds390_assignRegisters),
620         * src/ds390/main.c,
621         * src/hc08/ralloc.c (hc08_assignRegisters),
622         * src/hc08/main.c,
623         * src/mcs51/ralloc.c (mcs51_assignRegisters),
624         * src/mcs51/main.c,
625         * src/pic/ralloc.c (pic14_assignRegisters),
626         * src/pic/main.c,
627         * src/pic16/ralloc.c (pic16_assignRegisters),
628         * src/pic16/main.c,
629         * src/xa51/ralloc.c (xa51_assignRegisters),
630         * src/xa51/main.c,
631         * src/z80/ralloc.c (z80_assignRegisters),
632         * src/z80/ralloc.h,
633         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
634         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
635         * src/SDCCcse.h,
636         * src/SDCCdflow.c (computeDataFlow),
637         * src/SDCCdflow.h,
638         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
639         * src/SDCCloop.h,
640         * src/SDCCcflow.c (*),
641         * src/SDCCcflow.h,
642         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
643         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
644         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
645         immedDom() returning wrong block; probably fixes bug #1160833)
646
647 2005-03-20 Borut Razem <borut.razem AT siol.net>
648
649         * support/scripts/inc2h.pl: WIN32 port
650
651 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
652
653         * device/lib/makefile.in: added abs.c and labs.c
654
655 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
656
657         * device/include/stdint.h: added
658         * device/lib/abs.c: added
659         * device/lib/labs.c: added
660         * device/include/stdlib.h: added abs() and labs() prototypes
661         * device/lib/libsdcc.lib: added abs and labs
662         * device/include/float.h,
663         * device/lib/_fsmul.c,
664         * device/lib/printf_fast.c,
665         * device/lib/printf_tiny.c: updated comments
666
667 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
668
669         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
670         bug #1164313
671
672 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
673
674         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
675         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
676
677 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
678
679         * device/lib/printf_large.c: removed inline assembly for portability and
680           readability. Use printf_fast if speed or size are more important.
681         * src/pic16/gen.c: removed conditions around use of DEBUGpc
682         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
683
684 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
685
686         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
687         prevent compiler warning
688
689 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
690
691         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
692         moved to level 0 and declared as static. Also they are explicit
693         placed in access bank. This was necessery because some times they
694         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
695         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
696         optimizations. Currently only compare to unsigned char is implemented,
697         * src/pic16/gen.c: added fReturnIdx array,
698         * (struct resolvedIfx) is moved to gen.h and made public,
699         * (struct _G): added sregsAlloc and sregsAllocSet fields,
700         * (aopForSym): added an optimization to directly store in stack of
701         the operand of a SEND iCode,
702         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
703         but as registers instead (AOP_REG) using the fReturnIdx array,
704         * (pic16_freeAsmop): remove the freed register from the
705         _G.sregsAlloc field,
706         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
707         a compare of 'WREG',
708         * (pic16_popGetTempRegCond): changed function prototype, now
709         function takes also a bitVector argument v which holds the current
710         set of registers that are allocated for stack access by aopForSym,
711         registers allocated in aopForSym for accessing stack symbols are not
712         any more part of the functions usedRegs field,
713         * (genCall): some times aopOp is called for a stack variable to be
714         send, aopForSym might perform the push, if this is true make sure
715         that genCall doesn't push the variable twice by testing _G.resDirect,
716         * (genFunction): changed testing for unspecified interrupt number
717         from 256 to INTNO_UNSPEC,
718         * modified selection scheme of frame pointer generation. Previously
719         if function did use local registers a frame pointer was generated,
720         now a frame pointer is generated only if function has arguments
721         (that need PLUSW2 register access), or has stack arguments, or the
722         compiler is not instructed to omit the frame pointer,
723         * (genEndFunction): before restoring local registers that were saved
724         in the function preamble, also restore the registers that *might*
725         have been allocated for stack access,
726         * (genRet): removed some old comments,
727         * (genCmp, the active (RN's) version): added a call to the
728         pic16_genCmp_special function to perform the compare with a more
729         robust and optimized way,
730         * (genInline): a feature has been added in inline code generation,
731         which allows a wildcard variable substitution when writing inline
732         assembly. Code is incomplete and experimental therefore undocumented,
733         * (genCast): changed order of aopOp for result and right to allow
734         aopForSym to directly load the result if possible,
735         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
736         perform an optimized compare on some selected special occasions,
737         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
738         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
739         generate an IVT any more,
740         * src/pic16/main.c (pic16_optionsTable): added command line option
741         --optimize-cmp,
742         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
743         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
744         macros,
745         * src/pic16/NOTES: Raphael Neider added in list of active developers
746         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
747         jumptable_end to prevent bug #,
748         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
749         inCond and outCond fields,
750         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
751         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
752         turn off register spilling,
753         * (packRegsForOneUse): synced with other ports' versions although it
754         is not used currently,
755         * (pic16_packRegisters): added an optimization while reading
756         structure bitfields, some registers may be saved (malloc code is
757         decreased by 80 bytes)
758
759 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
760
761         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
762         left is a bitfield, if yes, then don't optimize assignment. Perhaps
763         this can be optimized more?
764
765 2005-03-10 Raphael Neider <rneider AT web.de>
766
767         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
768           genNearPointerGet): (hopefully) fixed access to bitfields via
769           pointers (p->bitN = x; and x = p->bitN; failed)
770
771 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
772
773         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
774
775 2005-03-09 Raphael Neider <rneider AT web.de>
776
777         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
778
779 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
780
781         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
782         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
783           (regTypeNum): set REG_BIT type if necessary
784         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
785         * support/regression/tests/critical.c: check bug 1144613
786
787 2005-03-02 Raphael Neider <rneider AT web.de>
788
789         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
790
791 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
792
793         * src/avr/ralloc.c (serialRegAssign),
794         * src/ds390/ralloc.c (serialRegAssign),
795         * src/hc08/ralloc.c (serialRegAssign),
796         * src/mcs51/ralloc.c (serialRegAssign),
797         * src/pic/ralloc.c (serialRegAssign),
798         * src/pic16/ralloc.c (serialRegAssign),
799         * src/xa51/ralloc.c (serialRegAssign),
800         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
801
802 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
803
804         * src/SDCCast.c (decorateType): fixed bug 1124787
805
806 2005-02-20 Hubert Sack <sack AT digiplan.de>
807         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
808
809         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
810         patch #1121755
811
812 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
813
814         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
815         to keep the correct label reference count when adding/removing references
816         to labels. A peephole file using this is appended to patch #1144962.
817
818 2005-02-14 Raphael Neider <rneider AT web.de>
819
820         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
821         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
822         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
823           retrievals of result operand's value on assignment
824
825 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
826
827         * device/include/pic16/string.h: modified prototype for memccpy()
828         to memccpy(void *, void *, char, size_t)
829         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
830         check whether to omit frame pointer or not,
831         * (genInline): convert all occurences of "\n" to LF in inline
832         assembler blocks, this helps formatting the inline text,
833         * (pic16_loadFSR0): modified prototype,
834         * (genNearPointerGet, genNearPointerSet): reorganization of code,
835         removed some 8051 legacy code,
836         * (genPackBits): enabled handling bitfields exceeding one byte in size,
837         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
838         before allocating temporary registers in functions,
839
840 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
841
842         * support/regression/tests/bitvars.c: corrected the "fix"
843
844 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
845
846         * support/regression/tests/bitvars.c,
847         * support/regression/tests/bitwise.c,
848         * support/regression/tests/rotate.c: "fixed" problems on Alpha
849
850 2005-02-10 Raphael Neider <rneider AT web.de>
851
852         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
853           different size for Alpha
854         * src/pic16/gen.c (genCmpEq) : improved compare with 0
855
856 2005-02-09 Raphael Neider <rneider AT web.de>
857
858         * src/SDCC.lex(doPragma) : save and restore warning options as well
859           (also added new stack plus clone- and copyAndFreeSDCCERRG())
860         * have #pragma less_pedantic set the errorlevel to WARNING
861           (fixes #1117001)
862         * (cloneOptimize) : fixed wrong malloc's size
863         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
864           facilitate correct handling of #pragma (save|restore)
865
866 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
867
868         * src/mcs51/gen.c: removed non-standard C nameless struct/union
869
870 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
871
872         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
873
874 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
875
876         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
877
878 2005-02-02 Raphael Neider <rneider AT web.de>
879
880         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
881         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
882         * (pic16_storeForReturn): fixed to allow returning function pointers
883         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
884         * device/include/pic16/{stddef.h,stdbool.h}: added
885
886 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
887
888         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
889
890 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
891
892         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
893         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
894          appeared to be required
895
896 2005-01-31 Borut Razem <borut.razem AT siol.net>
897
898         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
899           include/mcs51 and include/z80 directories to the package
900
901 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
902
903         * src/hc08/gen.c (genFunction): fixed bug #1112752
904
905 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
906
907         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
908
909 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
910
911         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
912
913 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
914
915         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
916
917 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
918
919         * device/include/c8051fxxx.h: removed these 6 files
920         * device/include/mcs51/c8051fxxx.h: added these 11 new files
921
922 2005-01-26 Raphael Neider <rneider AT web.de>
923
924         * src/pic16/gen.c (genAssign): fixed assignment from longs
925           in codespace (were cut to three bytes)
926         * (genDummyRead): implemented (except for CODESPACE...),
927           fixed bug #1108575
928         * src/pic16/glue.c (emitStatistics): beautified
929         * device/lib/pic16/libm/Makefile: added include path
930
931 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
932
933         * src/z80/gen.c (aopPut): fixed bug #1103902
934
935 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
936
937         * device/lib/expf.c: fixed bug #1095792
938
939 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
940
941         * device/lib/pic16/libm: added Math library sources
942
943 2005-01-24 Raphael Neider <rneider AT web.de>
944
945         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
946           to enable upcast to pCodeOpReg2 (there is no type tag to
947           differenciate the two and pic16_popGet2p cast into PCOR2)
948         * src/pic16/main.c (_process_pragma): fixed another malloc bug
949           (sizeof(sectNames) changed to sizeof(sectName))
950           Both patches fix segfaults under MinGW.
951
952 2005-01-23 Raphael Neider <rneider AT web.de>
953
954         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
955           Safe_[mc]?alloc()'ed variables
956         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
957           of (byte sized) temporaries (assign them to WREG for now)
958         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
959           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
960           this might fix SIGSEGVs on MinGW...
961         * src/SDCCopt.c (killDeadCode): restored original behaviour
962           (volatile operands might get thrown away though)
963
964 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
965
966         * src/pic16/gen.c: fixed bug #1106975,
967         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
968         pointer update, INTCON is saved, global interrupts are disabled and
969         restored after updateing TOS.
970         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
971         * added function attribute 'shadowregs' to take advantage of shadow
972         registers,
973         * added function attribute 'wparam' as an alternative to the wparam
974         pragma,
975         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
976         user declares a non-ISR function as 'shadowregs',
977         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
978
979 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
980
981         * .version: bumped version number to 2.4.8
982         * device/lib/pic16/pics.all: list of PIC18F devices supported by
983         pic16 port,
984         * device/lib/pic16/libio/i2c/: I2C module support library,
985         * device/include/pic16/i2c.h: I2C support library header,
986         * device/lib/pic16/libc/stdio/: standard IO support sources,
987         * (printf_small.c): printf_small() source, supports float print,
988         * (printf_tiny.c): printf_tiny() source, does not support floats,
989         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
990         enable global optimizations for entire library source, other
991         Makefiles in the source tree are also modified to reflect this,
992         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
993         function,
994         * doc/sdccman.lyx: updated to reflect new changes,
995         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
996         sym->onStack if-case,
997         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
998         sbit, idata, _idata, xdata, _xdata,
999         * added pragma library, to link an external library, (see doc),
1000         * removed command line options, --pomit-config-words, --pomit-ivt,
1001         --pleave-reset-vector,
1002         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
1003         when calling assembler to reflect memory model used, also define
1004         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
1005         reflect stack model used,
1006         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
1007         on stack return NULL,
1008
1009 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1010
1011         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
1012           of the operands is volatile. Fixes #1020220
1013
1014 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
1015
1016         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
1017         * (OptimizeRegUsage): make sure that there is really no other flow where
1018           the first pCode is used
1019
1020 2005-01-22 Raphael Neider <rneider AT web.de>
1021
1022         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
1023           to fix #1106967 (pCode->seq are not set up correctly)
1024
1025 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1026
1027         * src/SDCCglue.c (glue): make sure code area is declared before the
1028         static initialization area.
1029
1030 2005-01-21 Raphael Neider <rneider AT web.de>
1031
1032         * device/lib/Makefile.in: fixed test for pic16 install dir
1033         * device/lib/pic16/*/Makefile*: modified compile flags to enable
1034           optimizations
1035         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
1036           added --optimize-goto compiler switch and pragma wparam documentation
1037         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
1038         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
1039           and PRODH closing bug #1071770 (peephole optimizer)
1040
1041 2005-01-19 Raphael Neider <rneider AT web.de>
1042
1043         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
1044           cmdLine buffers (used when calling sdcpp...) are large enough
1045           (MAX_PATH=256 truncates arguments leading to system halts when
1046           used in MinGW...)
1047         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
1048         * (genUminus): rewritten to for efficiency
1049         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
1050           used uninitialized in some cases)
1051         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
1052           copy the third byte from the int -- now assumes 0x80 (data memory)
1053         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
1054           operands (genAddLit expects the iCode's operands to swapped as
1055           well), fixed leftover bytes (crashed for short left operands)
1056         * (pic16_genMinusDec): performance improvements, removed false
1057           PIC14 emitSKPNCs
1058         * (pic16_genMinus): fixed to cope with differently sized operands
1059         * src/pic16/glue.c (pic16_glue): added new banksel optimization
1060           for --obanksel > 1
1061         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
1062         * src/pic16/graph.[ch]: implementation of directed graphs, used by
1063           new banksel optimization
1064         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
1065           analysis for temporary registers (segfaults...)
1066         * src/pic16/peeph.def: added rule
1067
1068 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
1069
1070         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
1071         which converts a float number to its ASCII representation
1072         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
1073         functions to convert the fractional and integer part of a float to ASCII,
1074         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
1075         realloc.c): added _MALLOC_SPEC to explicit place variables in data
1076         ram
1077         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
1078         _STATMEM macros,
1079         * device/include/pic16/adc.h: added GPL info,
1080         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
1081         a pCodeOp as tested operand,
1082         * (genNearPointerGet): optimized bit testing, does not use
1083         intermediate register for bit value, test directly instead with
1084         BTFSS, BTFSC, works only for single bits,
1085         * (genpic16Code): dump the name of the iCode in the asm,
1086         * src/pic16/ralloc.c (decodeOp): removed static declaration and
1087         renamed to pic16_decodeOp,
1088         * (serialRegAssign): do not allocate a temporary register for iCode
1089         sequences that test a single bit for 1/0
1090
1091 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
1092
1093         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
1094         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
1095         access stack and frame pointers. They are initially assigned to
1096         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
1097         accessing SFRs. Updated all occurences of modification of stack or
1098         frame pointer in gen.c and pcode.c,
1099         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
1100         assigning of a literal value to pointers,
1101         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
1102         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
1103         selected
1104
1105 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
1106
1107         * doc/sdccman.lyx: update documentation about stack pragma, added
1108         some info for stack memory models
1109
1110 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1111
1112         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
1113
1114 2005-01-08 Raphael Neider <rneider AT web.de>
1115
1116         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
1117           udata sections to fix bug #1097823
1118
1119 2005-01-05 Raphael Neider <rneider AT web.de>
1120
1121         * src/pic16/gen.c (genGenericShift): added handling of differently
1122           sized left operand and result
1123
1124 2005-01-04 Raphael Neider <rneider AT web.de>
1125
1126         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
1127         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
1128           to hold the condition bit)
1129         * added new version of genCmp (old code available via #define)
1130         * added new version of genShiftLeft/genShiftRight in a generic
1131           way, now supports shifting by negative values
1132         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
1133           shiftCount (expected by genGenericShift)
1134         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
1135         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
1136           dump
1137         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
1138           is an invalid literal too...)
1139
1140 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
1141
1142         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
1143         from Raphael Neider,
1144         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
1145         for 8-bit literals. This fixes some literal operands which are sign
1146         extended to 16-bits ints when instruction needs only 8-bits.
1147
1148 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
1149
1150         * device/lib/logf.c: added mcs51 assembly version
1151         * device/lib/expf.c: added mcs51 assembly version
1152         * device/lib/_logexpf.c: new shared asm code for expf and logf
1153         * device/include/math.h: add defines for assembly math library
1154         * device/lib/Makefile.in: build new _logexpf.c
1155         * device/lib/libfloat.lib: use new _logexpf.c
1156
1157 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1158
1159         * src/pic/device.c
1160         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
1161           device types which have less than 0x7f registers.
1162
1163 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
1164
1165         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
1166
1167 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
1168
1169         * device/lib/printf_fast.c: only build on supported arch.
1170         * device/lib/printf_tiny.c: only build on supported arch.
1171         * device/lib/printf_fast_f.c: only build if asm float lib
1172         * device/lib/_fsget1arg.c: only build if asm float lib
1173         * device/lib/_fsget2args.c: only build if asm float lib
1174         * device/lib/_fsnormalize.c: only build if asm float lib
1175         * device/lib/_fsreturnval.c: only build if asm float lib
1176         * device/lib/_fsrshift.c: only build if asm float lib
1177         * device/lib/_fsswapargs.c: only build if asm float lib
1178         * device/include/stdio.h: don't provide print_fast,
1179           print_fast_f, print_tiny prototypes if --xstack used
1180
1181 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
1182
1183         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
1184         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
1185           to the SOURCES
1186
1187 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
1188
1189         * device/lib/printf_fast_f.c: same as printf_fast, but
1190           with floating point enabled
1191         * device/lib/printf_fast.c: minor tweaks
1192         * device/include/stdio.h: add printf_fast_f
1193
1194 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
1195
1196         * src/SDCCmain.c: make --float-reent default for mcs51
1197         * device/lib/_fsadd.c: added mcs51 assembly version
1198         * device/lib/_fssub.c: added mcs51 assembly version
1199         * device/lib/_fsmul.c: added mcs51 assembly version
1200         * device/lib/_fsdiv.c: added mcs51 assembly version
1201         * device/lib/_fseq.c: added mcs51 assembly version
1202         * device/lib/_fsneq.c: added mcs51 assembly version
1203         * device/lib/_fsgt.c: added mcs51 assembly version
1204         * device/lib/_fslt.c: added mcs51 assembly version
1205         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
1206         * device/lib/Makefile.in: add _fscmp to build
1207         * device/lib/libfloat.lib: add _fscmp to build
1208
1209 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
1210
1211         * device/lib/_fs2slong.c: added mcs51 assembly version
1212         * device/lib/_fs2sint.c: added mcs51 assembly version
1213         * device/lib/_fs2schar.c: added mcs51 assembly version
1214         * device/lib/_fs2ulong.c: added mcs51 assembly version
1215         * device/lib/_fs2uint.c: added mcs51 assembly version
1216         * device/lib/_fs2uchar.c: added mcs51 assembly version
1217         * device/lib/_slong2fs.c: added mcs51 assembly version
1218         * device/lib/_sint2fs.c: added mcs51 assembly version
1219         * device/lib/_schar2fs.c: added mcs51 assembly version
1220         * device/lib/_ulong2fs.c: added mcs51 assembly version
1221         * device/lib/_uint2fs.c: added mcs51 assembly version
1222         * device/lib/_uchar2fs.c: added mcs51 assembly version
1223         * device/include/float.h: added #define to select asm vs c
1224
1225 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
1226
1227         * device/lib/printf_fast.c: improvements to float output
1228         * device/include/float.h: add defines for assembly float library
1229         * device/lib/_fsget1arg.c: receive 1 float arg
1230         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
1231         * device/lib/_fsnormalize.c: normalize a float
1232         * device/lib/_fsreturnval.c: return float, various helper routines
1233         * device/lib/_fsrshift.c: right shift a float's mantissa
1234         * device/lib/_fsswapargs.c: swap 2 floats
1235         * device/lib/Makefile.in: build these 6 new files for mcs51
1236         * device/lib/libfloat.lib: add these 6 files to the library
1237
1238 2004-12-26 Borut Razem <borut.razem AT siol.net>
1239
1240         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
1241           built by gcc 3.4.2
1242
1243 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
1244
1245         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
1246           and fully reentrant and register bank neutral.
1247         * device/lib/printf_fast.c: added float (not enabled by default),
1248           added compact/slower integer (also not enabled by default),
1249           improved size/speed of fast integer code, other minor changes
1250         * device/include/stdio.h, device/lib/Makefile.in,
1251           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
1252
1253 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
1254
1255         * src/pic16/pcode.c: declaring variables other than at the start of a
1256           block is not supported in C by VC6.
1257
1258 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
1259
1260         * applied a previous patch from Raphael Neider that wasn't included
1261         in the previous commits, which fixes infinite loops within jumptable
1262         improvements,
1263         * made some fixes that previous patches introduced
1264
1265 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
1266
1267         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
1268         that fixes an issue with AOP_PCODE asmop's offset,
1269         * (pic16_popCopyReg): update instance field too,
1270         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
1271         function of pic port,
1272         * (genCmp, genAnd, genAssign),
1273         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
1274
1275 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
1276
1277         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
1278         variables initial values to idata section,
1279         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
1280         variables in some functions. This utilizes parmBytes field of iCode
1281         structure to hold the offset of the variable in stack. (might be
1282         able to use the stack field too?)
1283         * applied patch from Raphael Neider # ### , # ###
1284         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
1285         variable initial values in idata section,
1286         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
1287         for static variables with initial value
1288         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
1289         applied fix in while loop from Raphael Neider.
1290
1291 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
1292
1293         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
1294         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
1295         * src/ds390/ralloc.c (serialRegAssign): spill bits
1296         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
1297         * support/Util/SDCCerr.c,
1298         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
1299         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
1300         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
1301
1302 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
1303
1304         * device/include/sdcc-lib.h: inserted LGPL, added includes
1305           asm/ds390/features.h and asm/mcs51/features.h
1306         * device/include/asm/default/features.h,
1307         * device/include/asm/gbz80/features.h,
1308         * device/include/asm/z80/features.h: added empty _AUTOMEM
1309           and _STATMEM
1310         * device/include/asm/ds390/features.h,
1311         * device/include/asm/mcs51/features.h: added files with defines for
1312           _AUTOMEM and _STATMEM indicating automatic and static storage class
1313         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
1314         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
1315         * src/SDCCicode.c (geniCodeCast),
1316         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
1317         * src/SDCCloop.c (loopInduction): removed unused variable lr
1318         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
1319           to convertToFcall to include char modulo (RFE 1065037), added check
1320           if left operand is unsigned and use abs of literal value
1321         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
1322           as it doesn't work after conversion from peephole.def to peephole.rul
1323         * src/mcs51/gen.c (toBoolean): added check for size,
1324           (genModOneByte): optimized code for signed char modulo a literal
1325           power of 2 (thanks to Hubert Sack),
1326           (genRRC): removed unnecessary "clr c",
1327           (genRLC): replaced "add a,acc" with cheaper "rlc a"
1328         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
1329           jump optimization,
1330           swapped rules 256.c and 256.d,
1331           extended 256.d by using new multiple checks (thanks Erik),
1332           added rules 256.e and 256.f,
1333           updated rule 261.a and 261.b to new generated code
1334         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
1335
1336 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1337
1338         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
1339           induction related bugs, including first part of bug #1074377
1340
1341 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
1342
1343         * applied patch from bug-report #1076292,
1344         * applied patches for genAnd and Goto-optimizations for Raphael
1345         Neider,
1346         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
1347         dump a less iCode information,
1348         * src/pic16/device.h (pic16_options_t): added field debgen,
1349         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
1350         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
1351         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
1352         puclic,
1353         * (various functions): added macros FENTRY and FENTRY2 to functions,
1354         to emit function prologue,
1355         * (various functions): fixed indentation,
1356         * (genNearPointerGet): fixed loading of FSR0,
1357         * (genPackBits): applied patch from Raphael Neider to fix updating
1358         of FSR0 and touching only the modified bits,
1359         * src/pic16/genarith.c (various functions): added macros FENTRY to
1360         emit function prologue in comments,
1361         * src/pic16/pcode.h: added functions debugf2, debugf3,
1362         * src/pic16/ralloc.c: partial fix for packForPush caused
1363         segmentation fault,
1364
1365 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1366
1367         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
1368           <stsp AT users.sourceforge.net> with reversed byte order
1369         * support/regression/tests/rotate.c: added (ds390 skips some tests)
1370
1371 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1372
1373         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
1374           bug #1074377
1375         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
1376         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
1377
1378 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
1379
1380         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
1381
1382 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1383
1384         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
1385           conditions,
1386           (setFromConditionArgs): friendly operand parser for peephole rules,
1387           (operandBaseName, operandsNotRelated): new peephole condition
1388           "operandsNotRelated" -- similar to "operandsNotSame", but takes
1389           architecture specific register naming into account, handles n-way
1390           comparisons, and supports quoted literals
1391         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
1392
1393 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1394
1395         * src/mcs51/peeph.def: fixed bug #1076940
1396
1397 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
1398
1399         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
1400
1401 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1402
1403         Adding support for replacing ljmps with sjmps in jumptables
1404         generated for switch statements. For now you need to set the
1405         environment variable SDCC_SJMP_JUMPTABLE to enable this.
1406         Now 4 algorithms for mcs51 jumptable generation are used:
1407         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
1408         addresses loaded pc-relative for up to 112 cases and stack-pushing
1409         target addresses loaded with offset from dptr for up to 256 cases.
1410
1411         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
1412         * src/mcs51/main.c: adapted constants for switch table generation
1413         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
1414
1415 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
1416
1417         * device/lib/printf_large.c (_print_format): fixed bug 1073386
1418         * support/regression/tests/bug1057979.c: added test for bug 1073386
1419
1420 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
1421
1422         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
1423         compilers
1424
1425 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
1426
1427         * src/pic16/device.h,
1428         * src/pic16/genarith.c,
1429         * src/pic16/glue.c,
1430         * src/pic16/main.c,
1431         * src/pic16/pcode.c: applied patches #1068154 and #1070213
1432
1433 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
1434
1435         Large cummulative patch for pic16 port.
1436         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
1437         to call when a stack overflow occurs,
1438         * (malloc.h): added CVS Id tag,
1439         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
1440         variable,
1441         * added libc directory. The current version of LibC contains string
1442         functions, ctype functions and macros and some functions of the
1443         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
1444         be extensively tested in the future. Standard disclaimer here.
1445         Library is not automatically build yet. But one can build it by
1446         invoking 'make' inside the libc directory.
1447         * added ADC library under libio. Preliminary version yet.
1448
1449         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
1450         * src/pic16/gen.c (aopForRemat): asmop size is filled by
1451         aopForRemat() now and not by pic16_aopOp(),
1452         * (pic16_popGetTempReg): removed warning messgae when allocating
1453         temporary registers, its a buggy feature and will be removed,
1454         * (pic16_popGet): set register instance field in AOP_CRY,
1455         * (pic16_outBitC): fixed for results in size greater than 1,
1456         * (genUminusFloat): fixed for pic16, ported code from mcs51,
1457         * (pic16_storeForReturn): optimized return of 0,
1458         * (genCmp): experimental code for new genCmp which uses PIC18's
1459         special compare&skip instructions. Initial tests fail some times
1460         with variables grater than 1 byte in size, so new code is disabled,
1461         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
1462         a single bit,
1463         * (genCast): began a fix to optimize the casting of a bit to another
1464         bit, now assigning a bitfield to another bitfield will fail, sorry,
1465         * src/pic16/main.c: disabled the use of lr-support feature,
1466         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
1467         * added some function prototypes, added function _debugf prototype,
1468         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
1469         bits with offset (case PO_GPR_BIT),
1470         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
1471         command line,
1472         * (isBankInstruction): modified to return 0 for no banking instruction,
1473         and 1 for banking instruction,
1474         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
1475         caused stop processing pCodes after a inline assembly block,
1476         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
1477         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
1478         registers when it shouldn't,
1479         * src/pic16/ralloc.c (allocReg): add preliminary support for
1480         supporting a limited set of temporary registers,
1481
1482 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1483
1484         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
1485           genDataPointerSet): ensure assignments always copy in MSB to LSB
1486           order,
1487           (loadRegFromAop): recognize CLRH optimization,
1488           (genFunction): optimize RECEIVE iCodes in reentrant functions
1489
1490 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1491
1492         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
1493           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
1494           selected.
1495         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
1496         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
1497           contiguous with data
1498
1499 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1500
1501         * device/lib/_gptrget.c (_gptrget),
1502         * device/lib/_gptrgetc.c (_gptrgetc),
1503         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
1504           instead of sjmp to ret
1505         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
1506           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
1507
1508 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
1509
1510         * .version: bumped version to 2.4.7
1511         * device/lib/_gptrget.c (_gptrget): is now _naked
1512         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
1513         * device/lib/_gptrput.c (_gptrput): is now _naked
1514         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
1515           (createFunction): fixed xstack
1516         * src/SDCCglue.c (emitMaps): set allocation required for bit area
1517         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
1518           or bit either,
1519           (geniCodeCritical): store original interrupt state in an iTemp bit
1520           var unless stack-auto
1521         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
1522         * src/SDCCmain.c (setIncludePath): added include/target to search path
1523         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
1524         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
1525           prototype,
1526           (processFuncArgs): put bit vars in bit area
1527         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
1528           unsaveRBank): fixed xstack,
1529           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
1530           (genFunction, genEndFunction): fixed xstack,
1531           (genAssign): optimization don't walk backwards through mem
1532         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
1533         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
1534         * support/regression/Makefile: also make library (for stack-auto) when
1535           making "all" and added "test-mcs51-xstack-auto"
1536         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
1537         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
1538         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
1539         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
1540         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
1541           make-library by MAKE_LIBRARY
1542         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
1543           regression tests for xstack
1544         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
1545         * support/regression/tests/critical.c: test for critical on mcs51
1546
1547 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1548
1549         * support/regression/ports/ucz80/spec.mk: use include and lib files from
1550           built version of sdcc instead of installed version
1551
1552 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1553
1554         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
1555         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
1556           vprintf.c now
1557         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
1558         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
1559           WARNING: remove device/lib/build/z80/printf.o by hand when
1560           updating from previous build!
1561         * device/lib/z80/printf.c: updated comment
1562         * support/regression/tests/bug1057979.c: test all ports now
1563         * support/regression/tests/bug1065458.c: file added
1564
1565 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1566
1567         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
1568           *_start and *_end symbols for static functions
1569
1570 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
1571
1572         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
1573           and search crt0.o in all library paths,
1574           (setIncludePath): proper handling of --nostdinc,
1575           (setLibPath): proper handling of --nostdlib
1576         * support/regression/Makefile,
1577         * support/regression/ports/ds390/spec.mk,
1578         * support/regression/ports/gbz80/spec.mk,
1579         * support/regression/ports/hc08/spec.mk,
1580         * support/regression/ports/mcs51/spec.mk,
1581         * support/regression/ports/mcs51-large/spec.mk,
1582         * support/regression/ports/mcs51-stack-auto/spec.mk,
1583         * support/regression/ports/z80/spec.mk: use include and lib files from
1584           built version of sdcc instead of installed version
1585         * doc/sdccman.lyx: fixed typo in --nostdinc
1586
1587 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
1588
1589         * src/pic/pcode.c,
1590         * src/pic/device.c,
1591         * src/pic/ralloc.c,
1592         * src/pic/gen.c : added support to generate code for struct bit fields.
1593
1594 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
1595
1596         * as/xa51/xa_version.h,
1597         * device/include/errno.h,
1598         * device/include/regc515c.h,
1599         * device/lib/_itoa.c,
1600         * device/lib/_ltoa.c,
1601         * device/lib/ser_ir_cts_rts.c,
1602         * sim/ucsim/xa.src/glob.cc,
1603         * sim/ucsim/xa.src/inst_gen.cc,
1604         * sim/ucsim/xa.src/xa_bit.cc,
1605         * sim/ucsim/xa.src/xa_sfr.cc,
1606         * sim/ucsim/z80.src/inst_dd.cc,
1607         * sim/ucsim/z80.src/inst_fdcb.cc,
1608         * support/scripts/keil2sdcc.pl,
1609         * src/pic16/pic16.dsp,
1610         * src/pic16/pic16a.dsp: corrected cvs line endings
1611         * device/lib/printf_large.c: fixed bug 1057979
1612         * src/pic16/gen.c: fixed non-C standard code
1613         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
1614         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
1615         * support/regression/ports/mcs51/support.c: reload T1 asap
1616         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
1617           pdata use and clear idata startup behaviour
1618         * support/regression/tests/bug1057979.c: added
1619
1620 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
1621
1622         * device/examples/ds390/ow390/ad26.h,
1623         * device/examples/ds390/ow390/cnt1d.h,
1624         * device/examples/ds390/ow390/crcutil.c,
1625         * device/examples/ds390/ow390/ownet.h,
1626         * device/examples/ds390/ow390/owsesu.c,
1627         * device/examples/ds390/ow390/swt12.h,
1628         * device/examples/ds390/ow390/swtoper.c,
1629         * device/examples/ds390/ow390/temp10.h,
1630         * device/examples/ds390/ow390/thermodl.c,
1631         * device/examples/ds390/tinitalk/tinitalk.dsp,
1632         * device/examples/ds390/tinitalk/tinitalk.dsw,
1633         * device/examples/mcs51/clock/hw.h,
1634         * device/examples/mcs51/simple2/go.bat,
1635         * device/examples/serialcomm/windows/serial.h,
1636         * device/examples/xa51/dummy.c,
1637         * device/examples/xa51/hello.c,
1638         * device/include/80c51xa.h,
1639         * device/include/at89x051.h: corrected cvs line endings
1640
1641 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
1642
1643         * src/pic16/main.c (options): added command line --gstack, to trace
1644         stack over/under flows,
1645         * added pragma 'wparam' to allow passing first byte of function
1646         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
1647         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
1648         call to __gstack_test function and sets up the symbol as extern,
1649         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
1650         * popaop): added call to pic16_testStackOverflow,
1651         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
1652         wparamList list,
1653         * (genCall, genPcall): now all parameters are passed via stack
1654         except in functions that are pass to wparam pragma in which WREG is
1655         used too,
1656         * (genPcall): REENTRANT flag is checked to see if variable prototype
1657         contains reentrant keyword, don't call a non-reentrant function, via
1658         a reentrant function pointer or vice versa, functions are never
1659         passed via WREG,
1660         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
1661         D.Winkler,
1662         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
1663         SIGSEGV when accessing a NULL register stucture,
1664         * (pic16_printGPointerType): modified to handle UPPER modifier for
1665         function initializers, changed prototype of function to simpler one,
1666         * (pic16_printIvalFuncPtr): check to see if function is already
1667         added in externs list,
1668         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
1669         optimized a move from W to SFR with a move to the same register
1670         later after a CALL,
1671         * device/lib/pic16/debug: NEW directory, contains debug features
1672         which are enabled when linking with libdebug.lib, currently command
1673         line option --gstack enables stack pointer tracing for over/under
1674         flow, corresponding sources are in debug/gstack
1675
1676 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
1677
1678         * doc/sdccman.lyx: updated SDCC version,
1679         * (PIC16 port): update list of command line options,
1680         * src/pic16/device.h (structure pic16_options_t): added field gstack
1681         to enable stack overflow tracing on push/pops,
1682         * src/pic16/device.c (statistics structure): added statistics
1683         structure,
1684         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
1685         pic16_dump_int_registers): increase statistics counters for each
1686         * variable which is encountered
1687         * (pic16_dump_usection): emit each .udata variable to its own udata
1688         section,
1689         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
1690         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
1691         parameters via stack, otherwise use old scheme,
1692         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
1693         assembler output file,
1694         * src/pic16/main.c: added command line options --gstack to enable
1695         push/pop tracing for stack overflow,
1696         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
1697         instructions): added size of each instruction,
1698         * (pic16_countInstruction): estimate size of instructions in
1699         the_pFile list, inline assembly blocks are not counted,
1700         * (pic16_FixRegisterBanking): trace previous register usage, when
1701         banksel optimizations is greater than 0, don't emit a redudant
1702         banksel directive,
1703
1704 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
1705
1706         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
1707         * src/pic16/ralloc.c : applied same fix for pic16.
1708         * src/pic/gen.c : tidied it up a little.
1709
1710 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1711
1712         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
1713         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
1714
1715 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1716
1717         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
1718
1719 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1720
1721         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
1722         non-reentrant function __modsint in the interrupt function (thus
1723         corrupting math operations during serial I/O)
1724         * device/lib/ser_ir.c: as above, changed buffersize
1725         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
1726         256.c,d for zeroing
1727         * doc/Makefile: added option -t for rsync
1728
1729 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1730
1731         * src/SDCCast.h (struct ast),
1732         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
1733
1734 2004-10-20 Borut Razem <borut.razem AT siol.net>
1735
1736         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
1737         package
1738
1739 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
1740
1741         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
1742         makefile targets,
1743         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
1744         support functions to replace long sequences of MOVFF's from access
1745         bank registers to stack and vice versa,
1746         * src/pic16/device.h: added new field opt_flags, where optimization
1747         flags can be set to enable certain features,
1748         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
1749         * pBlock, (genFunction, genEndFunction): surroung loop for
1750         saving/loading used registers in stack with PC_INFO pCodes,
1751         INF_LREGS. Code in between can then be optimized by pCode optimizer
1752         to support function calls,
1753         * (genDataPointerSet): fixed bug which loaded float fields in
1754         structures with corrupt data,
1755         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
1756         in a standard way debug info on stderr. Feature used for developing
1757         and debugging only,
1758         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
1759         obsolete chunks of code,
1760         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
1761         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
1762         * pic16/src/pcode.c (pic16_newpCodeInfo,
1763         * (pic16_newpCodeOpLocalRegs),
1764         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
1765         feature,
1766         * (pic16_pCodeConstString): printing of the initial value of a
1767         symbol as a comment is inhibited since parsing was already done by
1768         copyStr and output is corrupt,
1769         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
1770
1771 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1772
1773         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
1774
1775 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
1776
1777         * as/mcs51/lkarea.c: removed old K&R style,
1778           (lnksect): changed check on boundary error,
1779           (lnksect2): changed check on boundary error,
1780           (lnksect2): extend XSTK to end of page if size = 1
1781         * as/mcs51/lkmain.c: removed old K&R style,
1782           (Areas51): create l_IRAM symbol
1783         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
1784         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
1785           model-mcs51-stack-auto, added model-mcs51-xstack-auto
1786         * device/lib/_mullong.c: added version to be compiled with xstack
1787         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
1788         * device/lib/mcs51/crtxclear.asm: clear pdata as well
1789         * device/lib/mcs51/crtxstack.asm: fixed comment
1790         * src/SDCCglue.c: maxInterrupts defaults to 0,
1791           (emitMaps): added pdata,
1792           (createInterruptVect): (re)moved default,
1793           (glue): added pdata,
1794           (glue): moved __start__xstack to XSTK with default size 1
1795         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
1796           and options.float_rent when options.stackAuto is set,
1797           (linkEdit): only write XDATA_NAME if provided on command line
1798         * src/SDCCmem.h,
1799         * src/SDCCmem.c: added pdata
1800         * src/port.h: added pdata_name to PORT
1801         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
1802           (saveRegisters, unsaveRegisters): removed usage of B,
1803           (genMinus): fixed accumulator clash,
1804           (genJumpTab): added comment, this needs another look
1805         * src/mcs51/gen.c: added check for "B in use" paranoia,
1806           added pushB() and popB()
1807         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
1808           chance
1809         * src/avr/main.c,
1810         * src/ds390/main.c,
1811         * src/hc08/main.c,
1812         * src/mcs51/main.c,
1813         * src/pic/main.c,
1814         * src/pic16/main.c,
1815         * src/xa51/main.c,
1816         * src/z80/main.c: (reset_regparms) made void parameter explicit and
1817           added PSEG (PAG,XDATA) or NULL to port specifier
1818         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
1819         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
1820           (_mcs51_genInitStartup): removed __start__xstack equ,
1821           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
1822         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
1823         * src/z80/gen.c (_rleAppend): fixed warnings
1824         * support/regression/tests/zeropad.c: added pdata test
1825         * .version: bumped to 2.4.6
1826
1827 2004-10-17 Borut Razem <borut.razem AT siol.net>
1828
1829         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
1830         as a part of nightly build
1831
1832 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
1833
1834         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
1835         WREG holds the first byte function parameters,
1836         * (aopForSym): take special case for symbols which are in FARSPACE
1837         but in CODESPACE too,
1838         * (assignResultValue): modified to take into account _G.useWreg,
1839         * (genCall): don't use wreg for parameter passing when function is
1840         declared as reentrant, too, added optimization INCF to stack
1841         pointer when stack parameter count is 1,
1842         * (genFunction, genEndFunction): refurnished and fixed to not using
1843         wreg for passing parameters when function has varargs or is
1844         reentrant, fixed bug with symbol name compare for generating
1845         functions in absolute address,
1846         * (pic16_storeForReturn): refurnished,
1847         * (genCmp): began writing a new version of the function, not ready
1848         yet, therefore it is disabled,
1849         * (genAssign): do not read code memory when assigning a function to
1850         a pointer function,
1851         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
1852         array of characters, not pointer,
1853         * (pic16initialComments): in debug mode emit an .ident directive for
1854         the assembler,
1855         * (_process_pragma): emit a new warning type (internal to pic16)
1856         when setting stack to default length, emit a similar warning when
1857         placing a function at absolute address and address is not word aligned
1858         * (_pic16_parseOptions): added 'return TRUE' statement,
1859         * (_pic16_linkEdit): if compiling a source, then add the source's
1860         file object, first in the list of objects to link,
1861
1862 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
1863
1864         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
1865         * src/pic/main.c : removed VC warning.
1866         * src/pic/gen.c : changed comment.
1867
1868 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
1869
1870         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
1871         reference to a deprecated symbol _GPTRREG was causing failure to
1872         link. Thanks G. M. Gallant for the info.
1873
1874 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
1875
1876         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
1877         comments for Bugs item #954788.
1878
1879 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
1880
1881         * src/pic16/device.c (pic16_dump_gsection,
1882         * pic16_groupRegistersInSection): handle symbols declared to be in
1883         access bank differently,
1884         * src/pic16/gen.c (struct _G): added field resDirect,
1885         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
1886         send values read from stack directly to result and don't allocate
1887         temporary values,
1888         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
1889         same registers,
1890         * (pic16_sameRegsOfs): NEW,
1891         * (freeAsmop): if _G.resDirect is set then do not mark registers as
1892         free because they were not allocated from temporary pool,
1893         * pic16_popRegFromString): workaround to fix a problem with
1894         allocating variables twice or never,
1895         * (genGenPointerGet): using PRODL instead of FSR0H,
1896         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
1897         instead of FSR0H,
1898         * (genAssign): take advantage of the _G.resDirect flag,
1899         * (genCast): around line 11844, use mov2f instead of directly
1900         MOVFF'ing between operands to account for literal values,
1901         * src/pic16/genutils.c: some new debug functions for gpsim have been
1902         added,
1903         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
1904         float with integer part only,
1905         * src/pic16/main.c (_process_pragma): handle pragma udata access to
1906         place variables in access bank
1907         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
1908         updated sources to reflect recent changes in gen.c
1909
1910 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
1911
1912         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
1913         sources that searched for headers in installation path, now the
1914         device/include/pic16 is used,
1915         * src/pic16/glue.c (pic16glue),
1916         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
1917         .line directives if not in debug mode, this suppresses assembler's
1918         warnings for ignored directives
1919
1920 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
1921
1922         * src/port.h: made reset_regparms prototype void parameter explicit.
1923         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
1924         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
1925         * doc/sdccman.lyx: documented warning disabling and how to use
1926           printf_large to make it print floats.
1927         * device/include/stdbool.h: NEW
1928         * device/lib/_atof.c,
1929         * device/lib/_divuint.c,
1930         * device/lib/_divulong.c,
1931         * device/lib/expf.c,
1932         * device/lib/printf_large.c,
1933         * device/lib/sincosf.c,
1934         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
1935         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
1936           a completely reentrant lib.
1937
1938 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
1939
1940         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
1941         * device/include/pic16/stdio.h: fixed bug with colon
1942
1943 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
1944
1945         * device/include/pic16/stdio.h,
1946         * device/include/pic16/stdlib.h,
1947         * device/include/pic16/math.h: NEW
1948         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
1949         declared as _naked to reduce overhead
1950         * device/lib/Makefile.in (target port-specific-objects-pic16):
1951         changed * to *.* so to ignore the CVS directory,
1952         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
1953         stacked variables back in stack,
1954         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
1955         corruption
1956
1957 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
1958
1959         * .version: bumped version number to 2.4.5
1960         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
1961         * support/Util/SDCCerr.c (messages structure): added entry for
1962         W_POSSBUG2
1963
1964         Large cumulative patch for pic16 port and libraries.
1965         * device/include/pic16/sdcc-lib.h,
1966         * device/include/pic16/stdarg.h,
1967         * device/include/asm/pic16/features.h,
1968         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
1969         * device/include/pic16/float.h: changes reentrant keyword with
1970         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
1971         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
1972         updated target build-libraries to include objects from gptr,
1973         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
1974         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
1975         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
1976         all function headings,
1977         * src/SDCCmain.c: added global parameter userIncDirsSet,
1978         * (parseCmdLine): when option -I is encountered add directory to
1979         userIncDirsSet too,
1980         * src/version.awk: added space between control and long,
1981         * src/pic16/NOTES: added some notes for the port,
1982         * src/pic16/gen.c: added prototype for mov2fp function,
1983         * (fReturnpic16[]): properly named return value registers,
1984         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
1985         * (aopForSym): added code to handle symbols with onStack flag set,
1986         symbols onStack are allocated PTRSIZE bytes,
1987         * (aopFreeAsmop): handles special case where asmops are stack objects,
1988         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
1989         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
1990         added argument lock to trace flaws in allocating temporary registers
1991         when developing port,
1992         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
1993         * (pic16_popRegFromString): reenabled allocating a direct register
1994         from string,
1995         * (assignResultValue): various beautifications,
1996         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
1997         referenced function argument,
1998         * (genIpush): reenabled to allow stacked arguments, handles only
1999         ic->parmPush iCodes,
2000         * (genCall, genPcall): major changes to allow for variable argument
2001         functions, fixed a bug with falsely restoring stack pointer after
2002         returning from call,
2003         * (genFunction): pending code for critical function,
2004         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
2005         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
2006         * (genNearPointerGet): fixed bug with indirect reading, was always
2007         reading from INDF0
2008         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
2009         pointers,
2010         * (genAddrOf): rewrote code to take address of a stacked function parameter
2011         * (genCast): fixed casting to generic pointer type,
2012         * src/pic16/gen.h: added AOP_STA,
2013         * (struct asmop): added field stk,
2014         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
2015         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
2016         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
2017         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
2018         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
2019         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
2020         generic pointers,
2021         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
2022         and library paths,
2023         * (pic16_port structure): generic pointer size is set to 3,
2024         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
2025         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
2026         compiler warning,
2027         * src/pic16/ralloc.c (allocReg): prevent allocating register when
2028         operand is an iTemp,
2029
2030 2004-09-24 Martin Helmling <mh AT octo-soft.de>
2031
2032         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
2033         * debugger/mcs51/simi.c: addapt new syntax of s51
2034
2035 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
2036
2037         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
2038         * src/pic16/pcode.c: commented out some calls to free() in order to
2039         fix bug #989576,
2040
2041 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2042
2043         * src/SDCCicode.h,
2044         * src/SDCCicode.c (isiCodeInFunctionCall),
2045         * src/avr/ralloc.c (selectSpil),
2046         * src/pic/ralloc.c (selectSpil),
2047         * src/pic16/ralloc.c (selectSpil),
2048         * src/ds390/ralloc.c (selectSpil),
2049         * src/hc08/ralloc.c (selectSpil),
2050         * src/xa51/ralloc.c (selectSpil),
2051         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
2052         stack in the middle of a function call sequence (fixes bug #1020268)
2053         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
2054         costs associated with the minimum switch case.
2055
2056 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2057
2058         * src/SDCC.lex: fixed bug #1030549
2059
2060 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2061
2062         * src/SDCCcse.h (struct cseDef),
2063         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
2064         over a function call if the CSE is derived from a symbol whose
2065         address has been taken (fixes bug #1029883)
2066         * support/regression/tests/bug-1029883: a new regression test for
2067         this bug
2068
2069 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2070
2071         * src/hc08/gen.c (emitinline): fixed bug #1029778
2072         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
2073         to a cast object is no longer a syntax error ("fixes" bug #1030006,
2074         and starts toward RFE #905167)
2075
2076 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
2077
2078         * src/pic16/gen.c (mov2f): New function to move an operand to
2079         another without considering if it is a literal or a register,
2080         * (pic16_sameRegs): don't check if they are both AOP_REG,
2081         * (AccRsh): removed andmask=0 lines,
2082         * (genLeftShift): duplicated to be improved in future versions,
2083         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
2084         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
2085         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
2086         * (pic16initMnemonics): added initialization for POC_INFSNZW,
2087         * (insertBankSwitch): fixed inserting banksel directives algorithm
2088         for instructions that follow a skip instruction, this fixes a report
2089         for broken subtraction code generation,
2090         * src/pic16/ralloc.c (deassignLRs): do not free register if current
2091         iCode is a left op, just in case result and right share the same
2092         registers
2093
2094 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2095
2096         * src/hc08/main.c,
2097         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
2098         preservation of HX
2099         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
2100         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
2101         on 2004-09-12; it was buggy
2102
2103 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
2104
2105         * src/SDCCsymt.h: removed RESULT_CHECK
2106         * src/SDCCast.c,
2107         * src/SDCCglue.c,
2108         * src/SDCCval.c,
2109         * src/pic/glue.c,
2110         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
2111
2112 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
2113
2114         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
2115         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
2116         configuration values no more rejected by compiler, they are assigned
2117         to configuration registers with a warning message instead,
2118         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
2119         the for-loop so last conf register is emitted too,
2120         * (_pic16_initPaths): link library libsdcc.lib by default,
2121         * (_hasNativeMulFor): modified test for multiplication according to
2122         Raphael Neider's remarks. Integer multiplication is also done with
2123         support functions,
2124         * device/include/pic16/pic18fregs.h: corrected type error in while
2125         testing and including 18f6720 header file
2126
2127 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
2128
2129         * src/pic16/device.h (pic16_options): removed field use_crt,
2130         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
2131         until an optimization to handle single bits is added,
2132         * (pic16_loadFSR0): moved before genUnpackBits,
2133         * (genAnd): some white lines removed,
2134         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
2135         leave_reset flags in pic16_options when using crt modules,
2136
2137 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
2138
2139         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
2140           for bugs 898889 & 979599. Also used some safer print instructions.
2141
2142 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
2143
2144         * src/pic16/device.h (pic16_options_t): added field use_crt,
2145         crt_name, no_crt,
2146         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
2147         catch a probable future bug,
2148         * src/pic16/gen.c: aopIdx function commented out,
2149         * (genAssign): commented out old code which used aopIdx,
2150         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
2151         code, added if conditionals to take into account the --use-crt
2152         command line options,
2153         * src/pic16/main.c (pic16_optionsTable): added new command line
2154         options, --use-crt= and --no-crt,
2155         * (_pic16_linkEdit): now the proper crt object is added in the
2156         linker command line except than when --no-crt is specified,
2157         * src/pic16/pcode.c,
2158         * src/pic16/pcode.h: added some structures and functions for a new
2159         optimization scheme to compansate for instruction overhead between
2160         same iCodes, this scheme is currently under development and is not
2161         working in any way,
2162         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
2163         to && operator,
2164         * device/lib/pic16/startup/crt0i.c,
2165         * device/lib/pic16/startup/crt0iz.c: added global char variable
2166         __uflags to force the generation of an idata section
2167
2168 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
2169
2170         * doc/Makefile,
2171         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
2172         * doc/sdccman.lyx: updated sdcc version to 2.4.4
2173
2174 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2175
2176         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
2177         Frieder) and clarified the default code optimization mode
2178
2179 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2180
2181         * src/SDCC.lex (doPragma, process_pragma),
2182         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
2183         "opt_code_size", and "opt_code_balanced"
2184         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
2185         regrouped options by category, added support for category headers
2186         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
2187         and "--opt-code-size"
2188         * doc/sdccman.lyx: documented these new options and pragmas
2189         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
2190         preference into account
2191
2192 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2193
2194         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
2195           geniCodePreDec): Fixed bug 904237 by generating a warning
2196         * src/SDCCerr.h,
2197         * src/SDCCerr.c: added warning W_SIZEOF_VOID
2198
2199 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
2200
2201         * src/pic/device.c : When no max ram set validate full memory range.
2202         * src/pic/pcode.c,
2203         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
2204
2205 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
2206
2207         * device/lib/_gptrget.c,
2208         * device/lib/_gptrput.c: updated comment
2209         * device/lib/calloc.c,
2210         * device/lib/free.c,
2211         * device/lib/malloc.c,
2212         * device/lib/realloc.c: added LGPL, made them reentrant-safe
2213         * src/SDCCcse.c (cseBBlock),
2214         * src/SDCCicode.c (printOperand, geniCodeArray),
2215         * src/SDCCicode.h (struct operand): fixed bug 868103
2216         * support/regression/tests/bug-868103.c: added
2217         * src/SDCCast.c (searchLitOp),
2218         * src/SDCCcse.h (struct cseDef),
2219         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
2220         * src/SDCCicode.h (struct operand),
2221         * src/SDCCsymt.h (struct sym_link),
2222         * src/avr/gen.c (hasInc),
2223         * src/ds390/gen.c (hasInc),
2224         * src/hc08/gen.c (genPlusIncr, hasInc),
2225         * src/mcs51/gen.c (hasInc),
2226         * src/pic16/glue.c (pic16_printIvalChar),
2227         * src/pic16/ralloc.c (regWithIdx),
2228         * src/xa51/gen.c (hasInc) : removed warnings
2229         * src/SDCCast.c (createBlock): added comment ???
2230         * src/hc08/ralloc.c: updated comments
2231
2232 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2233
2234         * doc/sdccman.lyx: updated section on switch statements, added
2235         section about semaphore locking
2236         * doc/Makefile: added option -info for latex2html
2237         * device/lib/_gptrget.c,
2238         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
2239
2240 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
2241
2242         * src/pic/device.h,
2243         * src/pic/device.c,
2244         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
2245          maxram is less than 0x100.
2246
2247 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
2248
2249         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
2250
2251 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2252
2253         * src/port.h,
2254         * src/mcs51/main.c,
2255         * src/ds390/main.c,
2256         * src/z80/main.c,
2257         * src/hc08/main.c,
2258         * src/pic/main.c,
2259         * src/pic16/main.c,
2260         * src/avr/main.c,
2261         * src/xa51/main.c
2262         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
2263         a jump table is the best form for a switch statement, including
2264         automatic insertion of missing cases to make the case range
2265         continuous. Developed in collaboration with Frieder Ferlemann.
2266
2267 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2268
2269         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
2270         accumulator result if it needs sign extension
2271
2272 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2273
2274         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
2275
2276 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2277
2278         * device/lib/gbz80/printf.c,
2279         * device/lib/z80/printf.c: removed define for NULL
2280
2281 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
2282
2283         * as/xa51/xa_link.c,
2284         * device/examples/ds390/ow390/ad26.c,
2285         * device/examples/ds390/ow390/cnt1d.c,
2286         * device/examples/ds390/ow390/counter.c,
2287         * device/examples/ds390/ow390/ds2480.h,
2288         * device/examples/ds390/ow390/ds2480ut.c,
2289         * device/examples/ds390/ow390/findtype.c,
2290         * device/examples/ds390/ow390/gethumd.c,
2291         * device/examples/ds390/ow390/owllu.c,
2292         * device/examples/ds390/ow390/ownetu.c,
2293         * device/examples/ds390/ow390/swt12.c,
2294         * device/examples/ds390/ow390/swtloop.c,
2295         * device/examples/ds390/ow390/temp.c,
2296         * device/examples/ds390/ow390/temp10.c,
2297         * device/examples/ds390/ow390/thermo21.c,
2298         * device/examples/ds390/ow390/tinilnk.c,
2299         * device/examples/ds390/ow390/tstfind.c,
2300         * device/examples/serialcomm/windows/serial.cpp,
2301         * device/examples/serialcomm/windows/test_serialcomm.cpp,
2302         * device/include/reg51.h: fixed line endings for cvs
2303
2304 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2305
2306         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
2307         packRegsForAccUse, packRegisters): new accumulator register
2308         packing algorithm
2309         * support/regression/ports/hc08/support.c (_putchar): suppress
2310         warning of unused variable
2311         * src/SDCCicode.c: added SWAP entry to codeTable
2312
2313 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
2314
2315         * device/lib/sprintf.c: forgot to add this file before previous commit
2316
2317 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
2318
2319         * src/pic16/gen.c (genPackBits): added operand right in function
2320         parameters, load result directly if p_type is POINTER (that is
2321         called by genNearPointerSet)
2322         * (genUnPackBits): added operand left in function parameters,
2323         * (genNearPointerGet, genNearPointerSet): prevent the loading of
2324         FSR0 if accessing bitfields,
2325
2326 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
2327
2328         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
2329           _print_format; updated printf, sprintf, vsprintf
2330         * device/include/asm/default/features.h: corrected comment/define
2331         * device/lib/Makefile.in: added sprintf.c
2332         * device/lib/libsdcc.lib: added sprintf module
2333         * device/lib/printf_large.c,
2334         * device/lib/vprintf.c,
2335         * device/lib/sprintf.c: totally refactored printf_large and vprintf
2336           into these 3 files
2337         * support/regression/Makefile: changed ALL_PORTS into a usefull default
2338         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
2339         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
2340           hc08 test
2341         * support/regression/tests/zeropad.c: define idata as data for hc08
2342
2343 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2344
2345         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
2346         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
2347         labels are referenced at least once (even if a reference is not found)
2348         * src/hc08/gen.c (emitcode): set isComment flag for comments
2349         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
2350         loads), rules 6a..6b (optimize jumps to return)
2351
2352 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2353
2354         * device/lib/acosf.c (acosf),
2355         * device/lib/asinf.c (asinf),
2356         * device/lib/atanf.c (atanf),
2357         * device/lib/ceilf.c (ceilf),
2358         * device/lib/cosf.c (cosf),
2359         * device/lib/coshf.c (coshf),
2360         * device/lib/cotf.c (cotf),
2361         * device/lib/fabsf.c (fabsf),
2362         * device/lib/floorf.c (floorf),
2363         * device/lib/log10f.c (log10f),
2364         * device/lib/logf.c (logf),
2365         * device/lib/sinf.c (sinf),
2366         * device/lib/sinhf.c (sinhf),
2367         * device/lib/sqrtf.c (sqrtf),
2368         * device/lib/tanf.c (tanf),
2369         * device/lib/tanhf.c (tanhf),
2370         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
2371         replaced all instances of "reentrant" in the library functions
2372         defined in math.h with this macro.
2373         * support/regression/tests/float_trans.c: reenabled test for hc08
2374
2375 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
2376
2377         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
2378         erroneously deleted
2379
2380 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2381
2382         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
2383         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
2384         multi-byte volatile operands are used
2385         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
2386         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
2387         initialization to area GSINIT0 so that it would always precede
2388         any static initializers in GSINIT
2389         * support/regression/tests/zeropad.c: fixed idata define for hc08
2390         * support/regression/tests/bug-927659.c,
2391         * support/regression/tests/float_trans.c: disabled tests for hc08
2392         pending missing library routines
2393         * .version: increased version number to 2.4.4 - hc08 port now passes
2394         regression tests
2395
2396
2397 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
2398
2399         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
2400         * Makefile.common.in,
2401         * as/Makefile,
2402         * as/hc08/Makefile.in,
2403         * as/mcs51/Makefile.in,
2404         * as/z80/Makefile.in,
2405         * debugger/mcs51/Makefile.in,
2406         * device/include/Makefile.in,
2407         * device/lib/Makefile.in,
2408         * doc/Makefile,
2409         * link/Makefile,
2410         * link/z80/Makefile.in,
2411         * packihx/Makefile.in,
2412         * sim/ucsim/main_in.mk,
2413         * sim/ucsim/avr.src/Makefile.in,
2414         * sim/ucsim/doc/Makefile.in,
2415         * sim/ucsim/gui.src/serio.src/Makefile.in,
2416         * sim/ucsim/hc08.src/Makefile.in,
2417         * sim/ucsim/s51.src/Makefile.in,
2418         * sim/ucsim/xa.src/Makefile.in,
2419         * sim/ucsim/z80.src/Makefile.in,
2420         * src/Makefile.in,
2421         * support/cpp2/Makefile.in,
2422         * support/librarian/Makefile,
2423         * support/makebin/Makefile: added DESTDIR to the install path proposed
2424         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
2425         * doc/sdccman.lyx: added DESTDIR documentation
2426
2427 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
2428
2429         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
2430         instruction for interrupt handlers, use fast returns when returning
2431         from high priority interrupts
2432
2433 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2434
2435         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
2436         code generation
2437         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
2438         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
2439         bugs, ported much of Bernhard's code from mcs51
2440         * src/mcs51/gen.c (genSend),
2441         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
2442         than one when calling a reentrant function
2443         * device/lib/_mullong.c: defined an alternate struct layout for big
2444         endian ports (hc08)
2445
2446 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2447
2448         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
2449         test
2450
2451 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2452
2453         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
2454         are sane and complete before asking the port its prefered parameter
2455         passing method (fixes bug #1017633)
2456         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
2457         and _ret3
2458
2459 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2460
2461         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
2462         problem in bitfields >= 8 bits.
2463
2464 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
2465
2466         * src/SDCCsymt.c: undid changes that were not meant to be committed
2467
2468 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
2469
2470         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
2471
2472 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
2473
2474         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
2475           copied and wrong bit got inverted
2476
2477 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2478
2479         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
2480         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
2481         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
2482         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
2483         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
2484         assignments to bitfields at known addresses
2485         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
2486         reads from bitfields at known addresses
2487         * src/hc08/ralloc.c (packRegisters),
2488         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
2489         genhc08Code): optimize pointer get values used as conditionals
2490         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
2491         and branch
2492
2493 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2494
2495         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
2496         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
2497         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
2498         as conditionals
2499
2500 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2501
2502         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
2503
2504 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2505
2506         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
2507         related problems
2508
2509 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
2510
2511         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
2512
2513 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2514
2515         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
2516         mcs51 port
2517
2518 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
2519
2520         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
2521
2522 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2523
2524         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
2525         cases use more compact code.
2526
2527 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
2528
2529         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
2530
2531 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2532
2533         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
2534
2535 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2536
2537         * src/SDCCsymt.h,
2538         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
2539         parameter of changePointer() from symbol* to sym_link*
2540         * src/SDCCast.c (decorateType): call changePointer() for CAST op
2541         * src/SDCCsymt.c (compareType): void* type is castable to other
2542         pointers, but not necesarily an exact match.
2543         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
2544         is no longer blindly treated as an exact match.
2545         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
2546
2547 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
2548
2549         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
2550
2551 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
2552
2553         * src/pic/gen.c,
2554         * src/pic/pcode.c,
2555         * src/pic/ralloc.h,
2556         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
2557
2558 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
2559
2560         * src/pic/device.c,
2561         * src/pic/device.h,
2562         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
2563
2564 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2565
2566         * src/mcs51/gen.c (emitcode): fixed bug #992819
2567
2568 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
2569
2570         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
2571           there's no need to make it worse
2572
2573 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2574
2575         * src/mcs51/ralloc.c (deassignLR),
2576         * src/ds390/ralloc.c (deassignLR),
2577         * src/hc08/ralloc.c (deassignLR),
2578         * src/z80/ralloc.c (deassignLR),
2579         * src/pic/ralloc.c (deassignLR),
2580         * src/pic16/ralloc.c (deassignLR),
2581         * src/avr/ralloc.c (deassignLR),
2582         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
2583         rlivePoint): fixed another part of bug #971834
2584
2585 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2586
2587         * src/z80/main.c: enabled "critical" keyword
2588         * src/z80/mappings.i,
2589         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
2590         functions (fixes bug #979646)
2591         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
2592
2593 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2594
2595         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
2596           such as c:\mydir.
2597
2598 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
2599
2600         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
2601           doesn't disable too much optimizations
2602
2603 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
2604
2605         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
2606
2607 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
2608
2609         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
2610
2611 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
2612
2613         * src/pic/gen.c tidied up tabs
2614         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
2615         * src/pic/main.c tidied up tabs
2616         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
2617         * src/pic/pcoderegs.c tidied up tabs
2618         * src/pic/ralloc.c tidied up tabs
2619
2620 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
2621
2622         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
2623         to S_FIXED for pic16 port and when symbol is not in level 0,
2624         allocate for S_REGISTER storage class and pic16 port, too,
2625         * src/pic16/device.h: prototype for checkSym,
2626         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
2627         * (pic16_assignConfigWordValue): test the value and the mask to
2628         validate that the value is suitable for the configuration word,
2629         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
2630         collect extern declared symbols, don't emit symbol twice, check
2631         first if symbol is in publics set first,
2632         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
2633         * added command line '--fstack' which enables an experimental
2634         feature for stack access, too buggy to be used yet...
2635         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
2636         * (pic16_allocDirReg): when register has storage class S_REGISTER
2637         allocate in pic16_dynAccessRegs,
2638         * device/include/pic16/pic18f????.h: modified configuration word
2639         naming convention, words started as CONFIG0H but should be CONFIG1H
2640
2641 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
2642
2643         * device/include/mcs51reg.h: fixed bug 970993
2644
2645 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
2646
2647         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
2648         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
2649         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
2650         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
2651         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
2652         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
2653           error/warning numbers,
2654           added function setWarningDisabled()
2655         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
2656         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
2657           _memcmp.c _memmove.c calloc.c realloc.c free.c
2658         * support/regression/tests/malloc.c: added tests for new functionality
2659         * support/regression/tests/zeropad.c: added tests for truncated initializers
2660           and initialized char arrays starting with '\x0'
2661         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
2662
2663 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
2664
2665         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
2666
2667 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2668
2669         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
2670         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
2671         peephole 177.e. Thanks to anonymous
2672
2673 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
2674
2675         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
2676         function isn't used in the source but referenced as a
2677         variable initializer then declare it as extern in .asm file
2678
2679 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
2680
2681         * .version: increased version number to 2.4.3
2682
2683         Adding version extension according to ChangeLog CVS revision
2684         * src/Makefile.in (target all): added dependency 'version.h'
2685         * (rule version.h): added rule to create version.h from ChangeLog,
2686         * (rule dep): added dependency version.h,
2687         * src/version.awk: AWK script to create version.h
2688         * src/SDCCdwarf2.c (dwWriteModule),
2689         * src/SDCCglue.c (initialComments),
2690         * src/SDCCmain.c (printVersionInfo): modified to write after
2691         version string the version extension number,
2692         * src/SDCCutil.c: included "version.h"
2693         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
2694         number,
2695         * src/SDCCutil.h: added prototype for getBuildNumber
2696
2697         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
2698         includeDirsSet, too,
2699         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
2700         const char [] is found in function prototype...
2701
2702         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
2703         moving to WREG with source is already in WREG,
2704         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
2705         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
2706         * (aopForSym): stack'ed symbols are partially supported, added
2707         if-clause to support symbols in FARSPACE,
2708         * (sameRegs): added test for AOP_ACC to see if registers are same,
2709         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
2710         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
2711         * (pic16_popRegFromString): will not allocate a new register if it
2712         doesn't find one by name, bug may have introduced...
2713         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
2714         * (genIpush): revived to use pic16 port's stack,
2715         * (genAddrOf): added incomplete case for stack'ed operand,
2716         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
2717         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
2718         can handle multibyte operands,
2719         * src/pic16/glue.c (pic16_printIval*): some debug info added,
2720         * (pic16initialComments): added message for MPLAB compatibility
2721         mode enabled,
2722         * src/pic16/main.h: prototype for pic16_mplab_comp,
2723         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
2724         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
2725         * (_pic16_linkEdit): NEW, handles link stage, transferred here
2726         because of increased complexity of procedure,
2727         * (_process_pragma): stack pragma changed to format 'stack pos len',
2728         emit symbol '_stack_end' to conform with gplink,
2729         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
2730         to search for register,
2731         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
2732         PO_GPR_REGISTER,
2733         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
2734         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
2735         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
2736         case for PO_GPR_REGISTER,
2737         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
2738         dies, the new era is ahead !...
2739         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
2740         pic16_dynInternalRegs,
2741         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
2742         * (pic16_allocDirReg): minor optimizations and bug fixes,
2743         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
2744
2745         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
2746         load stack and frame pointer with address of 'stack_end' symbol
2747
2748 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
2749
2750         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
2751         without source code but only variable initializers
2752
2753 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
2754
2755         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
2756         external are not declared as extern to reduce overhead while linking
2757
2758 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
2759
2760         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
2761
2762 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
2763
2764         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
2765           Yee Keat for the patch
2766         * src/SDCCast.c (decorateType): fixed bug #979599
2767         * src/ds390/gen.h: removed local fReturnSizeDS390
2768         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
2769         * src/ds390/gen.c (genAnd, genOr, genXor),
2770         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
2771
2772 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
2773
2774         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
2775         add relFilesSet to $3, manipulate $2 to handle linking of object
2776         files without source files in command line,
2777         * device/include/pic16 (all headers): added ID location macros,
2778         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
2779         entries for ID location bytes,
2780         * (pic16_assignIdByteValue): NEW,
2781         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
2782         added field dumpcalltree to pic16_options_t,
2783         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
2784         is used instead of pic16_Gstack_base_addr, check if (ifx) before
2785         emitting rFalseIfx label after check_carry label,
2786         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
2787         pic16_emitDIRegs), NEW
2788         * (pic16glue): dump .calltree file when option --calltree found,
2789         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
2790         * (_pic16_genAssemblerPreamble): emit ID locations after
2791         configuration registers,
2792         * (pic16_linkCmd): modifications of the link command,
2793         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
2794         * (pic16_pCodeInitRegisters): don't init stack registers,
2795         * (pic16_findPrevInstruction): fixed bug,
2796         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
2797         bug with immediate registers,
2798         * (buildCallTree): traces stack push and pop,
2799         * (pct2): dump also stack usage for each function,
2800         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
2801         * (pic16_allocDirReg): various modifications,
2802         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
2803         fixed to 1,
2804
2805 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
2806
2807         * src/pic16/pcode.c: removed buggy double colon
2808
2809 2004-07-01 Borut Razem <borut.razem AT siol.net>
2810
2811         * support/scripts/sdcc.nsi: added include/pic16 to setup
2812
2813 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
2814
2815         * device/lib/Makefile.in: fixed bug in target objects-pic16,
2816         * device/lib/pic16/Makefile: prefixed with dash (-) command under
2817         target 'clean',
2818         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
2819         specific command line arguments. Also added sample lkr script
2820         for placing a variable at a specific memory bank.
2821         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
2822         at a specific memory bank,
2823         * (pic16_dump_isection): fixed bug which caused string literals to
2824         be omitted when dumping idata section,
2825         * (pic16_groupRegistersInSection): added code to handle registers
2826         in specific memory banks,
2827         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
2828         public, all references are renamed too,
2829         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
2830         AOP_DPTR2,
2831         * (pic16_storeForReturn): added case to handle when dest is WREG,
2832         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
2833         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
2834         pic16_rel_udata, check to see if that register is marked as being
2835         a member of a specific memory bank,
2836         * (pic16_printIvalCharPtr): added code to add string literals either
2837         to code or the idata sections,
2838         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
2839         also accept the 'udata' pragma,
2840         * src/pic16/main.h: new structure types sectName and sectSym
2841         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
2842         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
2843         * (pic16_findPrevInstruction): fixed, it returned nothing,
2844         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
2845         instruction combinations,
2846         * (pic16_FixRegisterBanking): heavily reorganised,
2847         * (pic16_AnalyzeBanking): if generating banksel directives is
2848         disabled, then don't call FixRegisterBanking at all,
2849         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
2850         completely removed,
2851         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
2852
2853 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
2854
2855         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
2856         Phuah Yee Keat <yk.phuah AT nestac.com>
2857
2858 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
2859
2860         * src/pic16/glue.c (pic16createInterruptVect): function now emits
2861         correctly the IVT even if it is relocated to some other location
2862
2863 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
2864
2865         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
2866         * device/include/pic16/pic18f2220.h: NEW,
2867         * device/lib/pic16/libdev/pic18f2220.c: NEW,
2868         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
2869         * src/pic16/device.c (struct Pics16): added info for 18f2220,
2870         * src/pic16/device.h (struct pic16_options): added ivt_loc and
2871         nodefaultlibs, ivt_loc is the location of the interrupt vector
2872         table, and nodefaultlibs signs that default libraries should not be
2873         linked in link stage,
2874         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
2875         according to --ivt-loc argument,
2876         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
2877         when pragma stack is found,
2878
2879 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2880
2881         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
2882         256 (range check), 257 (do while), 258.a-f (bit banging
2883         f.e. on 3-wire SPI bus)
2884
2885 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2886
2887         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
2888         variables used exclusively within a loop
2889
2890 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
2891
2892         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
2893
2894 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2895
2896         * src/SDCClrange.c (computeClash): fixed bug #971834
2897
2898 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2899
2900         * src/mcs51/gen.c (genCmp): fixed bug #975903
2901         * src/hc08/gen.c (operandsEqu),
2902         * src/ds390/gen.c (operandsEqu),
2903         * src/z80/gen.c (operandsEqu),
2904         * src/pic/gen.c (operandsEqu),
2905         * src/pic16/gen.c (operandsEqu),
2906         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
2907         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
2908
2909 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2910
2911         * src/SDCCcse.c (cseBBlock): fixed bug #966963
2912
2913 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
2914
2915         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
2916         default case in switch statement,
2917         * glue.c (pic16_initPointer): expr is initialised via decoarteType
2918         to eliminate problem with initialisation of pointers, but problem
2919         still exists,
2920         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
2921         * (emitStaticSegment): removed various lines emitting debug info,
2922         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
2923         added processor registers for utilizing EEPROM,
2924         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
2925         configurable and set 8
2926
2927 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
2928
2929         * .version: increased version number to 2.4.2,
2930
2931         Cumulative patch for pic16 port
2932         * src/pic16/device.c: changed scheme to dump initial values for
2933         variables in idata segment, all print_idata* functions were removed,
2934         now the pic16_printIval* will be called,
2935         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
2936         * _pic16_printPointerType, pic16_printPointerType,
2937         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
2938         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
2939         NEW, similar to the respective functions in SDCCglue.c,
2940         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
2941         way, emitting hex bytes,
2942         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
2943
2944 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2945
2946         * src/avr/ralloc.c (serialRegAssign),
2947         * src/xa51/ralloc.c (serialRegAssign),
2948         * src/pic/ralloc.c (serialRegAssign),
2949         * src/pic16/ralloc.c (serialRegAssign),
2950         * src/hc08/ralloc.c (serialRegAssign),
2951         * src/z80/ralloc.c (serialRegAssign),
2952         * src/ds390/ralloc.c (serialRegAssign),
2953         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
2954
2955 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2956
2957         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
2958         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
2959
2960 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
2961
2962         Cumulative patch for pic16 port:
2963         * src/pic16/device.h (typedef PIC16_device) modified fields for
2964         defining microcontrollers,
2965         * src/pic16/device.c: added new info for all devices in Pics16 array,
2966         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
2967         to be optimised out by the pCode optimiser,
2968         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
2969         specially, bug reported by G.M. Gallant,
2970         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
2971         as force'd so that cannot be optimised out by pCode optimiser,
2972         * src/pic16/pcode.c,
2973         * src/pic16/pcodepeeph.c,
2974         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
2975         they are disabled by default, but can be enabled explicit with
2976         command argument --denable-peeps, for testing,
2977         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
2978         --pomit-ivt in COMPILE_FLAGS
2979
2980 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
2981
2982         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
2983           compilation on MSVC
2984
2985 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
2986
2987         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
2988
2989 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2990
2991         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
2992         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
2993
2994 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
2995
2996         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
2997         would only assign 0x300001 register.
2998
2999 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
3000
3001         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
3002         in COMPILE_FLAGS. Thanks to G. Gallant for report.
3003
3004 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3005
3006         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
3007         for ds80c400
3008         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
3009         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
3010         added peephole 254 (left shift), 255 (jump table)
3011
3012 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
3013
3014         * device/lib/Makefile.in: removed comment line with model-pic16,
3015         * (target port-specific-objects-pic16): the libraries and objects
3016         are copied to the build directory form the device/lib/pic16/bin
3017         directory
3018
3019         Cumulative patch concerning pic16 port:
3020         * library directory has been re-organized,
3021         * added support for PIC18F1220,
3022         * added headers and library sources for chips 18f1220,18f6520,
3023         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
3024
3025         * configuration registers setting has changed, now each supported
3026         device has a complete description of the registers it uses,
3027         * all initialisations are moved to idata sections, these section
3028         can be absolute or relocatable,
3029         * fixed initialisation of codespace variables,
3030         * fixed warning about PCLATU and gpsim,
3031         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
3032         * (genAssign): use table reads when assigning from variables in codespace,
3033         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
3034         char/int variables placed in codespace,
3035         * (pic16_emitConfigRegs): NEW, emits a list with configuration
3036         registers set in .asm file, no need for --pomit-config-words anymore,
3037         * (pic16glue): some 8051 legacy segments are commented out
3038         (to be removed completely),
3039         * added support for alternative assembler and linker with --asm=
3040         and --link= command line arguments,
3041         * peepholes are disabled automatically in the port, no need to
3042         specify on command line,
3043         * port supports natively char/int/long multiplication, but converts
3044         all divisions to support functions,
3045         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
3046         to the file set in variable $2,
3047         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
3048         strings in ASCII format and not in hex,
3049         * ralloc.c (serialRegAssign): added a triplet of conditional calls
3050         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
3051         allocate proper register if iCodes aren't temporary,
3052
3053 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
3054
3055         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
3056
3057 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
3058
3059         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
3060         is commented out
3061
3062 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3063
3064         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
3065         computed address is reused
3066         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
3067         multi-byte bitfields
3068
3069 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3070
3071         * src/z80/gen.c: (genArrayInit): must check for pointers too
3072
3073 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
3074
3075         * support/regression/tests/zeropad.c: never meant to commit the
3076           nestedstruct test: removed, added check for GCC version
3077
3078 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
3079
3080         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
3081         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
3082         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
3083           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
3084           bugs 928906 and 954082 half-empty initializers
3085         * src/SDCCsymt.h,
3086         * src/SDCCsymt.c (getAllocSize): added for above fix
3087         * src/z80/gen.c (genArrayInit): fixed bug 741044
3088         * support/regression/tests/zeropad.c: added tests
3089
3090 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
3091
3092         * src/pic16/device.c (pic16_dump_section): corrected bug which
3093         caused some symbols of the libraries to be misplaced
3094
3095 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3096
3097         * src/pic16/glue.c,
3098         * src/pic16/ralloc.h,
3099         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
3100         to fix conflict with pic port
3101
3102 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
3103
3104         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
3105         externs configuration variables,
3106         * src/pic16/ralloc.h,
3107         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
3108         prototype in header, commented out some debug messages
3109
3110 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
3111
3112         * src/pic16/glue.c,
3113         * src/pic16/main.c,
3114         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
3115         for gpasm COFF object generation. Thanks to D. Hawkins for
3116         his patch info
3117
3118 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3119
3120         * src/ds390/main.c,
3121         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
3122         Brock for spotting this)
3123         * src/ds390/gen.c (genEndFunction),
3124         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
3125         interrupt handler and critical. Disable push/pop optimizations when
3126         peephole optimizations disabled.
3127
3128 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3129
3130         Updated pic16 library sources and headers.
3131         * device/lib/pic16/pic18f*/ ,
3132         * device/include/pic16/*.h: modified to handle structured SFR
3133         definitions
3134
3135 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
3136
3137         * src/port.h (PORT structure): added hook initPaths, now each
3138         port can declare its own default search paths,
3139         which can been seen with the --print-search-dirs option,
3140         see pic16 port for example,
3141         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
3142         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
3143         * (doPrintSearchDirs): NEW, replaces in a central manner the
3144         printing of search dirs which was split in set*Paths functions,
3145         * (main): added call to port->initPaths and doPrintSearchDirs,
3146         * src/avr/main.c,
3147         * src/ds390/main.c,
3148         * src/hc08/main.c,
3149         * src/izt/i186.c,
3150         * src/izt/tlcs900h.c,
3151         * src/mcs51/main.c,
3152         * src/pic/main.c,
3153         * src/pic16/main.c: modified port structures to reflect addition of
3154         initPaths hook,
3155
3156         * src/pic16/device.c (regCompare): registers are finally sorted by name,
3157         * (pic16_dump_section): for registers in same address reserve memory once,
3158         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
3159         to no_banksel,
3160         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
3161         result is greater in size than right or left,
3162         * (pic16_genUMult8X8_8): there are some cases where the result can
3163         be 16 bits size, so handle these,
3164         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
3165         * (pic16_outBitC): modified to emit pcodes,
3166         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
3167         or not,
3168         * (genDivOneByte): implemented algorithm to divide 8-bits,
3169         * (genCmp): uncommented goto, but issues still exist,
3170         * (genAnd): fixed a bug with variables >8bits,
3171         * (genPackBits): optimization added that uses BCF/BSF to change a
3172         single bit,
3173         * (genAssign): fixed bug when assigning floating point literals,
3174         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
3175         __sdcc_gsinit_startup label,
3176         * src/pic16/main.c (_pic16_init): removed search directory
3177         initialisations,
3178         * (_pic16_initPaths): NEW, used to initialise search directories,
3179         * (_hasNativeMulFor): support functions for all except char/int
3180         multiplication, and char division,
3181         * (PIC16_port struct): modified entry for native mul support,
3182         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
3183         no_banksel option,
3184         * (buildCallTree): call to register_usage is ifdef'ed out,
3185
3186 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3187
3188         * device/include/string.h: applied Stas Sergeev's patch to make this
3189         header file compatible with the preprocessor -Wundef option
3190         * src/SDCCmain.c (main): abort compilation if preprocessor reports
3191         failure (fixes bug #941458)
3192
3193 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3194
3195         * src/SDCCopt.c (killDeadCode): fixed bug #907733
3196         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
3197         that the variable, not the function, should be static
3198         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
3199         to be consistent with non-literal case
3200
3201 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3202
3203         * src/SDCCast.c (isConformingBody): fixed bug #949967
3204         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
3205         convilong): fixed bug #952086
3206
3207 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3208
3209         * src/SDCCmem.c (allocVariables): fixed bug #955321
3210
3211 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3212
3213         * src/hc08/main.c (_hc08_genAssemblerEnd),
3214         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
3215         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
3216         completely eliminated the use of a temporary file
3217         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
3218         when more than one file linked
3219         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
3220
3221 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3222
3223         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
3224         which fixes bug #543481
3225         * support/regression/tests/bug-751703.c: fixed comments left from a
3226         cut and paste error
3227         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
3228         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
3229         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
3230         scopes
3231         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
3232         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
3233         are now changed to underscores in moduleName
3234
3235 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3236
3237         * as/mcs51/lkmem.c: better fix for bug #954173
3238
3239 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
3240         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3241
3242         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
3243         * device/include/c8051f000.h,
3244         * device/include/c8051f120.h,
3245         * device/include/c8051f300.h,
3246         * device/include/c8051f310.h,
3247         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
3248         PWM16) and detab'ed
3249
3250 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3251
3252         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
3253         and mailing lists, doc'ed --no-peep-comments, removed reference
3254         to knoppix (newest version has no LyX/LaTeX), other minor changes
3255         * src/SDCCglue.c (glue): save 2 bytes stack space with
3256         option --main-return. The ljmp could probably be avoided too
3257
3258 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3259
3260         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
3261
3262 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3263
3264         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
3265         * src/SDCCopt.c (isLocalWithoutDef),
3266         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
3267         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
3268         (credit to Maarten Brock for patch #949363, on which this is based)
3269         * support/regression/tests/bug-751703.c: some test cases of extern used
3270         within inner scopes.
3271
3272 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3273
3274         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
3275         SPEC_STRUCT
3276         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
3277         struct definitions
3278         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
3279         dwWriteLabel): fix to create valid debugger symbols even when
3280         the module name has non-alphanumeric symbols in it
3281         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
3282         when a variable's allocation has been optimized away
3283
3284
3285 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3286
3287         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
3288         * src/hc08/main.c,
3289         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
3290         * src/mcs51/main.c,
3291         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
3292         * src/ds390/main.c,
3293         * src/z80/gen.c (z80_emitDebuggerSymbol),
3294         * src/z80/main.c,
3295         * src/pic/gen.c (pic14_emitDebuggerSymbol),
3296         * src/pic/main.c,
3297         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
3298         * src/pic16/main.c,
3299         * src/avr/gen.c (avr_emitDebuggerSymbol),
3300         * src/avr/main.c,
3301         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
3302         * src/xa51/main.c,
3303         * src/SDCCdebug.c (emitDebuggerSymbol),
3304         * src/SDCCdebug.h,
3305         * src/port.h: added a debugger struct to the port struct. Added a
3306         callback for defining debugger symbols
3307
3308         * src/SDCCast.c (createLabel),
3309         * src/SDCC.y (labeled_statement): mark all compiler generated labels
3310         with isitmp = 1
3311         * src/SDCCicode.h,
3312         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
3313         iCode back to the ast for the function
3314
3315         * src/hc08/ralloc.c (hc08_assignRegisters),
3316         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
3317         unneeded fields from the regs struct.
3318         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
3319         pushReg() & pullReg() functions instead of emitcode()
3320
3321         * src/hc08/gen.c (genLabel, genhc08Code),
3322         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
3323
3324         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
3325         debugger hooks
3326
3327         * src/hc08/gen.c (genEndFunction, genhc08Code),
3328         * src/hc08/gen.h,
3329         * src/mcs51/gen.c (genEndFunction, gen51Code),
3330         * src/mcs51/gen.h,
3331         * src/ds390/gen.c (genEndFunction, gen390Code),
3332         * src/ds390/gen.h,
3333         * src/z80/gen.c (genEndFunction, genZ80Code),
3334         * src/z80/gen.h,
3335         * src/z80/z80.h,
3336         * src/pic/gen.c (genEndFunction, genpic14Code),
3337         * src/pic/gen.h,
3338         * src/pic16/gen.c (genEndFunction, genpic16Code),
3339         * src/pic16/gen.h,
3340         * src/avr/gen.c (genEndFunction, genAVRCode),
3341         * src/avr/gen.h,
3342         * src/xa51/gen.c (genEndFunction, genXA51Code),
3343         * src/xa51/gen.h,
3344         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
3345         specific code to cdbFile.c and out of the backend code generators
3346
3347         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
3348         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
3349         starting address is now 0
3350
3351         * as/hc08/asm.h,
3352         * as/hc08/m08pst.c,
3353         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
3354         assembler directive for DWARF support
3355         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
3356
3357         * src/src.dsp,
3358         * src/Makefile.in,
3359         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
3360
3361 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3362
3363         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
3364         and inappropriate peephole optimization in jump tables
3365
3366 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3367
3368         * as/hc08/m08pst.c,
3369         * src/SDCCglue.c: sdccopt works for the hc08 port now
3370
3371 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
3372
3373         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
3374
3375 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3376
3377         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
3378
3379 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3380
3381         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
3382         rules
3383         * src/SDCCmain.c,
3384         * src/SDCCglobl.h,
3385         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
3386         comments from the peephole optimizer replacement rules
3387         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
3388         symbols
3389         * src/SDCCcse.c (updateSpillLocation),
3390         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
3391         equivalents
3392         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
3393         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
3394         objects far pointers
3395
3396 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3397
3398         * src/SDCCsymt.h: a missing part of my last change
3399         * src/pic/ralloc.c (regTypeNum),
3400         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
3401
3402 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3403
3404         * src/SDCCicode.h,
3405         * src/SDCCicode.c (aggrToPtrDclType),
3406         * src/SDCCptropt.h,
3407         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
3408         ptrPseudoSymConvert),
3409         * src/pic/ralloc.c (regTypeNum),
3410         * src/pic16/ralloc.c (regTypeNum),
3411         * src/hc08/ralloc.c (regTypeNum),
3412         * src/ds390/ralloc.c (regTypeNum),
3413         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
3414         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
3415
3416 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3417
3418         * link/z80/lkmain.c (afile),
3419         * as/hc08/lkmain.c (afile),
3420         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
3421         prevent a pointer problem when a filename has no directory and
3422         no extension specified.
3423
3424 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3425
3426         * link/z80/lkmain.c (afile): allow periods in directory names
3427         * link/z80/lkmain.c (afile),
3428         * as/mcs51/lkmain.c (afile),
3429         * as/hc08/lkmain.c (afile): allow linker script file to have an
3430         extension other than ".lnk"
3431         * link/z80/lklex.c (getfid),
3432         * link/z80/lkmain.c (parse),
3433         * as/mcs51/lklex.c (getfid),
3434         * as/mcs51/lkmain.c (parse),
3435         * as/hc08/lklex.c (getfid),
3436         * as/hc08/lkmain.c (parse): Support comments in the linker script
3437         file on lines by themselves and after filenames
3438
3439 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3440
3441         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
3442
3443 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3444
3445         * src/z80/peeph-z80.def: removed some peephole rules that don't
3446         work with multibyte arithmetic (fixed bug #937126)
3447         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
3448         to registers and not global variables
3449         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
3450         geniCodePreInc, geniCodePostDec, geniCodePreDec,
3451         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
3452         checking for assignments not internally generated (fixed bug #931895)
3453         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
3454         structure member (fixed bug #930072)
3455
3456 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3457
3458         * src/SDCCmain.c (linkEdit),
3459         * src/hc08/main.c (_hc08_parseOptions),
3460         * as/hc08/Makefile.in,
3461         * as/hc08/aslink.h,
3462         * as/hc08/asm.h,
3463         * as/hc08/m08pst.c,
3464         * as/hc08/lkrloc.c (relr, rele),
3465         * as/hc08/lkarea.c (lnkarea)
3466         * as/hc08/lkmain.c (afile, parse),
3467         * as/hc08/lkelf.c: support for ELF output
3468         * as/hc08/lks19.c (s19),
3469         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
3470
3471 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3472
3473         * as/mcs51/lkihx.c: Fixed bug #899105.
3474
3475 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3476
3477         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
3478         .dsp files from Unix to DOS.
3479
3480 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3481
3482         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
3483         function pointers; we have been compliant for several months now.
3484         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
3485         change that was accidently commented out
3486         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
3487         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
3488         bug #922319
3489
3490 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3491
3492         * src/hc08/gen.c: output of all of the internal debugging information
3493         is now controlled by the D() macro; it is disabled by default
3494
3495 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3496
3497         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
3498         harder to keep the same registers during a CAST iCode
3499         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
3500         long via int can be done in a single cast, if the signedness is
3501         correct.
3502         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
3503         putchar() in tinibios.c in ds390's library
3504
3505 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
3506
3507         * src/SDCCast.c (decorateType): fixed bug #898889,
3508         cast result of a literal complement too
3509         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
3510         fixed check for bitfields
3511
3512 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
3513
3514         * src/SDCCicode.c (geniCodeLogic): made it static,
3515         (geniCodeLogicAndOr): added in order to fix bug #905492,
3516         (ast2iCode): fixed bug #905492
3517         * support/regression/tests/bug-905492.c: added
3518         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
3519         (processParms): fixed bug #927659: don't copy parms, this will clear
3520         decorated flag
3521         * support/regression/tests/bug-927659.c: added
3522
3523 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
3524
3525         * src/SDCCast.c (addCast): don't cast float to char
3526         * device/lib/libsdcc.lib: added _memmove
3527
3528 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
3529
3530         * device/lib/large/Makefile: fixed parallel execution by
3531         replacing `make` by `$(MAKE)`
3532
3533 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3534
3535         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
3536         offsets (fixes bug #923936)
3537
3538 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
3539
3540         * device/lib/small/Makefile: fixed parallel execution by
3541         replacing `make` by `$(MAKE)`
3542
3543 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
3544
3545         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
3546
3547 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
3548
3549         * src/pic/gen.c (genCpl): multi-byte complements were not working.
3550         * src/regression/Makefile: Regression test was not running.
3551
3552 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
3553
3554         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
3555         complement if possible
3556         * src/SDCCval.c (valComplement),
3557         * src/SDCCicode.c (operandOperation): fixed complement of literal
3558         * support/regression/tests/onebyte.c (testComplement): added
3559
3560 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
3561
3562         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
3563         return an optimized tree; actually replace actParm with the new tree
3564         * src/SDCCast.h: added some parantheses to remove side effects
3565         * support/regression/tests/bug-920866.c
3566
3567 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
3568         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
3569         Bit operands were not being handled properly in the pic14 port.
3570         (now src/regression/add.c passes again).
3571
3572 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3573
3574         * src/SDCC.y (labeled_statement): case and default no longer require
3575         a following statement (RFE #893037)
3576
3577 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3578
3579         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
3580         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
3581         disabled (fixes bug #916294)
3582         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
3583         "mov a,acc"; patch provided by Lenny Story
3584         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
3585
3586 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3587
3588         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
3589         functions
3590         * src/ds390/gen.c (genFunction, genEndFunction),
3591         * src/ds390/ralloc.c (ds390_assignRegisters),
3592         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
3593         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
3594         pushed if there are parameters passed on the stack. Also, a cleaner
3595         way to decide if r0/r1 should be pushed/popped. (Together they fix
3596         bug #918693)
3597
3598 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3599
3600         * doc/sdccman.lyx,
3601         * device/lib/mcs51/crtpagesfr.asm,
3602         * device/lib/mcs51/crtxinit.asm,
3603         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
3604         to avoid confusion with Si Lab's SFRPAGE register.
3605
3606 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3607
3608         * src/SDCCglue.c (emitMaps): allow public sfr variables
3609         * src/SDCCglue.c (initialComments): include compiler build date
3610         with compiler version and put the timestamp of the generated
3611         assembly file on a serperate line to be less confusing.
3612         * src/port.h: added genInitStartup hook
3613         * src/avr/main.c,
3614         * src/ds390/main.c,
3615         * src/hc08/main.c,
3616         * src/pic/main.c,
3617         * src/pic16/main.c,
3618         * src/xa51/main.c,
3619         * src/z80/main.c: genInitStartup initialize as NULL (default to
3620         historical behaviour)
3621         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
3622         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
3623         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
3624         library instead of hard coding it into the compiler.
3625         * support/regression/ports/mcs51-stack-auto/spec.mk,
3626         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
3627         * device/lib/mcs51/Makefile,
3628         * device/lib/small/Makefile,
3629         * device/lib/large/Makefile,
3630         * device/lib/mcs51/crtpagesfr.asm,
3631         * device/lib/mcs51/crtstart.asm,
3632         * device/lib/mcs51/crtxclear.asm,
3633         * device/lib/mcs51/crtxinit.asm,
3634         * device/lib/mcs51/crtclear.asm,
3635         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
3636         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
3637         and into user configurable files.
3638         * device/lib/clean.mk: clean mcs51 directory too
3639         * support/regression/tests/longlit.c: added static to T1 declaration
3640         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
3641         accesses in the initialization code
3642
3643 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3644
3645         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
3646         OSCTRIMVAL as noted in bug #916008
3647
3648 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3649
3650         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
3651         in loops with multiple exits (reported as incorrect registers
3652         used by Martin Helmling in Sdcc-user list)
3653
3654 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3655
3656         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
3657         made ds390 register extensions look less like error messages
3658
3659 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3660
3661         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
3662         reported by Adam Wozniak in Sdcc-user list
3663
3664 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
3665
3666         * src/SDCCast.c (decorateType): fixed with bug and promotion in
3667         arithmetic optimizations, added debug output
3668
3669 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
3670
3671         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
3672         * sdcc.spec: updated and split sdcc into 3 rpms
3673         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
3674         needed for literals of LEFT_OP and '+'
3675         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
3676         introduced RESULT_TYPE_NOPROM
3677         (geniCodeMultiply): fixed logic for decision if mul is optimized to
3678         left shift
3679         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
3680         limited promotion to int only for '*'
3681         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
3682
3683 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
3684
3685         * src/pic16/gen.c (genSkip),
3686         (genc16bit2lit), (gencjneshort): commented out
3687         (is_LitOp): new helper function, checks operand type
3688         (genCmpEq): rewritten
3689
3690 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
3691
3692         * support/regression/tests/bug-908454.c: added
3693
3694 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
3695
3696         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
3697         * src/SDCCicode.c (usualBinaryConversions): op needs int type
3698         (geniCodeCast): cosmetic, don't preserve bit storage class
3699         (geniCodeLeftShift): added promotion
3700         (geniCodeLogic): fixed regression
3701         * src/SDCCsymt.c (computeTypeOr): accept bits too
3702         (compareType): 2nd part of fix for bug #908454, needed for bitfields
3703
3704 2004-03-07  Borut Razem <borut.razem AT siol.net>
3705
3706         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
3707
3708 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
3709
3710         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
3711         version of pic16_genPackRegisters which does not check if ic is a
3712         CAST operator,
3713         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
3714         function cause string1.c regression test fails
3715
3716 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
3717
3718         * sim/ucsim/configure.in,
3719         * sim/ucsim/configure,
3720         * sim/ucsim/doc/Makefile.in: use docdir
3721         * src/SDCC.y: fixed sbit atrributes
3722         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
3723         * src/SDCCast.c (decorateType): |^& need special promotion handling
3724         * src/SDCCast.h,
3725         * src/SDCCsymt.h: moved definition of RESULT_TYPE
3726         * src/SDCCsymt.h (computeType),
3727         * src/SDCCicode.c: computeType() needs op
3728         * src/SDCCsymt.c (checkTypeSanity),
3729         * doc/sddman.lyx: "plain" bitfields are unsigned
3730         * src/SDCCsymt.c (computeTypeOr): added
3731         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
3732         |^& ops
3733         * src/SDCCval.c (val*): computeType() needs op
3734         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
3735         * support/regression/tests/onebyte.c: added tests for |^&
3736
3737 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
3738
3739         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
3740         for writing icode into asm output.
3741
3742 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
3743
3744         * src/pic16/device.c: added some debug lines enabled
3745         with macro DEBUG_CHECK,
3746         * src/pic16/genarith.c: more debug in genPlus,
3747         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
3748         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
3749         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
3750         * (aopForSym): onStack symbols are re-placed in data memspace,
3751         and onStack flag is cleared,
3752         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
3753         copy temporary pcodeop,
3754         * (genPcall): added warning for not updating PCLATU,
3755         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
3756         always true for pic16 port,
3757         * (genMultOneWord): NEW, supports integer multiplication,
3758         * (genMult): modified to call genMultOneWord,
3759         * (ifxForOp): added warning when return NULL,
3760         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
3761         flag is set before call to operandFromSymbol for implicit
3762         added structures,
3763         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
3764         options.intlong_rent are set by default,
3765         * (_hasNativeMulFor): modified to allow port generation of integer
3766         multiplication,
3767         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
3768         set regtype to REG_SFR for all registers, restricting seting the
3769         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
3770
3771 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3772
3773         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
3774         more than 500 times in the regression tests
3775
3776 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3777
3778         * support/Util/SDCCerr.h,
3779         * support/Util/SDCCerr.c,
3780         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
3781         enumerator_list),
3782         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
3783         for symbol conflicts.
3784         * support/valdiags/tests/enum.c,
3785         * support/valdiags/tests/tentdecl.c,
3786         * support/valdiags/tests/struct.c: expect possible error messages
3787         referring to original symbol definitions.
3788         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
3789         * src/SDCCsymt.h,
3790         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
3791
3792 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
3793
3794         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
3795
3796 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
3797
3798         * src/pic16/ralloc.c (newReg): fixed bug #908929
3799
3800 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3801
3802         * src/ds390/gen.c: added missing #include "main.h"
3803
3804 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
3805
3806         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
3807         checking if symbol is already in set,
3808         * src/pic16/device.h: prototype for checkAddSym,
3809         * src/pic16/gen.c: (_G): added entry interruptvector,
3810         * (assignResultValue): removed some commented out lines,
3811         * (genFunction): check for ISR via sym->type, absolute section for
3812         interrupt code is created via a new pBlock, the goto instruction is
3813         placed now correctly at the interrupt vector position, changed all
3814         references from ivec to _G.interruptvector,
3815         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
3816         is the interrupt is a high priority one, same for return from ISR,
3817         * src/pic16/glue.c: changed all calls of addSetHead for publics and
3818         externs to calls of checkAddSym,
3819         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
3820         pic16_pcode_verbose flag is set,
3821         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
3822         * src/pic16/pcoderegs.c: message about how many registers are saved
3823         will only be emitted if pic16_pcode_verbose flag is set,
3824
3825 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3826
3827         * src/ds390/ralloc.h,
3828         * src/ds390/ralloc.c (ds390_regWithIdx),
3829         * src/ds390/gen.c (emitcode),
3830         * src/ds390/main.h,
3831         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
3832         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
3833         ds390operandCompare, getRegsRead, getRegsWritten,
3834         initializeAsmLineNode): customized instruction size calculation for
3835         ds390, started basis for some register optimizations
3836         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
3837         corresponding assembly output
3838         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
3839         missing push/pop of r0/r1. Optimized push/pops
3840
3841 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3842
3843         * src/mcs51/main.c (instructionSize): fixed ACALL size
3844         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
3845
3846 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
3847
3848         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
3849         the sorting of rlist with NULL elements
3850         * (print_idataType, print_idata): NEW to create idata sections
3851         * src/pic16/device.h: idataSymSet new variable
3852         * src/pic16/gen.c (genFunction): fixed some bugs in string
3853         comparing, improved the absolute section creation for ISRs,
3854         added FSR0L/FSR0H in registers that are saved in an ISR,
3855         * (genInline): fixed the processing of inline snippets,
3856         now they undergo no process by the peephole optimizer
3857         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
3858         are placed in idataSymSet,
3859         * (pic16emitStaticSeg): extern symbols are added in externs,
3860         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
3861         switching when aboslute variables are placed in access bank memory
3862         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
3863         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
3864         commented out with #if,
3865         * (pic16_packRegisters): reintroduce the check for CAST because some
3866         symbols are not correctly handled,
3867         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
3868         pCodeInstruction instead of pCode,
3869         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
3870         pCodeAsmDir definition,
3871         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
3872         directive, then the argument directive is emitted without the leading
3873         tab, hack for inline labels which must be in the first column,
3874         * (compareLabel,pic16_findNextInstruction),
3875         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
3876         * (insertBankSwitch): modified for the new pCodeAsmDir,
3877
3878 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
3879         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
3880
3881         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
3882         instance,
3883         * (pushSide): commented out with #if,
3884         * (assignResultValue): fixed some typos in saving
3885         registers,
3886         * (genPcall): FIXED and sync'ed with genCall,
3887         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
3888         * (genNearPointerGet): fixed to handle some more cases,
3889         implementation scheme via table reads,
3890         * (genConstPointerGet): modified to access code memory correct,
3891         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
3892         and improved to handle some cases
3893         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
3894         instead of "RETLW" for init data
3895         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
3896         not IN_DIRSPACE, work around to reduce bank switching when aboslute
3897         variables are placed in access bank memory (<0x80 and >=0xf80),
3898         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
3899         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
3900         TBLWT_POSTDEC,TBLWT_PREINC
3901         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
3902         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
3903         directives
3904         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
3905         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
3906         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
3907         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
3908
3909 2004-02-29  Borut Razem <borut.razem AT siol.net>
3910
3911         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
3912         support/Util/findme.h, support/Util/system.h: enhance binary relative
3913         search for lib and include by using findProgramPath()
3914
3915 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3916
3917         * src/SDCCpeeph.h,
3918         * src/SDCCpeeph.c (pcDistance),
3919         * src/port.h,
3920         * src/mcs51/ralloc.h,
3921         * src/mcs51/ralloc.c (mcs51_regWithIdx),
3922         * src/mcs51/main.h,
3923         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
3924         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
3925         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
3926         size calculation port specific, started basis for some register
3927         optimizations
3928         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
3929         missing push/pop of r0/r1. Optimized push/pops
3930         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
3931         * device/lib/_modsint.c (_modsint),
3932         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
3933         and stack version so regression tests pass
3934
3935 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
3936
3937         * src/Makefile.in (dep): include SLIBOBJS in dependency check
3938         * src/SDCCast.c (decorateType): catch another small optimization
3939         with '?' operator
3940         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
3941         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
3942         modified to finally use computeType() all over SDCC,
3943         see Feature Request #877103
3944         * src/SDCCval.h: cosmetic
3945         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
3946         valCompare(); regression tested in muldiv.c
3947         * support/regression/tests/muldiv.c (testMod): mod sign follows
3948         dividend only
3949
3950 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
3951
3952         * src/SDCCast.c (decorateType): fixed bug #902362
3953         * doc/INSTALL.txt: fixed install instructions for win32
3954
3955 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
3956
3957         * device/include/Makefile.in (install): fixed by replacing spaces
3958         by tabs
3959         * doc/README.txt,
3960         * doc/INSTALL.txt: updated for release
3961         * doc/sdccman.lyx: added warning for --xstack being buggy
3962
3963 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
3964
3965         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
3966         to eliminate build warnings.
3967         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
3968
3969 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
3970            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
3971
3972         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
3973         removed -penable-stack, added comment for stack pragma, added
3974         warning for not initializing the stack/frame registers, removed
3975         comment at interrupts section
3976
3977         Stack is made permanent, there is no ability to disable stack usage.
3978         * src/pic16/device.h,
3979         * src/pic16/device.c: removed all references to USE_STACK macro,
3980         * src/pic16/device.c (pic16_dump_section): when no elements in
3981         rlist, free rlist before return,
3982         * (pic16_dump_int_registers): NEW, internal registers are a new set
3983         of general purpose registers reused by each function,
3984         * (checkAddReg): returns 1 if registers is added to set,
3985         * (pic16_groupRegistersInSection): when a registers is of type
3986         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
3987         * src/pic16/device.h: memRange and Assigned Memory are deleted,
3988         SRCASECMP macro is moved here from device.c
3989         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
3990         PO_PCLATU, PO_PRODL, PO_PRODH,
3991         * (pic16_pCodeOpType, genMinus,
3992         changed compares to "a" register, with AOP_ACC,
3993         * (pic16_genPlus): fixed some bugs and indented properly,
3994         * (pic16_addSign): changed size to size+offset in the MOVWF
3995         instruction,
3996         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
3997         multiply 8-bit operand by literal, result is 8-bit,
3998         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
3999         multiply 2 8-bit operand, result is 8-bit,
4000         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
4001         genUMult8X*_16,
4002         * src/pic16/gen.c: changed accUse to contain WREG only,
4003         * (pic16_emitcomment): renamed to pic16_emitpcomment,
4004         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
4005         true, do not use immediate addressing any more unless sym is a
4006         pointer in codespace,
4007         * (aopForRemat): do not use immediate addressing when symbol not in
4008         codespace and when symbol's address is requested,
4009         * (aopOp): for-loop in if(sym->accUse) is modified for the new
4010         accUse size (= 1),
4011         * (aopGet): added case for AOP_ACC and don't return "accumulator
4012         bug" but WREG instead,
4013         * (popGetTempReg): pushes contents of temporary register in stack,
4014         * (popReleaseTempReg): pops contents of temporary register from
4015         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
4016         * (pic16_popGet): separated case AOP_ACC to return register WREG
4017         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
4018         or PO_IMMEDIATE and initializes their instance/offset appropriately,
4019         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
4020         the use of immediate pointers to certain cases only.
4021
4022         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
4023         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
4024         * (assignResultValue, genCall, genRet): modified to use the new
4025         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
4026         genPcall is still broken,
4027         * (genFunction): added code to create 'A' type pBlocks when
4028         interrupt functions are generated, code not extensively tested yet,
4029         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
4030         * (genEndFunction): modified so ISRs pop stored registers from stack,
4031         * (genMultOneByte): cleanup,
4032         * (AccRsh): added flag andmask, to and result with appropriate mask,
4033         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
4034         * (genDataPointerGet): fixed and reenabled its use,
4035         * (genNearDataPointerGet): bugs fixed,
4036         * (genDataPointerSet): bugs fixed,
4037         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
4038         pic16_DumpSymbol, pic16_DumpOp,
4039         * src/pic16/genutils.h: function prototypes for the above functions,
4040         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
4041         pointers,
4042         * (pic16emitRegularMap): many many many improvements, but needs a
4043         major cleanup,
4044         * src/pic16/main.c: enable_stack in pic16_options is removed,
4045         * (_pic16_parseOptions): removed command line options -penable-stack,
4046         * (_process_pragma): emit stack symbol only when stack pragma is
4047         processed,
4048         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
4049         redirected to FSR0L/FSR0H pair,
4050         * (pic16_get_op, pic16_get_op2): modifications and improvements,
4051         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4052         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
4053         for immediates,
4054         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
4055         * (dumpPicOptype): NEW,
4056         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
4057         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
4058         with movff instruction,
4059         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
4060         added pic16_int_regs, some packRegsFor* functions are commented out,
4061         because produce errors,
4062         * src/pic16/NOTES: minor modifications
4063
4064 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4065
4066         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
4067         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
4068         --pack-iram.
4069         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
4070         * as/mcs51/lkaomf51.c: fixed bug #895763
4071
4072 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
4073
4074         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
4075
4076 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4077
4078         * doc/sdccman.lyx: added details about the HC08 storage classes and
4079         interrupts, fixed the register usage info for z80 & gbz80
4080
4081 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
4082
4083         * doc/sdccman.lyx: added more pic16 port documentation
4084         * device/include/pic16/: added header pic18fregs.h
4085
4086 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
4087
4088         * doc/sdccman.lyx: added Vangelis' contribution
4089
4090 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4091
4092         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
4093         extend to the next CALL or PCALL, not just to the next CALL.
4094
4095 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
4096
4097         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
4098
4099 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4100
4101         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
4102         bug #895752 and a better fix for bug #716790
4103
4104 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4105
4106         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
4107
4108 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4109
4110         * doc/sdccman.lyx: minor changes, minor changed
4111
4112 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
4113
4114         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
4115         which can't handle SDCC_NEWONEBYTEOPS,
4116         (geniCodeMultiply): removed conversion from mult to shift for pic14
4117         and pic16
4118
4119 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4120
4121         * src/hc08/gen.h,
4122         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
4123         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
4124         thus fixing bug #895406
4125
4126 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
4127
4128         * device/lib/_modsint.c,
4129         * device/lib/_modslong.c: sign follows divisor only
4130         * src/hc08/gen.c (genMultOneByte): if result size is 1,
4131         signs or signedness can be ignored
4132         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
4133         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
4134         added optimization for IFX,
4135         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
4136         arguments;
4137         reenabled optimization for IFX, which was removed on 2004-01-11
4138         * src/SDCCast.h: added return type IFX
4139         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
4140         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
4141         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
4142         SDCC_OLDONEBYTEOPS selects the old behaviour
4143         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
4144         changed again and commented promotion rule
4145         * src/SDCCval.c (valDiv): promotion no longer necessary
4146         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
4147         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
4148         rewritten
4149         * support/regression/tests/onebyte.c: added
4150
4151 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
4152
4153         * gen.c (genInline): reverted to old code for assemnling inline
4154         code because of bug reported James Chadd
4155
4156 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
4157
4158         * ralloc.h: missing declarations from previous patch,
4159         seems that patch for ralloc.h was never applied, fixed
4160
4161 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4162            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
4163
4164         * pcode.c,
4165         * pcode.h,
4166         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
4167         indirect addressing. Marked FSR0 as deprecated
4168         * gen.c (pointerCode): commented out, not needed now
4169         (pic16_popGet2p): new MOVFF helper function
4170         (genGenPointerGet),
4171         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
4172         (shiftRLong): removed duplicate debugging info
4173
4174 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4175
4176         * src/ds390/gen.c (genNearPointerGet),
4177         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
4178         optimization with bits, but not bitfields.
4179         * src/ds390/ralloc.c (packRegisters),
4180         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
4181
4182 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
4183
4184         * src/SDCCcse.c (algebraicOpts): copy operands before modification
4185
4186 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4187
4188         * src/SDCCsymt.h,
4189         * src/SDCCicode.c (operandFromSymbol),
4190         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
4191         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
4192         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
4193         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
4194         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
4195         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
4196         bug #892038
4197         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
4198         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
4199         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
4200         * src/SDCCsymt.c (newSymbol),
4201         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
4202         enumerator_list),
4203         * src/SDCCval.h,
4204         * src/SDCCval.c (newiList): fixed bug #885705
4205
4206 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4207
4208         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
4209         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
4210
4211 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4212
4213         * device/include/c8051f120.h,
4214         * device/include/c8051f300.h,
4215         * device/include/c8051f310.h: added/updated header files for Silicon
4216         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
4217         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
4218         in new section Submitting patches
4219
4220 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4221
4222         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
4223         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4224         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4225         genGenPointerSet),
4226         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
4227         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4228         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4229         genGenPointerSet),
4230         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
4231         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4232         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4233         genGenPointerSet),
4234         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
4235         genFarPointerGet, genCodePointerGet, genGenPointerGet,
4236         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
4237         genGenPointerSet): fixed bug #892400
4238         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
4239         to eliminate build warnings.
4240         * src/SDCCast.c (processParms),
4241         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
4242         fixed bug 751859
4243         * support/valdiag/valdiag.py: added GCC to the list of defines active
4244         when compiling with gcc
4245
4246 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4247
4248         * support/Util/SDCCerr.h,
4249         * support/Util/SDCCerr.c,
4250         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
4251         with an incomplete type (fixed bug #883734)
4252         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
4253
4254 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4255
4256         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
4257
4258 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4259
4260         * src/SDCCast.c (decorateType),
4261         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
4262         function pointer implementation
4263         * support/regression/tests/funptrs.c: added tests to verify both forms
4264         of function pointers work correctly. Added tests to verify parameters
4265         are passed in the correct order.
4266
4267 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
4268
4269         * device.c (regCompare): registers are sorted by ascending
4270         address and increasing size,
4271         * main.c (_pic16_finaliseOptions): removed the declaration
4272         of compiler macro MCU. Now a macro of the format pic18fxxxx
4273         will be defined from the command line
4274
4275 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
4276             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
4277
4278         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
4279         PCOP_RLCF was overwritten!
4280         * gen.c (genSkip): commented out calls to pic16_emitcode,
4281         * (genCmpEQ): fixed "long" compares, only high word did get compared,
4282         * (genlshTwo),
4283         * (genRRC): added debugging info,
4284         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
4285         overwritten while shifting,
4286         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
4287         overwritten while shifting,
4288         * (AccLsh),
4289         * (AccRsh),
4290         * (shiftLLeftOrResult),
4291         * (shiftRLeftOrResult),
4292         * (shiftRLong),
4293         * (shiftLLong): Implemented with pic16_emitpcode
4294         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
4295         * (genLeftShift): Fixed bug, operand for shift by variable always
4296         was "and"ed with 0x0f,
4297         * (genLeftShiftLiteral),
4298         * (genrshTwo),
4299         * (genRightShiftLiteral): added debugging info,
4300         * (genrshFour): added comment,
4301         * (genRightShift): determined signedness from operand "left"
4302         instead of "result"
4303
4304 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4305
4306         * src/SDCCicode.c (geniCodeParms),
4307         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
4308         function pointers, fixed function pointer bugs #861242 and #861896
4309
4310 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4311
4312         * device/include/c8051f000.h,
4313         * device/include/c8051f120.h,
4314         * device/include/c8051f300.h: added header files for Silicon
4315         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
4316
4317 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
4318
4319         * src/SDCCast.c (processParams): added new type flow and restructured
4320         (gatherAutoInit): added new type flow
4321         (addCast): cosmetic changes
4322         (getLeftResultType): added new type flow for array indices, patch
4323         provided by Stas, see FR #877103
4324         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
4325         array index patch by Stas
4326         * src/SDCCast.h: added prototype getResultTypeFromType()
4327         * src/SDCCval.h,
4328         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
4329         * src/pic/glue.c (pic14emitStaticSeg),
4330         * src/pic16/glue.c (pic16emitStaticSeg),
4331         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
4332         for initialization of symbols
4333         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
4334         * support/Util/SDCCerr.h:
4335         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
4336         * .version: bumped version number to 2.3.8
4337         * device/include/Makefile.in (install),
4338         * doc/Makefile (install): changed to 'rm `find ...`' construct to
4339         avoid warnings
4340
4341 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
4342
4343         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
4344         Slade Rich fixed an optimization bug
4345         * src/pic/pcodepeep.c,
4346         * src/pic/pcoderegs.c
4347         * doc/Makefile (install): added test for directory
4348
4349 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4350
4351         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
4352         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
4353         * src/pic/ralloc.c (getRegPtr, getRegGpr),
4354         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
4355         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
4356         * as/mcs51/asexpr.c (term),
4357         * as/hc08/asexpr.c (term): fixed bug #887146
4358
4359 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4360
4361         * src/z80/gen.c (genMult): handle single byte result product
4362         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
4363         DUMMY_READ_VOLATILE (fixed bug #886367)
4364
4365 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
4366
4367         * support/regression/tests/libmullong.c: fixed logic, on little endian
4368         hosts we ended without a mullong_wrapper()
4369
4370 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4371
4372         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
4373         virus/worm forged address usage.
4374
4375 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
4376
4377         Fixed promotion, it should be done on AST level:
4378         * src/SDCCast.c (addCast): added promotion to int
4379         (decorateType): updated call to upCast()
4380         * src/SDCCicode.c (geniCodeLeftShift): removed call to
4381         usualUnaryConversions()
4382
4383 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
4384
4385         * support/regression/tests/literalop.c (mulWrapper): Added a
4386         wrapper to remove integer overflow warnings.
4387
4388         * support/regression/tests/float_trans.c: Made work on host.
4389
4390         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
4391         location of sz80.
4392
4393         * support/regression/generate-cases.py (main): Changed from inline
4394         to a main method.
4395
4396         * doc/Makefile (install): Changed to depth first to get rid of
4397         missing directory install warning.
4398
4399         * as/Makefile (install-doc): Made work on Mac.
4400
4401 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
4402
4403         * src/SDCCast.c: added an additional type flow in decorateType() of
4404         opposite direction, see feature request #860006; it's enabled at runtime
4405         by setting the environment variable SDCC_NEWTYPEFLOW
4406         * src/SDCCast.h: changed prototype of decorateType()
4407         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
4408         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
4409         'char' to 'int' can be omitted, if both operands are 'unsigned char';
4410         see feature request #877103
4411         * src/SDCCval.c: updated call of decorateType()
4412         (valBitwise): fixed bug #882876
4413         (valMinus): added promotion
4414         (valLogicAndOr): result is unsigned
4415         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
4416         * src/SDCCsymt.c (computeType),
4417         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
4418         must not cause an unsigned operation
4419         * src/pic/glue (pic14emitRegularMap),
4420         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
4421
4422 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
4423
4424         * src/pic/pcode.c (PCodeID): commented out left over debug code
4425
4426 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
4427
4428         * support/valdiag/tests/overflow.c: added shift tests
4429         * src/pic/device.c,
4430         * src/pic/gen.c,
4431         * src/pic/gen.h,
4432         * src/pic/glue.c,
4433         * src/pic/main.c,
4434         * src/pic/pcode.c,
4435         * src/pic/pcode.h,
4436         * src/pic/pcodepeep.c,
4437         * src/pic/pcoderegs.c,
4438         * src/pic/ralloc.c,
4439         * src/pic/ralloc.h: applied patch from Slade Rich;
4440         added support for multiple code pages and multiple RAM banks on the
4441         PIC 14 port. The ASM files now no longer simply assume all the
4442         code / RAM are in the same page / bank. This means the linker can
4443         safely allocate code/RAM of separate ASM files to different pages/banks.
4444         * doc/sdccman.lyx: added Slade's tips
4445         * src/mcs51/peeph.def: fixed bug #880768
4446
4447 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4448
4449         * src/hc08/ralloc.c (rematStr): fixed bug #879282
4450         * src/SDCCast.c (decorateType): fixed bug #880197
4451
4452 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
4453
4454         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
4455         getopt.h.
4456
4457         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
4458         strtof is not part of C89 and isn't included with Mac OS X.
4459
4460 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4461
4462         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
4463         shiftL2Left2Result): fixed bug #879326
4464         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
4465         (genMultOneByte): fixed bug in signed vs unsigned multiplication
4466         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
4467         address fetch for clr instruction
4468         * device/lib/hc08/_mulint.c: created optimized assembly version
4469         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
4470
4471 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
4472
4473         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
4474         proposed in FR #877103
4475
4476 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
4477
4478         * src/SDCCval.c (cheapestVal): added missing checks
4479         * src/SDCCicode.c (usualBinaryConversions): fixed condition
4480         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
4481
4482 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
4483
4484         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
4485         equal operands
4486
4487 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
4488
4489         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
4490         loaded with the linker search paths (-L arguments) and the libraries
4491         to be linked with the current source (-l arguments). Changes
4492         currently will affect only the pic16 port.
4493         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
4494         include path the port specific paths and port specific libraries,
4495         * gplink command now contains the $3 argument,
4496         * src/pic16/device.h,
4497         * src/pic16/device.c,: structure PIC_device is made public and
4498         renamed to PIC16_device, the same for variable Pics which is renamed
4499         to Pics16. Updated all references to them.
4500         * src/pic16/glue.c (pic16glue): corrected bug with code
4501         initialization which bypassed the variable initializations block.
4502
4503         * device/lib/pic16/Makefile.rules: removed --penable-stack from
4504         COMPILE_FLAGS and added the --nostdinc option
4505
4506 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4507
4508         * device/include/mc68hc908jb8.h: Register defs for another member
4509         of the hc08 family. Contributed by Bjorn Bringert - thanks!
4510
4511 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
4512
4513         Documenting changes from previous commits.
4514         * configure.in (version 1.56),
4515         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
4516         when generating output files to configure the pic16 library,
4517         but now I've commented it out, since gputils aren't installed in the
4518         SF compile farm, so library won't compile
4519
4520         * device/lib/Makefile.in (version 1.56): initially I've added in
4521         target 'all' the prerequestive 'model-pic16' so it compiled the
4522         pic16 library, but now I've commented it out for the same reasons
4523         above,
4524         * added targets 'model-pic16' and 'objects-pic16' to compile the
4525         library
4526         * added target 'port-specific-objects-pic16' to handle the
4527         generated libraries and copy them into the build/ directory
4528         * added target 'clean-intermediate-pic16' to clean intermediate
4529         files into pic16 directory
4530         * in target 'installdirs' added line to create directory pic16 in
4531         the installation path
4532
4533         * device/include/Makefile.in (version 1.11): in target 'install'
4534         added lines to copy all header files to installation path,
4535         * in target 'installdirs' added line create directory for pic16
4536         headers in the installation path
4537
4538 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
4539
4540         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
4541          a function call
4542
4543 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
4544
4545         * configure,
4546         * device/lib/configure.in,
4547         * device/lib/configure: fixed for autoconf 2.57
4548
4549 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4550
4551         * src/z80/main.c (_parseOptions): fixed the portmode= command line
4552         option so that it actually works. Made it specific to the z80, since
4553         the gbz80 doesn't have these kinds of I/O ports.
4554
4555 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4556
4557         * device/include/z180.h,
4558         * device/lib/_memcpy.c,
4559         * device/lib/_memmove.c,
4560         * device/lib/_mulint.c,
4561         * device/lib/ser_ir.c,
4562         * device/lib/ser_ir_cts_rts.c,
4563         * device/lib/_strcmp.c,
4564         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
4565         * src/z80/main.c (_process_pragma): add support for pragmas bank and
4566         portmode; added deprecation warning for bank= and protmode= forms.
4567         Also, guard against buffer overflow.
4568         * src/z80/gen.c (aopGet): generate better code for sfr banked read
4569
4570 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4571
4572         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
4573         changed interrupt vector table generation to only emit declared vectors.
4574         * device/include/Makefile.in: added missing backslash
4575         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
4576
4577 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
4578
4579         Mainly changes to support compilation of the device libraries
4580         * src/pic16/device.c: stack is allocated via symbol and not
4581         via literal number. The symbol is placed in the corresponding
4582         position of the data ram
4583         * (pic16_dump_section): relocatable and absolute uninitialized
4584         data are now emitted in sorted order to reduce section naming,
4585         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
4586         weren't marked as being in the access bank,
4587
4588 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
4589
4590         Added portion of GNU PIC Library under the directory
4591         device/include/pic16 and device/lib/pic16. These files
4592         contain the declarations of SFRs for the PIC18Fxx2 devices.
4593         The directory is initialized via configure from toplevel.
4594
4595 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
4596
4597         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
4598         the spilllocations to be compared correctly
4599
4600 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
4601
4602         * src/SDCCast.c (decorateType): fixed bug introduced today
4603
4604 2004-01-12  Borut Razem <borut.razem AT siol.net>
4605
4606         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
4607         doc/sdccman.lyx: upper case pragmas are deprecated
4608
4609 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
4610
4611         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
4612         in simpler and even better code
4613
4614 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
4615
4616         * src/SDCCicode.c (operandOperation): fixed bug #874819
4617         * src/SDCCast.c (decorateType): fixed
4618         char foo (unsigned long ul) { return ul > 0; }
4619
4620 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4621
4622         * doc/sdccman.lyx: Moved and added some sections, small changes
4623         all over. Telling LaTeX to be less strict with word spacing
4624         to better keep the right margin. Changed some notes about
4625         maintainance of the ports in section 3.2.1 - is it OK like this?
4626
4627 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
4628
4629         SDCC source changes:
4630         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
4631         convilong): modified to inform the pic16 port that builtin functions
4632         are external
4633
4634         PIC16 PORT specific changes:
4635         * src/pic16/device.c pic16_dump_equates() added,
4636         processor registers declared internally by the port are emitted in
4637         the translation as equates,
4638         * src/pic16/gen.c: inline code is passed unprocessed to the
4639         translation,
4640         * (pic16_popGetLit2): fnuction modified to take second operand as
4641         pCodeOp pointer and not as literal,
4642         * (popRegFromIdx): prefixed with pic16_,
4643         * (pic16_popCombine2): modified to receive already allocated pCode
4644         operands,
4645         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
4646         * (genFunction): initializes local stack frame and pushes on stack
4647         all the registers used by this function,
4648         * (genEndFunction): restores all registers from stack and restores
4649         stack frame,
4650         * src/pic16/glue.c (pic16emitRegularMap): various changes and
4651         improvements,
4652         * (pic16glue): changed the program startup sequence,
4653         * added new dbName code 'A' for functions placed in absolute section
4654         * src/pic16/main.c: added function attribute _naked,
4655         * added pragma 'code' to place a fnuction at an absolute address,
4656         * added command line arguments --debug-ralloc and --pcode-verbose,
4657         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
4658         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
4659         * (pic16_newpCodeOpLit2): modified to take the second operand as
4660         pCodeOp pointer,
4661         * (pic16_printpBlock): modified to emit each function in a separate
4662         section,
4663         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
4664         UPPER for immediate operands,
4665         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
4666         instruction,
4667         * src/pic16/peeph.def: all peepholes with movff are commented out,
4668         because there is a problem in the pcode peep optimizer,
4669         * src/pic16/ralloc.c: the register allocator can now reuse local
4670         function symbols for another function. This saves register usage.
4671         * src/pic16/ralloc.h: added flag isLocal in structure regs,
4672
4673         Added file src/pic16/NOTES with information about program writing on
4674         the current port version.
4675
4676 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4677
4678         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
4679         and peephole 252 (array access)
4680
4681 2004-01-09  Borut Razem <borut.razem AT siol.net>
4682
4683         * src/SDCCmain.c : fixed #872250: -l command line defined library
4684           files are scanned before standard library files
4685
4686 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4687
4688         * src/SDCCast.c (decorateType): fixed bug #874046
4689
4690 2004-01-09  Borut Razem <borut.razem AT siol.net>
4691
4692         * support/scripts/sdcc.nsi: remove previous installation
4693
4694 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4695
4696         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
4697         bytes for last interrupt vector (mcs51)
4698         * sdcc.spec: fixed typo
4699
4700 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4701
4702         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
4703         gen51Code): more efficient parameter receive for --model-large
4704         ("bug" #845294)
4705
4706 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4707
4708         * src/ds390/main.c,
4709         * src/z80/main.c: added missed needLinkerScript flags (more than
4710         one port structure defined in these file)
4711         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
4712         bug #795325
4713
4714 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
4715
4716         * src/SDCCmain.c: removed various references to DEFAULT_PORT
4717         * src/port.h: added flag needLinkerScript in port->linker
4718         structure to inform whether to create a .lnk file or not,
4719         * src/avr/main.c,
4720         * src/ds390/main.c,
4721         * src/hc08/main.c,
4722         * src/mcs51/main.c,
4723         * src/pic/main.c,
4724         * src/pic16/main.c,
4725         * src/xa51/main.c,
4726         * src/z80/main.c: changed appropriately to configure
4727         needLinkerScript flag
4728         * src/pic/gen.c,
4729         * src/pic16/gen.c (genAddrOf): fixed bug #863624
4730         * src/pic/glue.c: added variable udata_section_name to
4731         override default uninitialized data segment definition for
4732         devices only with SHAREBANK memory (reported from Erik Epetrich)
4733         * (pic14emitOverlay): modified to emit a commented overlay segment
4734         directive when no overlay data exist
4735         * (picglue): modified to emit uninitialized data segment
4736         according to udata_section_name
4737         * src/pic/main.c (_pic14_parseOptions): added command line
4738         options --udata-section-name=[name] to override default
4739         udata definition name
4740         * modified _linkCmd and _asmCmd to include compiler passed
4741         arguments via -W option
4742         * src/pic16/main.c: added $l in _asmCmd, changed extension for
4743         object file from '.rel' to '.o' in port->linker structure,
4744         changed size of fptr from 2 to 3 in port structure
4745
4746 2004-01-07  Borut Razem <borut.razem AT siol.net>
4747
4748         * support/scripts/sdcc.nsi: update PATH
4749         * support/scripts/sdcc.ico: craeted
4750
4751 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
4752
4753         * device/include/Makefile.in: fix install
4754         * doc/Makefile: fix install
4755
4756 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4757
4758         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
4759         in bug #860505
4760         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
4761         how the function variable allocation summary is displayed; also
4762         include information about variables allocated to the overlay
4763         segment
4764
4765 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4766
4767         * as/mcs51/lkmain.c: Help about -Y option
4768         * as/mcs51/lkarea.c: Fixed gcc warnings
4769
4770 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
4771
4772         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
4773         fixed warning
4774         * support/valdiag/tests/overflow.c: added
4775         * src/SDCCast.c (decorateType),
4776         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
4777         LEFT_OP (left shift)
4778
4779 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4780
4781         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
4782         (default behaviour).
4783
4784 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4785
4786         A python script to validate compiler diagnostic messages. It can be
4787         used to verify that sdcc complains about bad c source code and
4788         gives a good location of the error.
4789         * support/valdiag/Makefile,
4790         * support/valdiag/valdiag.py,
4791         * support/valdiag/tests/*
4792
4793 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4794
4795         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
4796         * src/SDCCsymt.c (newEnumType),
4797         * src/SDCCsymt.h
4798         * support/Util/SDCCerr.c,
4799         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
4800         enum related bugs.
4801         * support/regression/tests/enum.c: added test for enum values that
4802         require at least 2 bytes of storage.
4803
4804 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
4805
4806         * src/common.h: added ifndef/define/endif macros
4807         around the header file.
4808         Bug reported from Jesus Calvino-Fraga
4809
4810 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
4811
4812         * sdcc.spec: updated
4813         * device/include/Makefile.in: don't install CVS directories
4814         * device/lib/Makefile.in: added removal of CVS directories after install
4815         * doc/Makefile: fixed install, added local_icons
4816         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
4817         * src/mcs51/gen.c (genRightShift): fixed bug #870788
4818         * src/ds390/gen.c (genRightShift): fixed bug #870788
4819         * src/SDCCast.c (decorateType): fixed bug #870781
4820
4821 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
4822
4823         PIC16 port related changes:
4824         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
4825         added variable stackPos,
4826
4827         * gen.c: genCall, assignResultValue: added support for
4828         pushing/retrieving function parameters to/from stack,
4829         genFunction,genEndFunction: setup stack frame for the
4830         generated function,
4831         genAddrOf: will be changed according to bug 863624
4832
4833         * added files genutils.c and genutils.h which contain gen*
4834         debugged and optimised functions extracted from gen.c
4835
4836         * glue.c: added variable 'externs' which holds extern symbols,
4837         pic16emitRegularMap: is modified to properly handle relocatable
4838          symbols under the new scheme,
4839         pic16createInterruptVect: is modified
4840         pic16printPublics: is modified to emit 'global' assembler directives,
4841         added pic16_printExterns to print extern symbols,
4842         pic16glue: initializes stack/frame pointer in the beginning of
4843         the assembly output. Temporary hack, will be corrected later,
4844         because gplink yet does not support stack and SDCC does not
4845         yet support a type of crt0.o object to create the final binary.
4846
4847         * Removed many lines that contain 8051 legacy code.
4848         * The code is finally placed under a 'code' directive.
4849         * Added port specific options.
4850
4851         * _process_pragma: simplified since now we do not need *special*
4852         include file to define SFR registers. But a separate header
4853         will be needed. This will be developed later.
4854         * _pic16_parseOptions: added, parses port specific options:
4855         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
4856         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
4857         --preplace-udata-with=
4858
4859         * _pic16_setDefaultOptions: modified to initialize section names,
4860         but hack is temporarly out of order since it needs improvement.
4861         * _pic16_genAssemblerPreamble: configuration words are emitted by
4862         their address instead of their name. This part is incomplete and
4863         supports only the 18Fxx2 devices. Other devices will emit an error
4864         during assembly since they do not contain the same set of config
4865         registers
4866         * _pic16_genIVT: is modified,
4867
4868         * pcode.c: added definitions for some hardware registers that are needed
4869         for stack support
4870         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
4871         All PCI entries are updated. Now LFSR is supported.
4872         * Removed pic16_pciTRIS is mentioned by mdubuc in source
4873         * added pic16_newpCodeOpLit2 to support instructions with
4874         two literal arguments
4875         * pic16_pCode2str: corrected code that emits assembler instructions
4876         with two literal operands and those that have an access bit modifier
4877         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
4878         this fixes a bug which caused some labels to be lost, when an
4879         assembler directive was added, i.e. banksel,
4880         * pic16_FixRegisterBanking: improved logic that causes the insertion
4881         of bank switching,
4882         * InlineFunction: functions that are called once, are not any more
4883         inlined. This can be a port option in the future,
4884
4885         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
4886
4887         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
4888         hold the corresponding uninitialized symbols,
4889         * pic16_allocProcessorRegister: registers have explicit marked the
4890         accessBank field,
4891         * pic16_allocInternalRegister: registers are explicit marked as
4892         not used,
4893         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
4894         processing list, so bit registers were lost,
4895         *
4896
4897         * ralloc.h: added field 'accessBank' and original symbol operand
4898         in register definition,
4899         * removed the field isMapped from register definition,
4900
4901         ** Several functions have been removed from various sources:
4902         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
4903         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
4904         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
4905         pic16_assignRelocatableRegisters
4906
4907         ** others have been introduced:
4908         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
4909         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
4910
4911 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
4912
4913         * support/scripts/inc2h.pl: changed definition of BIT_AT
4914         to emit 'sbit at' instead of 'bit at'. This was a request.
4915
4916         PIC16 port related preliminary changes:
4917         * gen.c: prefixed function popRegFromString with
4918         pic16_ and all references to it corrected
4919         * pcode.c: all pic16_pc_* hardware registers prefixed
4920         with underscore (_),
4921         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
4922         * ralloc.c: newReg(): when register is REG_SFR then
4923         set address to rIdx,
4924         pic16_allocProcessorRegister(): marks register wasUsed=0
4925         pic16_writeUsedRegs(): added a call to assign processor
4926         registers via pic16_assignFixedRegisters
4927
4928 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4929
4930         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
4931         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
4932         variables in unused register banks.  Also the SSEG is placed
4933         wherever there is enough space for it, and IDATA can be anywhere
4934         in internal RAM.  For now compile using -Wl-Y[stack_size].
4935         The mem file is different for this option as well, since it
4936         makes no sense of talking about DSEG lenght.
4937
4938 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
4939
4940         * src/SDCClrange.c: fixed bug 869095 that caused segfault
4941         in certain cases, e.g. when ROM assignment, patch provided
4942         from Albert den Haan.
4943
4944 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
4945
4946         Many signedness and type propagation fixes:
4947         * src/SDCCicode.c: made geniCodeCast() static
4948         replaced SPEC_ by IS_ (cosmetic)
4949         (operandOperation): fixed div and mod operation
4950         (usualBinaryConversions): added support for promotion of char
4951         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
4952         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
4953         (geniCodeAdd): an array index will stay unsigned, even if promoted
4954         from char to int
4955         (geniCodeArray): ditto
4956         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
4957         * src/SDCCsymt.c (computeType): added more support for char;
4958         promotion of char is selectable by promoteCharToInt, fixed signedness
4959         for all cases
4960         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
4961         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
4962         * src/SDCCval (val*): replaced signedness calculation by
4963         computeType()
4964         rearranged if-branches (cosmetic)
4965         (valShift): added warning W_SHIFT_CHANGED
4966         (valCompare): fixed problem with different types
4967         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
4968         * support/regression/tests/literalop.c: added many cases
4969         * support/regression/tests/ast_constant_folding.c: changed finally to
4970         'unsigned int'
4971         * .version: new year, new version: 2.3.7
4972         * src/SDCCmain.c (main): applied patch #866468
4973         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
4974         provided by Scott Bronson
4975         * doc/sdccman.lyx: updated documentation for sdcdb
4976         updated and added chapter tips
4977
4978 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4979
4980         * src/SDCCsymt.h: missing from yesterday's commits
4981
4982 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4983
4984         * src/SDCC.y (struct_or_union_specifier),
4985         * support/Util/SDCCerr.c,
4986         * support/Util/SDCCerr.h: verify that struct & union tags are used
4987         as declared.
4988
4989 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4990
4991         * src/SDCCglobl.h: missing from yesterday's commits
4992
4993 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4994
4995         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
4996         sft_attributes, struct_declaration, parameter_declaration,
4997         type_name, start_block, declaration_list),
4998         * src/SDCC.lex (check_type): support redefinition of typedef names
4999
5000 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5001
5002         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
5003         aligned xdata arrays. Erik helped me with the if clause.
5004
5005 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5006
5007         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
5008         warning
5009
5010 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5011
5012         * src/SDCCast.h,
5013         * src/SDCCast.c (newAst_),
5014         * src/SDCCicode.h,
5015         * src/SDCCicode.c (ast2iCode, newiCode),
5016         * src/SDCCglobl.h,
5017         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
5018         expr, statement, expression_statement, selection_statement,
5019         iteration_statement, expr_opt, jump_statement): foundation for tracking
5020         sequence points
5021         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
5022         point code too)
5023
5024 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5025
5026         * support/Util/SDCCerr.c,
5027         * src/SDCCast.h,
5028         * src/SDCCast.c (createCase, createDefault, decorateType),
5029         * src/SDCClabel.c (labelUnreach),
5030         * src/SDCC.y (labeled_statement, jump_statement): More improvements
5031         to error messages.
5032         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
5033         (with thanks to Stas Sergeev)
5034         * device/include/time.h,
5035         * device/lib/time.c (CheckTime): suppress unreachable code warning
5036
5037 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5038
5039         * src/SDCCast.c (createIvalCharPtr),
5040         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
5041         bug #753752)
5042         * support/regression/tests/nullstring.c: tests for these two bugs
5043
5044 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5045
5046         * support/Util/SDCCerr.h,
5047         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
5048         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
5049         about storage class and 'at' used inside struct or union
5050         * src/SDCCBBlock.c (iCodeFromeBBlock),
5051         * src/SDCCcse.c (ifxOptimize),
5052         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
5053         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
5054         printIval, emitStaticSeg, emitOverlay),
5055         * src/SDCClabel.c (deleteIfx),
5056         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
5057         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
5058         gatherAutoInit, processParms),
5059         * support/Util/SDCCerr.h,
5060         * support/Util/SDCCerr.c (werrorfl): Support for better error location
5061         reporting for post-parse errors.
5062
5063 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5064
5065         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
5066         implicit casts via union; they don't work on big endian systems
5067         (possible fix for bug #861138)
5068
5069 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5070
5071         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
5072         * src/mcs51/main.c: fixed the fix for bug #737001
5073
5074 2003-12-15  Borut Razem <borut.razem AT siol.net>
5075
5076         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
5077
5078 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5079
5080         * support/makebin/makebin.c: put output in binary mode
5081
5082 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5083
5084         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
5085         xdata and data memory on startup. Set the environment variable
5086         SDCC_NOGENRAMCLEAR to disable this.
5087         * src/mcs51/peephole.def,
5088         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
5089         (allows non-interrupt and interrupt code to safely compete for a resource
5090         without the non-interrupt code having to disable interrupts)
5091
5092 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5093
5094         * src/SDCCicode.c (geniCodeAdd),
5095         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
5096         with valFromType if type might be a pointer and host is big endian).
5097         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
5098         types, not just integer types.
5099         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
5100         multiply defined with mismatching "at" address.
5101
5102 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5103
5104         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
5105         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
5106         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
5107         with embedded nulls (fixed bug #753752)
5108
5109 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5110
5111         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
5112         Apparently this did not see much testing (endless loop)
5113
5114 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5115
5116         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
5117
5118 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5119
5120         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
5121         gracefully handle NULL memmap pointers
5122
5123 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5124
5125         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
5126         instead of deleting the iCode when an operand is volatile
5127         * src/z80/gen.c (genDummyRead),
5128         * src/mcs51/gen.c (genDummyRead),
5129         * src/ds390/gen.c (genDummyRead),
5130         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
5131         not just IC_RIGHT
5132         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
5133         * src/SDCC.y: fixed bug #850420
5134
5135 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5136
5137         Applied z80 i/o port patch from Peter Townson and fixed some operators
5138         to better handle operands in A register.
5139         * device/include/z180.h
5140         * src/SDCC.y
5141         * src/SDCCglue.c
5142         * src/z80/gen.c
5143         * src/z80/gen.h
5144         * src/z80/main.c
5145         * src/z80/peeph-z80.def
5146         * src/z80/peeph.def
5147         * src/z80/z80.h
5148
5149 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5150
5151         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
5152
5153 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5154
5155         * device/lib/hc08/_mullong.c: Removed extra #endif
5156
5157 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5158
5159         * sim/ucsim/hc08.src/inst.cc,
5160         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
5161         carries from x to h
5162         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
5163         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
5164         * device/include/stdarg.h: fixed varargs for hc08
5165         * device/lib/Makefile.in,
5166         * device/lib/hc08/Makefile,
5167         * device/lib/hc08/_mulint.c,
5168         * device/lib/hc08/_mullong.c: fixed some endian problems
5169
5170 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5171
5172         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
5173         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
5174         * device/lib/_gptrget.c,
5175         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
5176
5177 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5178
5179         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
5180         * src/SDCCast.c (astErrors): fixed bug #846007
5181         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
5182
5183 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5184
5185         * src/SDCCast.c (decorateType): disabled a transformation I added in
5186         revision 1.188 (access to fields of a structure at an absolute address);
5187         it breaks with bitfields, extern declarations, and gcse analysis.
5188         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
5189         could be assigned through a pointer, so don't complain.
5190         * src/SDCCast.c (astErrors),
5191         * src/SDCCast.h,
5192         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
5193
5194 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
5195
5196         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
5197         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
5198         output of __config directives, since gpasm now supports them
5199         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
5200         pre-processor macro, i.e. -DMCU=p18f452
5201         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
5202         and modified to handle 'cast' icode similarly to '=' icode
5203         * src/pic16/device.h (typedef struct PIC_device): added field
5204         'extMIface' to indicate that chip has external memory interface
5205         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
5206         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
5207         18F8720
5208
5209 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5210
5211         * src/SDCC.y (pointer): fixed bug #846006
5212         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
5213         * src/SDCCast.c (decorateType): fixed bug #846009
5214         * src/ds390/peeph.def,
5215         * src/ds390/gen.c (genAnd, genOr),
5216         * src/mcs51/peeph.def,
5217         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
5218
5219 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5220
5221         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
5222         * src/SDCCdflow.c
5223         * src/SDCCcse.c
5224         * src/SDCCcse.h
5225         * src/SDCCBBlock.h
5226         * src/SDCCBBlock.c
5227
5228 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
5229
5230         fixed bug #845089
5231         * src/SDCCbitv.h,
5232         * src/SDCCbitv.c: added function to free a bitvector
5233         * src/SDCClrange.h,
5234         * src/SDCClrange.c: added function to recompute the liveranges
5235         * src/avr/ralloc.c,
5236         * src/ds390/ralloc.c,
5237         * src/hc08/ralloc.c,
5238         * src/mcs51/ralloc.c,
5239         * src/pic/ralloc.c,
5240         * src/pic16/ralloc.c,
5241         * src/xa51/ralloc.c,
5242         * src/z80/ralloc.c: recompute the liveranges after register packing
5243
5244 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
5245
5246         * src/SDCCloop.c (newInduction): fixed bug #845630
5247
5248 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5249
5250         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
5251         inadvertantly left behind from my 2003-11-12 change
5252
5253 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5254
5255         Updated headers I neglected to commit yesterday.
5256         * src/SDCClrange.h,
5257         * src/SDCCicode.h
5258
5259 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5260
5261         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
5262         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
5263         * src/SDCCopt.c (eBBlockFromiCode),
5264         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
5265         the creation of the key hash table from the sequencing so it can be used
5266         earlier (for some GCSE bug fixes still pending)
5267
5268 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5269
5270         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
5271         * support/regression/tests/addsub.c: testing genPlus shortcut
5272
5273 2003-11-15  Borut Razem <borut.razem AT siol.net>
5274
5275         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
5276
5277 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5278
5279         * src/SDCCcse.c (cseBBlock): fixed bug #527779
5280         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
5281         ordering is immaterial.
5282         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
5283
5284 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5285
5286         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
5287         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
5288         (SIGSEV) of bug #840381
5289         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
5290         unlink new file before rename if new and old filenames are the same)
5291
5292 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5293
5294         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
5295         uninitialized variables) for the mcs51. Set environment variable
5296         SDCC_GENRAMCLEAR to test.
5297         xdata initialization slightly shorter
5298
5299 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5300
5301         * src/SDCCsymt.h,
5302         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
5303         #838241 & 780691 (basicly the same bug)
5304         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
5305         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
5306
5307 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
5308
5309         * src/SDCCmain.c (linkEdit): "fix" #834252
5310
5311 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5312
5313         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
5314         * src/SDCCast.h,
5315         * src/SDCC.y: fixed bug #819403
5316
5317 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5318
5319         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
5320         the reentrant attribute.
5321         * src/hc08/gen.c (genPackBits): added missing stack readjustment
5322         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
5323         simulation
5324         * src/SDCCast.c (decorateType): fixed bug with storage class not being
5325         updated during pointer dereference; f.e. ~(((char *)1)*) was being
5326         erroneously reduced to a literal.
5327         * src/hc08/ralloc.c (packRegisters, rematStr),
5328         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
5329         some cases
5330
5331 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5332
5333         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
5334         * doc/sdccman.lyx: changed from 'article' to 'book'
5335         * doc/Makefile: readded test_suite_spec and cdbfileformat
5336
5337 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
5338
5339         * device/include/stdlib.h: include malloc.h to comply with ANSI
5340         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
5341
5342 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5343
5344         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
5345         * doc/clean.mk: also remove *.out files
5346         * doc/sdccman.lyx: some additions, larger top/bottom margins
5347
5348 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5349
5350         * src/SDCC.y: fixed bug #837365
5351         * support/regression/tests/bitopcse.c
5352         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
5353         a symbol (might be valop instead)
5354         * device/lib/Makefile.in: added errno.c to HC08SOURCES
5355         * device/lib/clean.mk: added hc08 to the cleaning list
5356
5357 2003-11-04  Borut Razem <borut.razem AT siol.net>
5358
5359         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
5360           made 2003-11-04
5361         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
5362           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
5363           malloc is declared in standard stdlib.h
5364
5365 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5366
5367         * device/lib/hc08/Makefile: need to clean .rel not .o files
5368         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
5369
5370 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5371
5372         * src/port.h,
5373         * src/hc08/main.c,
5374         * src/mcs51/main.c,
5375         * src/ds390/main.c,
5376         * src/z80/main.c,
5377         * src/avr/main.c,
5378         * src/pic/main.c,
5379         * src/pic16/main.c,
5380         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
5381         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
5382         tests (which uses the port's oclsExpense function)
5383         * src/SDCC.y,
5384         * src/SDCCast.c,
5385         * src/SDCCicode.c,
5386         * src/hc08/gen.c,
5387         * src/ds390/gen.c,
5388         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
5389
5390 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5391
5392         * src/SDCCcse.c (ifxOptimize),
5393         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
5394         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
5395         deleting the IFX iCode.
5396         * src/hc08/ralloc.c: reduced unneeded slocs
5397         * src/hc08/gen.c: fixed bug in asmopToBoolean
5398
5399 2003-11-04  Borut Razem <borut.razem AT siol.net>
5400
5401         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
5402           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
5403           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
5404           transferred to configure
5405
5406 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
5407
5408         Use headers defined in the C[++] standards:
5409         * sim/ucsim/gui.src/serio.src/fileio.cc
5410         * sim/ucsim/gui.src/serio.src/frontend.cc
5411         * sim/ucsim/gui.src/serio.src/main.cc
5412         * sim/ucsim/gui.src/serio.src/posix_signal.cc
5413         * support/Util/NewAlloc.c
5414         * as/hc08/lklibr.c
5415         * as/mcs51/lklibr.c
5416         * as/z80/aslist.c
5417         * as/z80/assym.c
5418
5419 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5420
5421         * Added MSVC projects for hc08 assembler and linker:
5422         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
5423         /as/hc08/link_hc08.dsp
5424
5425 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
5426
5427         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
5428
5429 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
5430
5431         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
5432
5433 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5434
5435         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
5436
5437 2003-10-31  Borut Razem <borut.razem AT siol.net>
5438
5439         * support/cpp2/cpplib.h,
5440           support/cpp2/cpplib.c,
5441           support/cpp2/cpplex.c,
5442           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
5443           to switch _asm block preprocessing on / off. Default is
5444           #pragma preproc_asm +
5445
5446 2003-10-31  Borut Razem <borut.razem AT siol.net>
5447
5448         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
5449           when outputting comment blocks (when executed with -C option) and
5450           _asm (SDCPP specific) blocks
5451
5452 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5453
5454         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
5455
5456 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
5457
5458         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
5459
5460 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
5461
5462         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
5463         * src/SDCCast.c (decorateType): fixed bug #832664
5464
5465 2003-10-31  Borut Razem <borut.razem AT siol.net>
5466
5467         * support\cpp2\cpplex.c: fixed for SDCPP:
5468           comments(when executed with -C option) and _asm blocks
5469           were included even if they where in skipped #if block.
5470           Applied solution from GCC cpp 3.3.2
5471
5472 2003-10-31  Borut Razem <borut.razem AT siol.net>
5473
5474         * src/SDCC.lex: sdcc now understands both formats:
5475           '# <line_number> <file_name>' and
5476           '#line <line_number> <file_name>'
5477         * support/cpp2/cppmain.c: sdcpp now generates the standard
5478           '# <line_number> <file_name>' instead of former
5479           '#line <line_number> <file_name>'
5480
5481 2003-10-30  Borut Razem <borut.razem AT siol.net>
5482
5483         * support/cpp2/cpphash.h,
5484         * support/cpp2/cpplib.h
5485         * support/cpp2/cpplex.c,
5486         * support/cpp2/cppmain.c,
5487         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
5488
5489 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5490
5491         Fixed a number of problems revealed by bug #827883.
5492         * src/SDCCloop.c (loopInvariants): Spill location of the
5493         result operand should be recomputed if extracted from
5494         a loop. Also, don't extract assignments of an iTemp
5495         from a literal.
5496         * src/SDCCast.c (isConformingBody): loop reversal should
5497         not occur if the control variable is involved with a
5498         relational operator.
5499
5500 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
5501
5502         * .version: bumped to 2.3.6 to reflect the big improvements
5503         made by Erik and Klaus. Thanks!
5504
5505 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
5506
5507         Replaced the livrange code.
5508         * src/SDCClrange.c: added new LR code
5509         * src/SDCCloop.c,
5510         * src/SDCCBBlock.h: removed remainig parts from old LR code
5511         * src/ds390/ralloc.c,
5512         * src/ds390/gen.c: minor fixes to make it work with new code
5513
5514 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5515
5516         * as/hc08/asm.h,
5517         * as/hc08/lkrloc.c,
5518         * src/hc08/gen.c,
5519         * src/hc08/ralloc.c: Fix various warnings related to the hc08
5520         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
5521         (tweaked fix for bug #818696)
5522
5523 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5524
5525         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
5526
5527 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5528
5529         * src/SDCCmain.c,
5530         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
5531         * src/mcs51/gen.c (gencjneshort),
5532         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
5533         more efficient (per Scott Bronson's suggestion)
5534
5535 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5536
5537         Extended the semantics of the critical keyword to include
5538         individual statements. See RFE #827755 and #799831
5539         * src/SDCC.y
5540         * src/SDCCicode.c
5541         * src/SDCCopt.c
5542         * src/SDCCast.c
5543         * support/Util/SDCCerr.c
5544         * support/Util/SDCCerr.h
5545         * src/mcs51/gen.c
5546         * src/ds390/gen.c
5547         * src/hc08/gen.c
5548
5549 2003-10-19  Borut Razem <borut.razem AT siol.net>
5550
5551         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
5552
5553 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5554
5555         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
5556         Fixed bug #818696
5557         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
5558         and predecrement operand is displayed
5559
5560 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
5561
5562         * src/SDCCval.c (valMinus): fixed bug #826041
5563
5564 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5565
5566         Some hc08 related updates that I missed earlier
5567         * sim/ucsim/stypes.h
5568         * support/regression/ports/hc08/spec.mk
5569
5570 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5571
5572         New target "hc08" for the Motorola 68hc08 family of micros
5573
5574         * configure
5575         * configure.in
5576         * Makefile
5577         * src/hc08/*
5578         * src/SDCCmain.c
5579         * src/port.h
5580         * sim/ucsim/hc08.src/*
5581         * sim/ucsim/configure.in
5582         * src/ucsim/configure
5583         * sim/ucsim/packages_in.mk
5584         * as/hc08/*
5585         * as/Makefile
5586         * device/include/mc68hc908qy.h
5587         * device/lib/hc08/*
5588         * device/lib/Makefile.in
5589         * support/regression/ports/hc08/*
5590         * support/regression/Makefile
5591
5592 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5593
5594         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
5595         regression test
5596         * src/ds390/gen.c (genCast): fixed bug #821957
5597
5598 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
5599
5600         * device/lib/logf.c: "fixed" overlay bug
5601         * support/regression/ports/host/spec.mk: added m library
5602         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
5603         * support/regression/tests/float_trans: added (for Eric)
5604
5605 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
5606
5607         * src/mcs51/gen.c (genCpl): fixed bug
5608         http://sf.net/mailarchive/message.php?msg_id=6263915
5609
5610 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
5611
5612         * src/SDCCast.c (decorateType): added extended constant folding
5613         * src/SDCCsymt.c (computeType): cleanup
5614         * src/SDCCval.c (valShift): minor optimization
5615         * support/regression/tests/ast_constant_folding.c: added
5616
5617 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5618
5619         * src/SDCCmain.c: removed some unintended changes
5620
5621 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5622
5623         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
5624         * src/z80/gen.c: fixed part of bug #817589
5625         * src/SDCCsymt.c (checkFunction): fixed bug #817895
5626
5627 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
5628
5629         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
5630         * src/SDCCcflow.c
5631         * src/SDCCcse.c
5632         * src/SDCCdflow.c
5633         * src/SDCClabel.c
5634         * src/SDCClrange.c
5635         * src/SDCCmem.c
5636         * src/SDCCopt.c
5637         * src/SDCCpeeph.c
5638         * src/SDCCset.c
5639         * src/avr/ralloc.c
5640         * src/ds390/ralloc.c
5641         * src/izt/ralloc.c
5642         * src/mcs51/ralloc.c
5643         * src/pic/ralloc.c
5644         * src/pic16/ralloc.c
5645         * src/xa51/ralloc.c
5646         * src/z80/ralloc.c
5647         * src/z80/gen.c: removed unused label "release:"
5648
5649 2003-10-06  Borut Razem <borut.razem AT siol.net>
5650
5651         * src/SDCC.lex: removed definition of unused variables
5652           save_optimize and save_options
5653
5654 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
5655
5656         * clean.mk: removed '=' in "-maxdepth=1"
5657         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
5658         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
5659
5660 2003-10-06  Borut Razem <borut.razem AT siol.net>
5661
5662         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
5663           my_unput() replaced by unput()
5664
5665 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
5666
5667         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
5668         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
5669         type-punned pointer will break strict-aliasing rules"
5670         Old LR behaviour is again default; Klaus' LR can be choosen by
5671         defining the environment variable LRKLAUS
5672         * src/SDCCBBlock.h
5673         * src/SDCCloop.c
5674         * src/SDCClrange.c
5675         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
5676         * clean.mk: fixed removal of files in bin/CVS/
5677         * device/lib/clean.mk: fixed removal of directories small and large
5678         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
5679         * src/SDCCicode.c,
5680         * src/SDCCval.c: removed superflous test for pedantic
5681
5682 2003-10-05  Borut Razem <borut.razem AT siol.net>
5683
5684         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
5685           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
5686           message "unmatched #pragma SAVE and #pragma RESTORE"
5687
5688 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5689
5690         * doc/sdccman.lyx: various additions and updates (interrupts, inline
5691           assembly, critical functions, atomic, nojtbound)
5692
5693 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
5694
5695         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
5696         * src/SDCCBBlock.h
5697         * src/SDCCloop.c
5698         * src/SDCCloop.h
5699         * src/SDCClrange.c
5700
5701 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5702
5703         * src/z80/gen.h,
5704         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
5705         * src/mcs51/gen.h
5706         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
5707         * src/ds390/gen.h
5708         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
5709         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
5710         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
5711
5712 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5713
5714         * src/z80/gen.c (genRet): fixed bug #524753
5715         * src/z80/gen.c (genCast): fixed internal error on cast from
5716         pointer to long
5717         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
5718         fix for bug #477835 to the z80
5719         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
5720         for tracking iCodes in the peephole optimizer for z80
5721
5722 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5723
5724         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
5725         the other part of bug #814548
5726         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
5727
5728 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
5729
5730         * src/SDCCcse.c: fixed part of bug #814548
5731
5732 2003-09-28  Borut Razem <borut.razem AT siol.net>
5733
5734         * src/asm.c: rewrite of printILine() to use temporary file instead
5735           a pipe
5736         * src/xa51/main.c: commented out declaration of int rewinds
5737
5738 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5739
5740         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
5741
5742 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5743
5744         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
5745         * src/asm.c (printILine): Fixed bug #811015
5746
5747 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5748
5749         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
5750         freeing.
5751
5752 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5753
5754         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
5755         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
5756         to correctly handle general case of AOP_PAIRPTR
5757         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
5758
5759 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5760
5761         * src/mcs51/ralloc.c (fillGaps),
5762         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
5763         register positioning bug)
5764
5765 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
5766
5767         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
5768
5769 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5770
5771         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
5772         genCodePointerGet, genGenPointerGet, genFarPointerSet,
5773         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
5774         (ralloc doesn't intentionally do this now, but perhaps later)
5775         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
5776         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
5777         register positioning bugs (Fixed bug #762602 and #795325)
5778         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
5779         (Fixed bug #808779)
5780         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
5781         lines that --i-code-in-asm generates
5782
5783 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5784
5785         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
5786         trying to fclose a FILE* that was already closed.
5787
5788 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5789
5790         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
5791         of const struct should be treated as if const themselves)
5792
5793 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
5794
5795         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
5796
5797 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5798
5799         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
5800         Unix (/n) and DOS (/r/n) line terminations.
5801
5802 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5803
5804         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
5805         bug #613775
5806
5807 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5808
5809         * src/mcs51/gen.c (genFunction, genEndFunction),
5810         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
5811         and restore of EA so that stack offsets to parameters are
5812         correct when using both critical and reentrant/stack-auto.
5813         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
5814         size (can be triggered in error if sloc is shared between
5815         different sized objects)
5816         * device/include/float.h: fixed macros to explicitly use
5817         unsigned long where needed
5818
5819 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
5820
5821         Feature req. 799831: added code to allow nesting of critical functions
5822         * src/mcs51/gen.c (genFunction, genEndFunction)
5823         * src/ds390/gen.c (genFunction, genEndFunction)
5824
5825 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5826
5827         * src/SDCCsymt.c (sclsFromPtr),
5828         * src/SDCCsymt.h,
5829         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
5830         support for standard C idiom of memory mapped variables; for
5831         example, *((xdata int*)0x1234) = 1 is now internally equivalent
5832         to xdata int at 0x1234 tempvar = 1.
5833         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
5834         provided by Akiya ISHIDA
5835
5836 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
5837
5838         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
5839         * src/SDCCval.c (constVal): added reduction from int to char
5840         * src/SDCCval.c (valMult, valDiv): fixed sign handling
5841         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
5842         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
5843         to ignore the sign
5844         * support/regression/tests/shifts.c: fixed
5845
5846 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5847
5848         * src/z80/gen.c (genXor): Fixed bug #805445
5849
5850 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5851
5852         Fixed bug #621531 (const & volatile confusion in the type chain).
5853         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
5854         refer to the const or volatile state of the pointer itself.
5855
5856         * src/SDCCast.c
5857         * src/SDCCglue.c
5858         * src/SDCCicode.c
5859         * src/SDCCsymt.c
5860         * src/SDCCval.c
5861         * src/SDCC.y
5862         * src/SDCCsymt.h
5863         * src/pic/gen.c
5864         * src/pic/ralloc.c
5865         * src/pic16/gen.c
5866         * src/pic16/ralloc.c
5867         * support/regression/tests/const.c
5868
5869 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5870
5871         When checking for duplicated modules, use absolute paths
5872         instead of relative paths.  Files changed:
5873
5874         * as/mcs51/lklib.c
5875         * link/z80/lklib.c
5876
5877 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5878
5879         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
5880
5881 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5882
5883         * device/include/string.h: added size_t typedef, changed
5884         prototypes to use size_t, eliminated separate reentrant and
5885         non-reentrant declarations, added _memmove declaration
5886         * device/lib/_memcpy.c: changed to use size_t instead of int,
5887         changed /4 to >>2 to avoid division library call
5888         * device/lib/_memcmp.c,
5889         * device/lib/_memset.c,
5890         * device/lib/_strncat.c,
5891         * device/lib/_strncpy.c,
5892         * device/lib/_strncmp.c: changed to use size_t instead of int
5893         * device/lib/_memmove.c: new file (fixed bug #772294)
5894         * device/lib/Makefile.in: added _memmove.c
5895         * device/lib/z80/asm_strings.s: fixed bug #772290
5896         * support/regression/tests/bitfields.c: attempt to fix host assertion
5897         failure on amd64-unknown-linux2.2
5898
5899 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5900
5901         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
5902         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
5903         * as/z80/asmain.c (main): fixed bug #801766
5904
5905 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
5906
5907         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
5908         compilers
5909
5910 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5911
5912         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
5913         reported in bug #800609
5914
5915 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
5916
5917         * Top header beautifications in src/pic16 directory:
5918           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
5919           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
5920           pcoderegs.h, ralloc.c, ralloc.h
5921         * main.c: added top header and GPL license notice
5922         * pcode.c: fixed the if-conditional warning
5923
5924 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
5925
5926         * device/lib/_mullong.c: replaced int by short for gcc
5927
5928 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5929
5930         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
5931         and JUMPTABLE iCodes properly now (worked by accident before)
5932         * src/mcs51/gen.c (leftRightUseAcc),
5933         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
5934         iCode properly now. Use getSize instead of nRegs since a & b
5935         aren't part of the nRegs tally.
5936
5937 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
5938
5939         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
5940         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
5941           before instructions that use the _STATUS register
5942
5943 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
5944
5945         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
5946         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
5947         fetching of the pointer
5948         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
5949         copied from genNearPointerSet()
5950         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
5951         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
5952         If they pop r0/r1 they must be called in the opposite order than aopOp().
5953         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
5954         (resp. --stack-auto), prepared for --xstack
5955
5956 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5957
5958         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
5959
5960 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
5961
5962         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
5963         these ports have their own __sdcc_external_start()
5964
5965 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
5966
5967         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
5968         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
5969         type for bits was changed. It resulted in bit variables becoming
5970         global, which is not permitted in PIC 14 assembly output.
5971
5972 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5973
5974         * doc/sdccman.lyx: various additions and updates. Rearranged sections
5975
5976 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5977
5978         Z80 and MCS51 linkers complaint if a public symbol is defined
5979         in more than one library module:
5980
5981         * as/mcs51/lklib.c
5982         * link/z80/lklib.c
5983         * as/mcs51/Makefile.in
5984
5985 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5986
5987         A few small changes that speed up the peephole optimizer.
5988
5989         * src/SDCCpeeph.c
5990
5991 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5992
5993         Try to make the peephole optimizer smarter by maintaining
5994         an association between the assembly source code and the
5995         iCodes that originated them. Put this information to use
5996         with a new peephole rule condition "notVolatile" so that
5997         the rules can be aggressive yet still safe.
5998
5999         * src/SDCCpeeph.c
6000         * src/SDCCpeeph.h
6001         * src/mcs51/gen.c
6002         * src/mcs51/peeph.def
6003
6004 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6005
6006         Fixed bug #741761
6007
6008         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
6009         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
6010         if the left or right operand symbols have the accuse flag set.
6011
6012 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6013
6014         Changed the type of the result of the ! (NOT) operator to char;
6015         previously it returned the same type as the source. This allows
6016         us to eliminate all the genFloatNot functions (all of its target
6017         implementations were very buggy) since !float can use the same
6018         code as !long now.
6019
6020         * src/SDCCicode.c (ast2iCode): ! returns char
6021         * src/mcs51/gen.c (genNot, genNotFloat),
6022         * src/ds390/gen.c (genNot, genNotFloat),
6023         * src/z80/gen.c (genNot, genNotFloat),
6024         * src/pic/gen.c (genNot, genNotFloat),
6025         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
6026
6027 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
6028
6029         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
6030         1. Interrupt would not compile properly. Ensure PCLATH register is saved
6031            during interrupts. Ensure WSAVE is located at a shared bank address.
6032         2. Fixed page selection in some places
6033         3. Fixed BTFSS/C to where necessary use registers directly and not simply
6034            the registers name strings.
6035         4. Fixed "signed / unsigned compare" compiler warnings.
6036         5. The PIC port manages its own allocation of the general purpose
6037            registers, but makes no attempt to reuse them. As a result when
6038            compiling it soon runs out of general purpose registers. Some
6039            additional code was added to the files pcode.c and device.c to walk
6040            through the function call tree and rename the registers so that they
6041            get reused.
6042
6043         * src/pic/device.c
6044         * src/pic/gen.c
6045         * src/pic/glue.c
6046         * src/pic/pcode.c
6047         * src/pic/pcode.h
6048         * src/pic/ralloc.c
6049         * src/pic/ralloc.h
6050         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
6051         genPlus() & genMinus() when the result is the same as left or right
6052
6053 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6054
6055         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
6056
6057 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6058
6059         Made bitfield a distinct type from bit so that bitfields
6060         convert as per ANSI C and bits retain their traditional
6061         boolean style behaviour. Implemented bitfield support in
6062         the z80 port.
6063
6064         * src/SDCCsymt.h,
6065         * src/SDCCsymt.c,
6066         * src/SDCCast.c,
6067         * src/cdbFile.c,
6068         * src/mcs51/gen.c,
6069         * src/ds390/gen.c: bit v bitfield split
6070         * src/z80/gen.c: New support for bitfields
6071         * support/regression/tests/bitfields.c: reenabled z80,
6072         added more tests
6073
6074 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6075
6076         Rules 246.x, 247.x relate to bitfields, the others speed up
6077         access to xdata mapped I/O devices.
6078
6079         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
6080
6081 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6082
6083         Cleaned up genPackBits and genUnpackBits and added two helper
6084         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
6085         for literal assignments in genPackBits (thanks to Frieder for
6086         reminding me).
6087
6088         * src/mcs51/gen.c
6089         * src/ds390/gen.c
6090
6091 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6092
6093         Fixed bug #748310 (pointer to function type mishandled when the
6094         function name is omitted). Also fixed a SIGSEGV when a function
6095         attribute (reentrant, etc) is used on a non-function or on a
6096         function but misplaced before the parameter list.
6097
6098         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
6099         bug #748310
6100         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
6101         * support/Util/SDCCerr.h,
6102         * support/Util/SDCCerr.c: Added func attr misuse error msg
6103
6104 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6105
6106         Fixed bug #787649 by anonymous
6107         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
6108         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
6109
6110 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6111
6112         Fixed numerous bitfield problems.
6113
6114         * src/SDCC.y: More bitfield related error checking
6115         * src/SDCCsymt.h,
6116         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
6117         * support/Util/SDCCerr.h,
6118         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
6119         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6120         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
6121         * support/regression/tests/bitfields.c: tests added
6122
6123 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6124
6125         Made the constant following the "interrupt" keyword optional. If
6126         omitted, the function will not automatically be given an entry
6127         in the interrupt vector table (similar to #pragma NOIV, but
6128         less syntacticly kludgy). The interrupt number is also now
6129         range checked. Also fixed a bug in the high order bit example
6130         in the manual.
6131
6132         * src/SDCC.y
6133         * src/SDCCmem.c
6134         * src/SDCCglue.c
6135         * src/SDCCsymt.h
6136         * support/Util/SDCCerr.c
6137         * support/Util/SDCCerr.h
6138         * doc/sdccman.lyx
6139
6140 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
6141
6142         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
6143         * src/SDCCicode.c (operandOperation): rewritten some ops
6144         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
6145         * src/SDCCsymt.c (computeType): literals are handled the same way as any
6146         other type
6147         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
6148         be re-activated by defining REDUCE_LITERALS)
6149         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
6150         unsigned, but are signed by default
6151         * src/SDCCval.c (constVal): rearranged
6152         * src/SDCCval.c (valMod): preliminary fix
6153         * src/SDCCval.c (valCastLiteral): use TYPE_* types
6154         * support/regression/literalop.c: added, work in progress
6155
6156 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6157
6158         Generate warnings for useless declarations like "char data;"
6159         that don't do what new users expect.
6160
6161         * src/SDCC.y
6162         * support/Util/SDCCerr.h
6163         * support/Util/SDCCerr.c
6164
6165 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
6166
6167         * src/SDCCval.c (valMult): fix overflow detection of negative int
6168
6169 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6170
6171         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
6172
6173         Changes to support big endian targets:
6174
6175         * src/ports.h
6176         * src/SDCCglue.c
6177         * src/avr/main.c
6178         * src/ds390/main.c
6179         * src/izt/i186.c
6180         * src/mcs51/main.c
6181         * src/pic/main.c
6182         * src/pic16/main.c
6183         * src/xa51/main.c
6184         * src/z80/main.c
6185
6186 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
6187
6188         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
6189         * device/lib/time.c: fixed warning "integer overflow in expression"
6190
6191 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
6192
6193         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
6194         * src/SDCCval.c (constVal): changed default to signed; hex and octal
6195         constants are unsigned; added recognition of "u" flag for unsigned
6196         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
6197         * src/SDCCval.c (valDiv, valMod): fixed signdness
6198         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
6199         signedness of modulo, left and right shift
6200         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
6201         * support/Util/SDCCerr.h: added warning W_INT_OVL
6202         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
6203         * src/SDCCast.c (ast_print): improved output of constants
6204
6205 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6206
6207         Fixed some warnings when building with MSVC:
6208
6209         * as\mcs51\asdata.c
6210         * as\z80\asdata.c
6211         * as\mcs51\asm.h
6212         * as\z80\asm.h
6213         * link\z80\aslink.h
6214         * link\z80\lkdata.c
6215         * link\z80\lkeval.c
6216         * link\z80\lkgb.c
6217         * link\z80\lkihx.c
6218         * link\z80\lks19.c
6219         * link\z80\lksym.c
6220         * support\cpp2\cpplib.c
6221         * src\ds390\gen.c
6222         * src\mcs51\gen.c
6223
6224 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
6225
6226         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
6227
6228 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6229
6230         * support\librarian\clean.mk: Do not remove Makefile.
6231         * support\librarian\Makefile: added.
6232
6233 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6234
6235         Added librarian to MSVC build:
6236         * all.dsp
6237         * sdcc.dsw
6238         * support\librarian\librarian.dsp
6239
6240         'configure' not needed for librarian, removed:
6241         * support\librarian\configure
6242         * support\librarian\configure.in
6243         * support\librarian\config_in.h
6244         * support\librarian\Makefile.in
6245
6246         Hopefully these ones built the librarian and the rest of sdcc properly:
6247         * Makefile
6248         * Makefile.common.in
6249
6250         Messed up 'configure', so revert to previous version:
6251         * configure
6252         * configure.in
6253
6254 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
6255
6256         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
6257         there, while the mantissa of a double is "only" 53 bits wide.
6258
6259 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6260
6261         Adding sdcclib to the build.  MSVC project coming soon.
6262         Files added/changed:
6263
6264         * support\librarian\clean.mk
6265         * support\librarian\configure
6266         * support\librarian\configure.in
6267         * support\librarian\config_in.h
6268         * support\librarian\Makefile.bcc
6269         * support\librarian\Makefile.in
6270         * support\librarian\sdcclib.c
6271         * Makefile.bcc
6272         * Makefile
6273         * Makefile.common.in
6274         * configure
6275         * configure.in
6276
6277 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6278
6279         Linker now complaints if linked modules have conflicting options, for
6280         example, one compiled using --model-large and another one compiled with
6281         --model-small.  The following files were modified:
6282
6283         * as\mcs51\asdata.c
6284         * as\mcs51\aslink.h
6285         * as\mcs51\asm.h
6286         * as\mcs51\asmain.c
6287         * as\mcs51\asout.c
6288         * as\mcs51\i51pst.c
6289         * as\mcs51\lkdata.c
6290         * as\mcs51\lklibr.c
6291         * as\mcs51\lkmain.c
6292         * as\z80\asdata.c
6293         * as\z80\asm.h
6294         * as\z80\asmain.c
6295         * as\z80\asout.c
6296         * as\z80\z80pst.c
6297         * link\z80\aslink.h
6298         * link\z80\lkdata.c
6299         * link\z80\lklibr.c
6300         * link\z80\lkmain.c
6301         * src\SDCCglue.c
6302
6303 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6304
6305         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
6306         as/mcs51/lklibr.c: Generate a warning when a library is not found.
6307
6308 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
6309
6310         * src/z80/mappings.i: fix _mul[us][int,long] entries
6311
6312 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6313
6314         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
6315
6316 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
6317
6318         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
6319         * support/regression/tests/bitopcse.c: added
6320         fixed warning:
6321         * src/avr/gen.c:
6322         * src/pic/gen.c:
6323         * src/pic16/gen.c:
6324         * src/z80/gen.c:
6325         * src/xa51/gen.c:
6326
6327 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6328
6329         added support for new library format to z80, gbz80 linkers:
6330         *link/z80/aslink.h
6331         *link/z80/lklex.c
6332         *link/z80/lklib.c
6333         *link/z80/lklist.c
6334
6335 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
6336
6337         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
6338         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
6339
6340 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
6341
6342         added DUMMY_READ_VOLATILE:
6343         * src/SDCC.y:
6344         * src/avr/gen.c:
6345         * src/xa51/gen.c:
6346         * src/z80/gen.c:
6347         * src/pic/gen.c:
6348         * src/pic16/gen.c:
6349         * src/mcs51/gen.c:
6350         * src/ds390/gen.c:
6351         * src/SDCCcse.c (algebraicOpts): many improvements
6352         * src/SDCCcse.h: removed algebraicOpts()
6353         * src/SDCCicode.c (picDummyRead): added
6354
6355 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6356
6357         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
6358         "Insufficient space in data memory".
6359
6360 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6361
6362         * src/mcs51/gen.c: fixed bug #771358
6363         * src/z80/gen.c: fixed bug #759087
6364
6365 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
6366
6367         * src/pic16/glue.c: minor cleanup by Vangelis
6368
6369 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6370
6371         * device/include/regc515c.h: fixed #758477
6372         * device/lib/_gptrget.c: saving some cycles in generic pointer get
6373         * device/lib/_gptrput.c: saved a few bytes
6374         * my tab spacing is 8, yours too?)
6375         * device/lib/_ser.c: process RX bytes earlier than TX bytes
6376         * device/lib/serial.c: process RX bytes earlier than TX bytes
6377         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
6378
6379 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6380
6381         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
6382
6383 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6384
6385     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
6386
6387 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
6388
6389         * device/lib/Makefile.in: bad fix, reverted to 1.43
6390
6391 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
6392
6393         * device/lib/Makefile.in: added missing z80 object files
6394
6395 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
6396
6397         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
6398         pic16 progress by Vangelis:
6399         * src/SDCCglobl.h:
6400         * src/SDCCmain.c:
6401         * src/pic/Makefile:
6402         * src/pic:
6403         * pic/Makefile:
6404         * pic16/device.c:
6405         * pic16/device.h:
6406         * pic16/gen.c:
6407         * pic16/gen.h:
6408         * pic16/genarith.c:
6409         * pic16/glue.c:
6410         * pic16/main.c:
6411         * pic16/pcode.c:
6412         * pic16/pcode.h:
6413         * pic16/pcodepeep.c:
6414         * pic16/peeph.def:
6415
6416 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6417
6418     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
6419
6420 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6421
6422     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
6423     added gbz80 build to MSVC project.
6424     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
6425     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
6426     from 8051 stuff and setup so it links using a .lnk file.
6427
6428 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6429
6430     * support/librarian/sdcclib.c: sdcc librarian.
6431     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
6432     with sdcclib.
6433
6434 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6435
6436     * as/mcs51/lkmain.c: properly handle extensions in function afile.
6437
6438 2003-07-02  Borut Razem <borut.razem AT siol.net>
6439
6440         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
6441         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
6442         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
6443         src/xa51/main.c, src/z80/main.c:
6444         virtualization of glue() function: each port has it's own glue function,
6445         which is accessed by do_glue function pointer in PORT.general structure
6446
6447 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
6448
6449         * DS800C400 fun, improved ROM interface and tinibios.
6450
6451 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
6452
6453         * More support for DS80C400. Now includes beginning of interface to ROM.
6454
6455 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
6456
6457         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
6458
6459 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6460
6461         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
6462
6463 2003-06-19  Borut Razem <borut.razem AT siol.net>
6464
6465         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
6466
6467 2003-06-19  Borut Razem <borut.razem AT siol.net>
6468
6469         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
6470         fixed Z80 port - crt0.o: cannot open.
6471
6472 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
6473
6474         * support/Util/MySystem.c (merge_command): revert bad fix
6475
6476 2003-06-18  Borut Razem <borut.razem AT siol.net>
6477
6478         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
6479
6480 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6481
6482         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
6483         option --use-stdout sends errors to stdout instead of stderr.
6484
6485 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
6486
6487         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
6488
6489 2003-06-15  Borut Razem <borut.razem AT siol.net>
6490
6491         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
6492         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
6493         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
6494         fixed width array of pointers replaced with sets;
6495         multiple include and lib paths ared transferred to preprocessor and linker
6496         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
6497         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
6498         fixed width array of pointers
6499         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
6500         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
6501         fixupPath(), getPathDifference()
6502         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
6503         fixed width array of pointers
6504
6505 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
6506
6507         * src/pic16/ralloc.c: fix warnings
6508         * src/pic16/pcode.c: fix warning
6509
6510 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
6511
6512          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
6513         know all the details, but essentially this set of changes enable
6514         the pic16 port to generate movff instructions and generate assembler
6515         directives,
6516         * src/SDCCmain.c:
6517         * src/pic16/gen.c:
6518         * src/pic16/glue.c:
6519         * src/pic16/pcode.c:
6520         * src/pic16/device.c:
6521         * src/pic16/main.c:
6522         * src/pic16/pcode.h:
6523         * src/pic16/pcoderegs.c:
6524         * src/pic16/ralloc.c:
6525         * src/pic16/ralloc.h:
6526
6527 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6528
6529         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
6530         added option --vc, so sdcc errors and warnings are compatible with
6531         Microsoft Visual Studio.
6532
6533 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6534
6535         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
6536           device/lib/libfloat.lib: added atof function.
6537
6538 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
6539
6540         * doc/sdccman.lyx: updated to Lyx 1.3
6541         * doc/cdbfileformat.lyx: updated to Lyx 1.3
6542         * doc/test_suite_spec.lyx: updated to Lyx 1.3
6543         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
6544
6545 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
6546
6547         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
6548
6549 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6550
6551         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
6552           additions to the "related tools/documentation" section
6553
6554 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
6555
6556         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
6557
6558 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
6559
6560         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
6561         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
6562
6563 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
6564
6565         * doc/sdccman.lyx: fix double dash and other minor things
6566         * doc/Makefile: fix double dash
6567
6568 2003-05-28  Karl Bongers(patches from Martin Helmling)
6569         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
6570           condition and ignore commands.
6571
6572 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6573
6574         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
6575           is in parts still quite out of date, I did changes as far as I felt makes sense
6576           for a non-native english speaker.
6577           Please feel free to add to the manual or to correct my changes.
6578         * doc/Makefile: undid touching the date of intermediate tex files.
6579
6580 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6581
6582         * doc/sdccman.lyx: Manual has an index now
6583
6584 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
6585
6586         Finalize muluint/mulsint and mululong/mulslong merging:
6587         * device/lib/_mulint.c
6588         * device/lib/_mullong.c
6589         * device/lib/gbz80/mul.s
6590         * device/lib/gbz80/stubs.s
6591         * device/lib/z80/mul.s
6592         * device/lib/z80/stubs.s
6593         * src/SDCCsymt.c (initCSupport)
6594
6595 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6596
6597         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
6598         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
6599           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
6600           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
6601           instead of /Zm500.
6602
6603 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6604
6605         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
6606           the regression tests I'm not brave enough to enable 245.b, 245.c
6607         * doc/sdccman.lyx: added latex preamble for hyperref package.
6608           Using pdflatex this will give you a hyperlinked pdf file with
6609           bookmarks. (prepend '%' before /usepackage if this breaks something)
6610
6611 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6612
6613          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
6614
6615 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
6616
6617         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
6618
6619 2003-05-21    <johan AT balder>
6620
6621         * src/SDCCglue.c (printIval): fixed bug #739934
6622
6623 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
6624
6625         Applied patch from bug 737905 (renamed yylineo to mylineno):
6626         * src/altlex.c
6627         * src/SDCCast.c
6628         * src/SDCglobl.h
6629         * src/SDCC.lex
6630         * src/SDCCsymt.c
6631         * src/SDCCval.c
6632         * src/pic16/pcode.c: Cleaned warnings
6633         * src/pic16/pcodeflow.c: Cleaned warnings
6634         * src/pic16/pcoderegs.c: Cleaned warnings
6635
6636 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
6637
6638         * src/pic16/pcode.c: Cleaned warnings
6639         * src/pic16/pcodepeep.c: Cleaned warnings
6640         * src/pic16/ralloc.c: Cleaned warnings
6641
6642 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
6643
6644         * doc/sdccman.lyx: fixed bug 739745
6645         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
6646
6647 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
6648
6649         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
6650         it can be defined with CFLAGS when running configure
6651         * src/SDCCmain.c: fixed compiling + linking with object files
6652
6653 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
6654
6655         * configure.in: configure for pic16 port,
6656             added --disable-pic16-port
6657         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
6658         * src/SDCCmain.c: linkOptions is changed to set *,
6659             added if/endif conditional macros to remove options help
6660             messages from optionsTable when a port is not configured, added
6661             support for the PIc16 port in the ports table, when executing
6662             the compiler with no port specified on command line, a default
6663             port is selected with the new macro DEFAULT_PORT which is
6664             defined in port.h, in setDefaultOptions() linkOptions is removed
6665             from initialization assignment, since now it is a set,
6666             parseCmdLine uses setParseWithComma for linkOptions, in
6667             linkEdit() linkOptions are accessed with new function indexSet()
6668             which returns the i'th item of a set variable. See SDCCset.c, in
6669             linkEdit() when calling buildCmdLine(), added linkOptions as
6670             last argument. Now users can pass arguments to gplink via the
6671             -Wl option, main() uses pic16glue() to glue up pic16 programs
6672         * src/SDCCpeeph.c: various changes to support pic16
6673         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
6674             return the i'th item of the set
6675         * src/SDCCset.h: added function prototype for indexSet()
6676         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
6677         * src/clean.mk: added pic16 in CLEANALLPORTS variable
6678         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
6679             added macro DEFAULT_PORT
6680         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
6681         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
6682             generated
6683         * src/pic16/glue.c: commented out some error producing lines
6684         * src/pic16/main.c: __config directives are commented out to stop
6685             gpasm complaining and test the linkage with gplink, _linkCmd and
6686             _asmCmd changed to be more gplink and gpasm friendly
6687         * src/pic16/peeph.def: peep rule 3 is commented out, since it
6688             produced an error when parsed, peep rule 12 is added to utilize
6689             movff, but it is commented out since the pCode does not support
6690             yet a command with 2 address arguments
6691
6692 2003-05-18    <johan AT balder>
6693
6694         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
6695         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
6696 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
6697
6698         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
6699   Added feature to script commands from file.
6700
6701 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
6702
6703         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
6704         * src/SDCCutil.c: include ctype.h for win32
6705
6706 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
6707
6708         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
6709
6710 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
6711
6712         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
6713   Fixed so you can set breakpoints prior to run, run does not stop
6714   on entry now.  Add tbreak.  Other enhancements and fixes for use
6715   with ddd.
6716
6717 2003-05-12  Borut Razem <borut.razem AT siol.net>
6718
6719         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
6720
6721 2003-05-11  Borut Razem <borut.razem AT siol.net>
6722
6723         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
6724         the path of bin directory, so that PATH is the only env. variable, which has to be set
6725         in case of standard installation.
6726         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
6727         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
6728         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
6729
6730 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
6731
6732         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
6733         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
6734         temp files are in the port dir; clean the gen/test directory when
6735         generating new test.c
6736         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
6737         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
6738         * support/regression/tests/zeropad.c: added
6739
6740 2003-05-09    <johan AT balder>
6741
6742         * src/SDCCglue.c: fixed bug #597940
6743
6744 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
6745
6746         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
6747   cache sfr, optimize next,step, fix off by one sourceline,
6748   support ddd list function.
6749         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
6750
6751 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
6752
6753         * support/regression/HTMLgen.py: added compare_s2f()
6754         * support/regression/Makefile: redo 1.27
6755         * support/regression/generate-cases.py: redo 1.5
6756
6757 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
6758
6759         * support/regression/tests/float.c: workaround 33 bit hex constant
6760         * support/regression/tests/simplefloat.c: fix division for host
6761
6762 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
6763
6764         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
6765         that tame's the PIC's over-aggressive optimizer.
6766
6767 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6768
6769          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
6770          support for MSVC.
6771
6772 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
6773
6774         Initial support for DS80C400. "Hello world" runs on TINIm400
6775         (with polled I/O).
6776
6777 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
6778
6779          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
6780          * Some notes on ddd usage added in debugger/README
6781          Martin Helmling adding more features and fixes for ddd GUI debugger.
6782          Code added for nexti, stepi, up, down, and other adjustments.
6783
6784 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
6785
6786         * src/pic/pCodepeep.c non-wildcard asmops are now handled
6787         * src/pic/peeph.def Added two rules to optimize carry manipulation
6788         * src/pic/* removed debug printfs
6789
6790 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
6791
6792         * debugger/mcs51/cmd.c: added header newalloc.h
6793
6794 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
6795
6796         * as/Makefile: new EXEEXT
6797         * as/z80/Makefile: remove trailing slash of BUILDIR
6798         * as/z80/clean.mk: new EXEEXT
6799         * Makefile.common.in: add to CFLAGS (and others), don't replace it
6800         * support/cpp2/Makefile.in: new EXEEXT
6801         * src/pic/glue.c (pic14emitRegularMap): fixed warning
6802
6803 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
6804
6805         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
6806         EXEEXT was introduced to fix all related problems with targets
6807         "clean", "install" and "uninstall"; a couple of further flaws
6808         especially with "clean" have been fixed too
6809         * as/mcs51/Makefile.in
6810         * as/mcs51/clean.mk
6811         * as/z80/Makefile
6812         * Makefile
6813         * clean.mk
6814         * debugger/mcs51/Makefile.in
6815         * debugger/mcs51/clean.mk
6816         * link/z80/Makefile
6817         * link/z80/Makefile.in
6818         * link/z80/clean.mk
6819         * link/Makefile
6820         * packihx/Makefile.in
6821         * packihx/clean.mk
6822         * sim/ucsim/Makefile
6823         * sim/ucsim/clean.mk
6824         * sim/ucsim/avr.src/Makefile.in
6825         * sim/ucsim/avr.src/clean.mk
6826         * sim/ucsim/s51.src/Makefile.in
6827         * sim/ucsim/s51.src/clean.mk
6828         * sim/ucsim/xa.src/Makefile.in
6829         * sim/ucsim/xa.src/clean.mk
6830         * sim/ucsim/z80.src/Makefile.in
6831         * sim/ucsim/z80.src/clean.mk
6832         * sim/ucsim/main_in.mk
6833         * sim/ucsim/packages_in.mk
6834         * sim/ucsim/gui.src/Makefile.in
6835         * sim/ucsim/gui.src/serio.src/Makefile.in
6836         * sim/ucsim/gui.src/serio.src/clean.mk
6837         * src/Makefile.in
6838         * src/clean.mk
6839         * support/cpp2/Makefile.in
6840         * support/cpp2/clean.mk
6841         * support/makebin/Makefile
6842         * support/makebin/clean.mk
6843         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
6844         * doc/sdccman.lyx: --program-suffix no longer needed
6845
6846 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
6847
6848          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
6849          Martin Helmling added support for ddd GUI debugger.
6850          Code added to display assembly, set variables, and other commands
6851          to interface to ddd.
6852
6853 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
6854
6855         * as/Makefile: fix target clean
6856         * as/clean.mk: fix target clean
6857         * as/z80/clean.mk: fix target clean
6858
6859 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
6860
6861         * Makefile.common.in: added  AT EXEEXT AT
6862         * configure.in: removed all mingw32 stuff
6863         * configure: rebuilt from configure.in
6864         * doc/sdccman.lyx: updated section "installation"
6865         * support/scripts/sdcc_mingw32: adapted to configure
6866         * support/scripts/sdcc_cygwin_mingw32: added
6867
6868 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
6869
6870         * src/pic Added object file support for the PIC port
6871         * src/pic Applied patch from Craig Franklin (this started the object file support)
6872         * src/regression Updated the PIC regression tests for object files
6873
6874 2003-04-20  Borut Razem <borut.razem AT siol.net>
6875
6876         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
6877           lklex.c: In function `getfid':
6878           lklex.c:203: warning: array subscript has type `char'
6879         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
6880           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
6881         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
6882           stack handling macros
6883
6884 2003-04-19  Borut Razem <borut.razem AT siol.net>
6885
6886         * "handling space characters in file path" task:
6887         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
6888         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
6889         * support/Util/MySystem.h: make it self-sufficient
6890         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
6891           src/z80/main.c, sdcc/as/mcs51/lklex.c:
6892           handling space characters in file path
6893         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
6894           (it will be used by assemblers, which have their own includes, e.g. gpasm)
6895         * support/Util/MySystem.c: handling space characters in executable's path
6896
6897 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
6898
6899         * as/z80/Makefile: fix permanent rebuild of z80
6900         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
6901         * support/regression/tests/bitfields.c: added Johan's bitfields.c
6902
6903 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
6904
6905         * src/SDCCopt.c: add special case optimization to replace modulo by
6906           a power of two with a bitwise AND.
6907
6908 2003-04-18    <johan AT balder>
6909
6910         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
6911
6912 2003-04-17    <johan AT balder>
6913
6914         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
6915         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
6916
6917 2003-04-13  Borut Razem <borut.razem AT siol.net>
6918
6919         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
6920         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
6921           fixed mingw problem in adl_NORMALIZE_PATH
6922
6923 2003-04-12  Borut Razem <borut.razem AT siol.net>
6924
6925         * fixed "#pragma SAVE/RESTORE can not be nested":
6926         * src/SDCC.lex: reworked pragma handling functions
6927         * sdcc/src/SDCCglobl.h: reworked stack handling macros
6928         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
6929
6930 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
6931
6932         * src/SDCCutil.c (pathEquivalent): defined but not used
6933         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
6934         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
6935         * configure: rebuilt from configure.in
6936         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
6937         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
6938         * device/include/Makefile.in: replace sdcc_datadir
6939         * device/lib/Makefile.in: replace sdcc_datadir
6940         * Makefile.common.in: add LDFLAGS from configure
6941         * packihx/Makefile.in: use LDFLAGS
6942         * src/Makefile.in: use LDFLAGS
6943         * support/cpp2/Makefile.in: add LDFLAGS from configure
6944         * support/makebin/Makefile: use LDFLAGS
6945         * .version: bumped version number to 2.3.5
6946
6947 2003-04-12  Borut Razem <borut.razem AT siol.net>
6948
6949         * completed "different paths" task:
6950         * src/SDCCmacro.c: fixed bug in handling quotes
6951         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
6952         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
6953
6954 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
6955
6956         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
6957
6958 2003-04-11 kevin Vigor <kevin AT vigor.nu>
6959
6960         * ds390/gen.c ds390/peeph.def: fix bug 706781
6961
6962 2003-04-11  Borut Razem <borut.razem AT siol.net>
6963
6964         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
6965
6966 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
6967
6968         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
6969         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
6970          set - this bit used to not be set...).
6971         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
6972           bad code in PIC Port
6973         * src/regression/and2.c added to test bug 609268
6974         * src/regression/Makefile added and2.c to regression test
6975
6976
6977 2003-04-08    <johan AT CP255758-A>
6978
6979         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
6980         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
6981         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
6982
6983 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
6984
6985         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
6986         fix bug #487815
6987         * support/cpp2/Makefile.in: fix bug #487815
6988         * configure: rebuilt from configure.in
6989         * Makefile.common.in: docdir changed, new path suffixes
6990         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
6991         * sdcc_vc_in.h: reflect changes from sdccconf.h
6992         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
6993         * src/SDCCutil.h: remove BINDIR hack
6994         * doc/sdccman.lyx: update new path hierarchy
6995
6996 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
6997
6998         * src/SDCCpeeph.c: added okToRemoveSLOC test
6999
7000 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7001
7002         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
7003
7004 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
7005
7006         * src/SDCCpeeph.c: added labelIsReturnOnly test
7007         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
7008
7009 2003-04-05    <johan AT balder>
7010
7011         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
7012         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
7013         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
7014         * src/SDCCast.c: fixed a warning
7015         * src/SDCCast.h: fixed a warning
7016         * src/SDCCicode.c (operandFromAst): fixed a warning
7017
7018 2003-04-04    <johan AT balder>
7019
7020         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
7021         * src/SDCCast.c (decorateType): fixed bug #715076
7022         * src/SDCC.y: fixed bug #702907
7023
7024 2003-04-03    <johan AT balder>
7025
7026         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
7027         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
7028         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
7029         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
7030         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
7031
7032 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
7033
7034         * _decdptr.c: fix return values
7035         * _gptrget.c: fix return values
7036         * _gptrgetc.c: fix return values
7037         * _gptrput.c: fix return values
7038         * _mulint.c: fix return values
7039         * as/z80/Makefile: fix 'make -j' problem
7040
7041 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
7042
7043         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
7044         * configure.in: big cleanup, updated to autoconf 2.5x
7045         * configure: rebuilt from configure.in
7046         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
7047         * sdcc_vc_in.h: reflect changes from sdccconf.h
7048         * doc/Makefile: fixed a flaw in "make install"
7049
7050 2003-04-02    <johan AT balder>
7051
7052         * src/ds390/gen.c (genCmp): no comments
7053         * src/mcs51/gen.c (genCmp): no comments
7054         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
7055         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
7056
7057 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
7058
7059         * support/regression/generate-cases.py: place generated file in given sub directory
7060         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
7061         * support/regression/Makefile: improvements for 'make -j';
7062         side effect: it's simpler and faster now
7063
7064 2003-03-31  Borut Razem <borut.razem AT siol.net>
7065
7066         * src/z80/main.c: link-{port} and as-{port} defined without path
7067         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
7068
7069 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
7070
7071         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
7072
7073 2003-03-30  Borut Razem <borut.razem AT siol.net>
7074
7075         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
7076           changed type of list parameter to set
7077         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
7078         * src/port.h: changed type of do_assemble() parameter to set
7079         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
7080           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
7081           definition of "cppoutfilename" macro with NULL value in preProcess()
7082         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
7083         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
7084         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
7085           replaced with set *binPathSet
7086         * shash_add() deallocates the item, if allready exsists, before adding the new one
7087         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
7088
7089 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
7090
7091         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
7092           a nested for loop bug in the PIC port
7093         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
7094           for loops
7095
7096 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
7097
7098         * support/Util/dbuf.h: remove C++ stuff to make it portable
7099
7100 2003-03-28  Borut Razem <borut.razem AT siol.net>
7101
7102         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
7103           literal strings in stringLiteral()
7104         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
7105         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
7106           to the project
7107
7108 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
7109
7110         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
7111
7112 2003-03-26    <johan AT balder>
7113
7114         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
7115         * src/ds390/gen.c (saveRegisters): catched symbol abuse
7116         * src/SDCCast.c (decorateType): fixed " -v < 3"
7117
7118 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
7119
7120         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
7121         Added Lenny Story's debug infrastructure changes:
7122         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
7123         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
7124         * src/cdbFile.c: added
7125         * src/SDCCdebug.c: added
7126         * src/SDCCdebug.h: added
7127         * src/SDCCast.c (createFunction)
7128         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
7129         * src/SDCCmain.c (parseCmdLine, main)
7130         * src/SDCCmem.c (redoStackOffsets)
7131         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
7132         * src/SDCCsymt.h
7133         * src/common.h
7134         * src/avr/gen.c (genAVRCode)
7135         * src/ds390/gen.c (gen390Code)
7136         * src/mcs51/gen.c (gen51Code)
7137         * src/pic/gen.c (genpic14Code)
7138         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
7139         * src/xa51/gen.c (genXA51Code)
7140         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
7141
7142 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7143
7144         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
7145         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
7146
7147 2003-03-22    <johan AT balder>
7148
7149         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
7150
7151 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
7152
7153         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
7154         * doc/cdbfileformat.lyx: added, written by Lenny Story
7155         * doc/Makefile: added cdbfileformat.lyx
7156         * doc/clean.mk: added cdbfileformat.lyx
7157
7158 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
7159
7160         * src/mcs51/peeph.def: fix bug #705773
7161
7162 2003-03-20    <johan AT balder>
7163
7164         An sfr/sbit can have an "at #" AND an initializer
7165         * src/SDCCsymt.c (checkSClass):
7166         * src/SDCCmem.c (allocGlobal):
7167         * src/SDCCmem.c (allocLocal):
7168         * src/SDCCast.c (createBlock):
7169
7170 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
7171
7172         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
7173
7174 2003-03-16    <johan AT balder>
7175
7176         Undid the hackup of const and volatile, the problem is much bigger
7177         * src/SDCC.y:1.65
7178         * src/SDCCast.c:1.171
7179         * src/SDCCglue.c:1.138
7180         * src/SDCCicode.c:1.146
7181         * src/SDCCsymt.c:1.150
7182         * src/SDCCval.c:1.65
7183
7184 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
7185
7186         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
7187         * src/ds390/gen.c (genAddrOf): fixed bug #704087
7188
7189 2003-03-13    <johan AT balder>
7190
7191         Hackup const and volatile modifiers in type chains a bit:
7192         * src/SDCC.y:1.63
7193         * src/SDCCast.c:1.169
7194         * src/SDCCglue.c:1.136
7195         * src/SDCCicode.c:1.143
7196         * src/SDCCsymt.c1.146
7197         * src/SDCCsymt.h1.59
7198         * src/SDCCval.c:1.63
7199
7200 2003-03-12    <johan AT balder>
7201
7202         * src/SDCCBBlock.h: more LRH debugging junk
7203         * src/SDCCcflow.h: more LRH debugging junk
7204         * src/SDCCloop.c: more LRH debugging junk
7205         * src/SDCC.y (struct_declaration): fixed bug #697590
7206         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
7207         * src/ds390/gen.c (aopForRemat): fixed bug #700031
7208         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
7209
7210 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7211         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
7212         test function names must now match exactly).
7213         * src/SDCCcse.c: added special case in findCheaperOp to allow
7214         extending a short integer. Makes less awful code for bug 700121 test case.
7215
7216 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7217
7218         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
7219         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
7220
7221 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7222
7223         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
7224         actually called (operandsNotEqual() was called for all
7225         operandsNotEqualX tests).
7226
7227 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
7228
7229         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
7230         with shorter literals. Fixes bug 700121.
7231
7232 2003-03-11    <johan AT balder>
7233
7234         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
7235
7236 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
7237
7238         * src/SDCCloop.c (mergeRegions): an evil beast is dead
7239         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
7240
7241 2003-03-10  Borut Razem <borut.razem AT siol.net>
7242
7243         * src/SDCCmain.c: pipe preprocessor's output
7244         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
7245         * sdcc_vc_in.h: define pclose as _pclose for WIN32
7246         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
7247         which closes all pipes in pipeSet set
7248         * src/SDCCset.c: free deleted item in function deleteSetItem()
7249         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
7250         moved from z80 to src subproject
7251         * .version: increased version number to 2.3.4
7252
7253 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
7254
7255         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
7256         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
7257         * support/regression/ports/xa51/spec.mk: fix typo
7258
7259 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
7260
7261         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
7262
7263 2003-03-09  Borut Razem <borut.razem AT siol.net>
7264
7265         * src/SDCCmain.c: pipe preprocessor's output
7266         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
7267         * sdcc_vc_in.h: define pclose as _pclose for WIN32
7268         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
7269         which closes all pipes in pipeSet set
7270         * src/SDCCset.c: free deleted item in function deleteSetItem()
7271         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
7272         moved from z80 to src subproject
7273
7274 2003-03-09  Borut Razem <borut.razem AT siol.net>
7275
7276         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
7277         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
7278         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
7279         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
7280         * src/SDCCglobl.h: unification of WIN32 native definitions
7281
7282 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7283
7284         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
7285
7286 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
7287
7288         * src/configure.in:   check for endianess (even while cross-compiling)
7289         * src/configure:      check for endianess (even while cross-compiling)
7290         * src/configure_in.h: check for endianess (even while cross-compiling)
7291         * src/avr/gen.c:        remove old endianess stuff
7292         * src/mcs51/gen.c:      remove old endianess stuff
7293         * src/ds390/gen.c:      remove old endianess stuff
7294         * src/pic/gen.c:        remove old endianess stuff
7295         * src/pic/genarith.c:   remove old endianess stuff
7296         * src/pic/glue.c:       fix endianess check
7297         * src/pic16/gen.c:      remove old endianess stuff
7298         * src/pic16/genarith.c: remove old endianess stuff
7299         * src/pic16/glue.c:     fix endianess check
7300         * src/xa51/gen.c:       remove old endianess stuff
7301         * src/z80/gen.c:        fix endianess check
7302         * src/SDCCglue.c:       fix endianess check
7303         * src/ds390/peeph.def: fix bug 700036
7304
7305 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
7306
7307         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
7308         * src/configure: find appropriate data-types on host for SDCC's int and long
7309         * src/configure.in: find appropriate data-types on host for SDCC's int and long
7310         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
7311         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
7312
7313 2003-03-07    <johan AT balder>
7314
7315         Just a big NOOP:
7316                 some minor cleanups before the big shot
7317                 OP_DEFS and OP_USES now use Kevin's protection
7318                 new option --nolabelopt
7319
7320         * src/SDCCBBlock.c:
7321         * src/SDCCast.c,:
7322         * src/SDCCcflow.c:
7323         * src/SDCCcse.c:
7324         * src/SDCCicode.c:
7325         * src/SDCCicode.h:
7326         * src/SDCClabel.c:
7327         * src/SDCCloop.c:
7328         * src/SDCCmain.c:
7329         * src/ds390/ralloc.c:
7330         * src/mcs51/ralloc.c:
7331         * src/pic/ralloc.c:
7332         * src/xa51/ralloc.c:
7333         * src/z80/ralloc.c:
7334
7335 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
7336
7337         * src/pic/pcode.c (get_op): fix 64 bit warnings
7338         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
7339         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
7340         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
7341         * support/regression/tests/malloc.c: fix 64 bit warnings
7342
7343 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
7344
7345         * src/mcs51/gen.c (genMinus): fixed bug 696436
7346
7347 2003-03-02  Borut Razem <borut.razem AT siol.net>
7348
7349         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
7350
7351 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
7352
7353         * configure.in: test for mkstemp
7354         * sdccconf_in.h: add HAVE_MKSTEMP
7355
7356 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
7357
7358         * device/include/ctype.h: removed warning while using --stack-auto
7359         * device/include/malloc.h: removed warning while using --stack-auto
7360         * device/include/string.h: removed warning while using --stack-auto
7361
7362 2003-02-23  Borut Razem <borut.razem AT siol.net>
7363
7364         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
7365         because NDEBUG is defined (see man assert)
7366         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
7367
7368 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7369
7370         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
7371         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
7372
7373 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7374
7375         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
7376         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
7377
7378 2003-02-18    <johan AT balder>
7379
7380         * as/mcs51/asmain.c (asmbl): module can start with a digit
7381         * as/z80/asmain.c (asmbl): module can start with a digit
7382
7383 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
7384
7385         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
7386         * src/asm.c: fix pipe() for Mingw32
7387
7388 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
7389
7390         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
7391         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
7392         make -V work again; --c1mode reads now from stdin
7393         * doc/sdccman.lyx: added --c1mode
7394         * support/Util/SDCCerr.c: new messages for c1 mode
7395         * support/Util/SDCCerr.h: new messages for c1 mode
7396         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
7397
7398 2003-02-15    <johan AT balder>
7399
7400         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
7401
7402 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
7403
7404         * doc/sdccman.lyx: Environment variables, -o and other minor things
7405
7406 2003-02-14    <johan AT balder>
7407
7408         * src/xa51/main.c: before anyone really tries to use it :)
7409
7410         * Install doc's in share/sdcc/doc
7411         * removed some obsolete files
7412         * Do a proper make distclean and uninstall
7413         M Makefile.common.in
7414         R sdccbuild.sh
7415         M as/Makefile
7416         M device/include/Makefile.in
7417         M device/lib/Makefile.in
7418         M doc/sdccman.lyx
7419         M link/Makefile
7420         M sim/ucsim/doc/Makefile.in
7421         M src/clean.mk
7422         R src/avr/peeph.rul
7423         R src/xa51/peeph.rul
7424         M support/cpp2/Makefile.in
7425         M support/makebin/Makefile
7426
7427
7428 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
7429
7430         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
7431
7432 2003-02-10  Borut Razem <borut.razem AT siol.net>
7433
7434         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
7435         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
7436         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
7437         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
7438         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
7439         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
7440         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
7441         src/z80/Makefile.bcc: Borland Makefile cleanup
7442         * as/z80/Makefile.bcc: Added Borland Makefile
7443         * support/cpp2/borland.h: Removed
7444
7445 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
7446
7447         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
7448         * src/SDCC.lex: new pragma NOIV
7449         * src/SDCCglobl.h: new pragma NOIV
7450         * src/SDCCmem.c: new pragma NOIV
7451
7452 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
7453
7454         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
7455
7456 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
7457
7458         * src/SDCCmain.c: signal handling is switched off by --debug
7459         * doc/Makefile: small fix for install; use clean.mk again
7460         * doc/clean.mk: clean *.pdf and *.html too
7461
7462 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
7463
7464         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
7465         * device/lib/printfl.c: fix a ds390 bug by making it portable
7466         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
7467         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
7468         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
7469         * debugger/mcs51/cmd.c: converted multi-line string literals
7470         * sim/ucsim/globals.cc: converted multi-line string literals
7471         * src/SDCCmain.c: introduced signal handler to remove temp files
7472         * doc/Makefile: small tweaks, implement clean
7473         * doc: removed generated files
7474
7475 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7476
7477         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
7478         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
7479         Address Record is not correctly generated for DS390."
7480
7481 2003-02-02  Borut Razem <borut.razem AT siol.net>
7482
7483         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
7484         * as/mcs51/asm.h: fixed compilation with Borland C
7485         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
7486         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
7487         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
7488         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
7489         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
7490         src/z80/Makefile.bcc: delete $(LIB) only if exist
7491         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
7492
7493 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
7494
7495         * device/include/malloc.h: introduced NULL
7496         * device/include/string.h: introduced NULL
7497         * device/include/stdlib.h: introduced NULL
7498         * device/lib/_memcpy.c: removed NULL
7499         * device/lib/_strcat.c: removed NULL
7500         * device/lib/_strchr.c: removed NULL
7501         * device/lib/_strcmp.c: removed NULL
7502         * device/lib/_strcpy.c: removed NULL
7503         * device/lib/_strcspn.c: removed NULL
7504         * device/lib/_strlen.c: removed NULL
7505         * device/lib/_strncat.c: removed NULL
7506         * device/lib/_strncmp.c: removed NULL
7507         * device/lib/_strncpy.c: removed NULL
7508         * device/lib/_strpbrk.c: removed NULL
7509         * device/lib/_strrchr.c: removed NULL
7510         * device/lib/_strspn.c: removed NULL
7511         * device/lib/_strstr.c: removed NULL
7512         * device/lib/_strtok.c: removed NULL
7513         * device/lib/malloc.c: removed NULL, include own header
7514
7515 2003-02-02    <johan AT balder>
7516
7517         * 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
7518         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
7519         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
7520         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
7521         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
7522         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
7523
7524 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7525
7526         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
7527         area 'DATA'"
7528
7529 2003-02-01    <johan AT balder>
7530
7531         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
7532
7533 2003-01-31    <johan AT CP255758-A>
7534
7535         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
7536
7537 2003-01-30    <johan AT balder>
7538
7539         * src/SDCCBBlock.c: automatic bug detection
7540         * src/SDCCicode.c: automatic bug detection
7541
7542 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7543
7544         * src/SDCCglobl.h:   now --xram-size 0 works
7545         * src/SDCCmain.c:    now --xram-size 0 works
7546
7547 2003-01-29    <johan AT balder>
7548
7549         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
7550
7551 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7552
7553         * as/mcs51/aslink.h: Added options --xram-size and --code-size
7554         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
7555         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
7556         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
7557         * src/SDCCglobl.h:   Added options --xram-size and --code-size
7558         * src/SDCCmain.c:    Added options --xram-size and --code-size
7559
7560 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
7561
7562         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
7563         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
7564
7565 2003-01-27    <johan AT balder>
7566
7567         * src/SDCC.y: fixed bug #613764
7568
7569 2003-01-26    <johan AT balder>
7570
7571         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
7572         * src/SDCCsymt.h: fixed bug #673374
7573         * src/SDCCglue.c: fixed bug #661910
7574         * src/SDCCast.c: fixed bug #458099 and 673374
7575
7576 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
7577
7578         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
7579         * as/mcs51/strcmpi.h: added
7580         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
7581         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
7582         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
7583         * as/mcs51/assym.c: strcmpi -> as_strcmpi
7584         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
7585         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
7586         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
7587         * as/mcs51/Makefile.aslink: new module strcmpi
7588         * as/mcs51/Makefile.asx8051: new module strcmpi
7589         * as/mcs51/Makefil.bcc: new module strcmpi
7590         * as/mcs51/Makefile.in: new module strcmpi
7591         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
7592
7593 2003-01-26    <johan AT balder>
7594
7595         * src/SDCCglue.c: reverted back to 1.124
7596         * src/SDCCast.c: reverted back to 1.156
7597         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
7598
7599 2003-01-25    <johan AT balder>
7600
7601         * src/SDCCglue.c: A better fix for bug #661910
7602         * src/SDCCast.c: A better fix for bug #661910
7603         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
7604
7605 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
7606
7607         * src/Makefile.in: remove spawn.o
7608         * src/SDCCmain.c: remove spawn.h
7609         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
7610         * src/spawn.c: removed
7611         * src/spawn.h: removed
7612         * support/regression/ports/ds390/spec.mk: link with -r
7613
7614 2003-01-24    <johan AT CP255758-A>
7615
7616         * src/ds390/gen.c (aopOp): fixed bug #667458
7617         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
7618         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
7619         (createIvalCharPtr): an ival doesn't always have a storage class anymore
7620
7621 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
7622
7623         * src/mcs51/peeph.def: better assembler identation by Frieder
7624         * src/mcs51/gen.c: better assembler identation by Frieder
7625
7626 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
7627
7628         * as/z80/string.h: removed for gcc 3.2
7629         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
7630         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
7631
7632 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
7633
7634         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
7635         * src/SDCCpeeph.c (replaceRule): fix bug #663503
7636         * support/regression/Makefile: separate temp files for ports
7637         * support/regression/generate-cases.py: separate temp files for ports
7638         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
7639         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
7640
7641 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
7642
7643         * moved tinitalk to device/examples/ds390
7644
7645 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
7646
7647         * as/mcs51/lkmem.c: rflag is for DS390
7648         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
7649         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
7650                          (linkEdit): move mem- and map-files the same way as ihx-files
7651         * src/z80/main.c (_setDefaultOptions): removed --generic
7652         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
7653         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
7654         * src/pic/glue.c (picglue): --c1mode works again
7655         * src/pic16/glue.c (pic16glue): --c1mode works again
7656         * src/asm.c (printCLine): fix #660034
7657
7658 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
7659
7660         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
7661         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
7662         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
7663         * as/mcs51/lkmem (summary): better fix for sp problem
7664         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
7665         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
7666         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
7667                                               remove --stack-after-data
7668
7669 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
7670
7671         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
7672         * src/SDCCutil.c (join): ugly bug: missing '\0'
7673         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
7674
7675 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
7676
7677         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
7678         * src/port.h: typo
7679         * src/pic/main.c (_asmCmd): gpasm supports -o
7680         * src/z80/main.c: more general macros
7681         * device/lib/Makefile.in: remove intermediate files
7682
7683 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
7684
7685         * .version: Bumped version number to 2.3.3
7686         * src/SDCCBBlock.c: new option -o
7687         * src/SDCCglobl.h: new option -o
7688         * src/SDCCglue.c: new option -o
7689         * src/SDCCmain.c: new option -o
7690         * src/asm.c: new option -o
7691         * src/ds390/main.c: new option -o
7692         * src/pic/glue.c: new option -o
7693         * src/pic/pcode.c: new option -o
7694         * src/pic/ralloc.c: new option -o
7695         * src/pic16/glue.c: new option -o
7696         * src/pic16/pcode.c: new option -o
7697         * src/pic16/ralloc.c: new option -o
7698         * src/z80/main.c: new option -o
7699         * device/lib/Makefile.in: use -o
7700         * support/regression/ports/ds390/spec.mk: use -o
7701         * support/regression/ports/gbz80/spec.mk: use -o
7702         * support/regression/ports/mcs51/spec.mk: use -o
7703         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
7704         * support/regression/ports/z80/spec.mk: use -o
7705         * support/regression/ports/ucz80/spec.mk: use -o
7706         * support/regression/ports/xa51/spec.mk: use -o
7707         * support/regression/fwk/lib/timeout.c: fix usage string
7708
7709 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
7710         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
7711
7712 2003-01-07    <johan AT balder>
7713
7714         * src/SDCCast.c (decorateType): fixed bug #600035
7715
7716 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
7717         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
7718         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
7719         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
7720         * src/pic/pcode.c: outcommented unused variable to remove warnings
7721         * src/pic/ralloc.c: outcommented unused variable to remove warnings
7722
7723 2003-01-06    <karl AT turbobit.com>
7724         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
7725    regression tests.
7726
7727 2003-01-06    <johan AT balder>
7728
7729         * src/SDCCicode.c: fixed array add
7730
7731 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
7732         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
7733         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
7734
7735 2003-01-04    <johan AT balder>
7736
7737         * src/SDCCval.c (getNelements): fixed the initialized array of structures
7738
7739 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7740         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
7741
7742 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
7743         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
7744         * support/regression/tests/bug-524697.c: fit mem usage into 8032
7745
7746 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
7747         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
7748
7749 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
7750         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
7751
7752 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
7753         * src/mcs51/main.c: removed {bindir}{sep} from aslink
7754
7755 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7756
7757     * in \sdcc\as\mcs51\ changed these files in order to create an
7758     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
7759     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
7760     following files to include the previous two files: aslink.dsp,
7761     Makefile.aslink, Makefile.bcc, and Makefile.in.
7762
7763     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
7764     .adb instead of .cdb
7765
7766 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7767
7768         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
7769         value from option --iram-size.
7770
7771 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7772
7773         * \sdcc\as\mcs51\lklist.c: added boundary check before using
7774         dram[] array.
7775
7776 2002-09-18    <wiml AT hhhh.org>
7777
7778         * SDCClrange.h: exposed setFromRange() and setToRange()
7779         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
7780           packRegsForAccUse() (bug 542397)
7781         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
7782           multiple times and emitting the fetch operations more than once
7783           added aopGetUsesAcc() function to allow binary operators to
7784           fetch their operands in the correct order; made genMinus() emit
7785           compact code for X = LITERAL - Y
7786
7787 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7788         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
7789         sprintf() in line 1267.
7790
7791 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7792         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
7793         like ports.
7794
7795 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7796         Changes to aslink (All the changes are marked with 'JCF'):
7797
7798         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
7799         summary().
7800
7801         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
7802         area BSEG.  Also moves, if possible, the DATA area down into the internal
7803         ram so more space is available.
7804
7805         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
7806         sflag.
7807
7808         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
7809         not bytes.  Function summary() which creates a memory usage summary
7810         file with extension .mem.  Reports of overlaping stack and small stack
7811         size.  If the space for the stack is less than 16 bytes aslink trows a
7812         warning.
7813
7814         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
7815         the 8051.  Option 'y' for memory summary output file.
7816
7817         Changes to sdcc (All the changes are marked with 'JCF'):
7818
7819         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
7820
7821         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
7822         overlaying area for it (uses RegBankUsed[4]).
7823
7824         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
7825         bank zero as used by default.  By default aslink locates the stack
7826         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
7827         the creation of the .mem file.  Delegates the allocation of data area
7828         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
7829         the begining of the stack area to aslink.
7830
7831         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
7832         glue() in SDCCglue.c creates an area for it.
7833
7834 2002-09-03  Borut Razem <borut.razem AT siol.net>
7835         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
7836         sdcc/src/pic/glue.c:
7837         introduced atexit() handler for teporay files removal in case of
7838         errors, assertions, ...
7839
7840 2002-08-29  Borut Razem <borut.razem AT siol.net>
7841         * sdcc/support/cpp2/auto-host_vc_in.h:
7842         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
7843         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
7844         Maybe there is a similar problem with BORLANDC? It should be checked!
7845
7846         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
7847         corrected improper use of assert: the assignment to clr variable was done inside the assert.
7848         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
7849         was not executed, and the compiler (cl) launched a warning:
7850         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
7851
7852 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
7853         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
7854
7855 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
7856         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
7857
7858         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
7859           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
7860           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
7861           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
7862           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
7863           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
7864           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
7865         - added Release configuration in VS projects
7866         - review of compiler an linker options
7867         - VC .exe files are generated in bin_vc directory, not to interfere
7868           with binaries generated from other projects (cygwin, mingw, bcc ...)
7869
7870         * sdcc/src/yacc.dsp: added
7871
7872         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
7873         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
7874         and insert the version number definitions from .version
7875
7876         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
7877
7878         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
7879         added - genarate auto-host.h using auto-host_vc_in.h as template
7880
7881         * sdcc/sdcc_vc.h,
7882         removed from CVS, generated automatically
7883
7884 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
7885         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
7886
7887 2002-08-11  Borut Razem <borut.razem AT siol.net>
7888         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
7889
7890 2002-08-10  Borut Razem <borut.razem AT siol.net>
7891         * src/SDCCmain.c (main):
7892         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
7893         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
7894         The consequence was that some temporary files were not removed.
7895
7896         * src/SDCCglue.c:
7897         unification of code in functions tempfilename() and tempfile():
7898         function tempnam() is defined in Visual Studio 6.0 and .NET
7899
7900         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
7901
7902         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
7903           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
7904         - removed compiler command line option /WX: Treats all warnings as errors
7905         - update a list of source files, included into the project
7906
7907         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
7908           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
7909         changed project type to Generic Project so that can be correcly converted to VS.NET project
7910
7911         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
7912
7913         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
7914
7915         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
7916
7917         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
7918         added return 0 statements after assert() to make compiler happy
7919
7920         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
7921         added newline in the def file to keep MSC compiler satisfied
7922
7923         * sdcc/src/z80/gen.c:
7924         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
7925           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
7926         - solved MSC error in function aopDump()
7927
7928         * sdcc_vc.h: define PREFIX as "\\sdcc"
7929
7930 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
7931         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
7932
7933 2002-06-22  Scott Dattalo <scott AT dattalo.com>
7934         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
7935         - Rewrote the register banking algorithm.
7936         - Added pCode live-range analysis to registers (for now, only non-used and
7937         singly-used registers optimized away)
7938
7939         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
7940
7941         * 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.
7942
7943 2002-05-10  Scott Dattalo <scott AT dattalo.com>
7944         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
7945
7946 2002-04-22  Michael Hope  <michaelh AT vroom>
7947
7948         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
7949
7950         * configure.in (DD_COPT): Added include support required for gbdk.
7951
7952         * .version: Bumped version number just to increase it.
7953
7954         * src/SDCCmain.c: Added -nostdinc to the default options.
7955
7956 2002-04-15  Michael Hope  <michaelh AT vroom>
7957
7958         * device/lib/z80/printf.c (sprintf): Added.
7959
7960         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
7961
7962         * src/z80/peeph.def: Added transpose redundent load rule.
7963
7964         * src/z80/main.c: Added force callee saves for jaune.
7965
7966         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
7967
7968         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
7969
7970 2002-03-28  Johan Knol  <johan AT balder>
7971
7972         * src/SDCCval.c: fixed bug #532436
7973
7974 2002-03-14  Scott Dattalo <scott AT dattalo.com>
7975         * /src/port.h:
7976         Added "char *Processor" field to the port structure.
7977
7978         * /src/SDCCmain.c:
7979         Added -p option. Allows port dependent processor to be specified.
7980
7981         * all ports:
7982         Initialized the new field char *Processor field to NULL in all ports
7983
7984         * /src/pic/*:
7985         Compiler generated registers for interrupt context saving
7986         were not getting allocated.
7987
7988 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
7989
7990         * /src/SDCCast.c:
7991         Fixed left shift. Will promote the left side of a left shift
7992         if a) left shifting more than size of operand or b) when assigned
7993         to something size > size of left side
7994
7995 2002-03-14  Scott Dattalo <scott AT dattalo.com>
7996         * src/pic/*
7997         tons of changes. Register allocation has been
7998         rewritten. Added customization for the various PICs. Flow
7999         analysis is restructured. ...
8000
8001         * src/pic/device.h:
8002         Added
8003
8004         * src/pic/device.c:
8005         Added. device.c is a PIC port hack to accomodate variations
8006         in PIC devices.
8007
8008 2002-03-13  Michael Hope  <michaelh AT vroom>
8009
8010         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
8011
8012 2002-03-04  johanknol  <johanknol AT manik>
8013
8014         * /src/SDCCval.c: fixed
8015
8016         const unsigned char arr[][2] = { { 0, 1 } };
8017         t18.c:1: error: Initializer element is not constant
8018
8019 2002-03-04  bela  <bela AT manik>
8020
8021         * /device/include/mcs51reg.h:
8022         ds89c420 register definition update
8023
8024 2002-03-03    <johan AT FRIJA>
8025
8026         * support/Util/SDCCerr.c: did something, but don't no why anymore
8027
8028         * support/regression/tests/bug-524691.c: made it a little less shy
8029
8030         * src/SDCCast.c (decorateType): fixed bug #524697
8031
8032         * src/SDCCast.c: made some lineno improvements
8033
8034         * src/SDCCval.c (getNelements): changed warning to error
8035
8036         * src/SDCCglue.c (printIvalArray): changed warning to error
8037
8038         * src/SDCCicode.c: fixed a warning for mingw
8039
8040         * src/SDCCast.c (decorateType): fixed the << promotion for ops
8041
8042         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
8043
8044 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
8045
8046         * src/ds390/peeph.def:
8047         Added some more peephole rules
8048
8049         * src/ds390/gen.c: Various fixes & enhancements
8050
8051         * src/SDCClrange.c, src/SDCClrange.h:
8052         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
8053
8054         * src/ds390/ralloc.c:
8055         various fixes & enhancements (ds390) specific
8056
8057         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
8058         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
8059         from rallocs.
8060
8061         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
8062
8063 2002-03-02    <johan AT FRIJA>
8064
8065         * src/SDCCast.c (decorateType): fixed bug #524708
8066
8067         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
8068
8069         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
8070
8071 2002-03-01  Michael Hope  <michaelh AT vroom>
8072
8073         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
8074
8075         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
8076
8077 2002-03-01    <johan AT FRIJA>
8078
8079         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
8080
8081         * src/SDCCast.c (decorateType): fixed bug #524209
8082
8083         * src/SDCCval.c (valNot): fixed bug #524195
8084
8085 2002-02-26    <johan AT balder>
8086
8087         * src/xa51/gen.c: fixed a warning
8088
8089         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
8090
8091         * src/SDCCast.c (decorateType): fixed bug #522534
8092
8093 2002-02-23    <johan AT balder>
8094
8095         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
8096
8097 2002-02-22    <johan AT balder>
8098
8099         * src/SDCCast.c: fixed bug #514865
8100
8101         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
8102
8103 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
8104
8105         * sdcc/src/SDCCloop.c:
8106         Previous fix was not good. basic blocks that have "break" or "return" are
8107         not really partof a loop , but live ranges used in these blocks should
8108         be live thru the entire loop, so set partOfLoop but don't add them to
8109         loop region
8110
8111 2002-02-21    <johan AT FRIJA>
8112
8113         * src/SDCCcse.c: fixed bug #514308
8114
8115 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
8116
8117         * src/SDCCloop.c:
8118         Fixed BUG #519583. If a conditional block ended in a return/break
8119         statement inside a loop, it was not being considered part of the loop.
8120
8121         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
8122
8123 2002-02-10  Karl Bongers <karl AT turbobit.com>
8124
8125         * debugger/*:
8126         Fixed up SDCDB debugger somewhat.  Updated debugger/README
8127         with lots of comments and notes.
8128
8129         * device/examples/test2.c:
8130         Fix bug, "red" variable not being initialized(compiler complained).
8131
8132         * device/examples/Makefile, examples/test3.c:
8133         Add Makefile in device/examples folder, compiles test3.c
8134         for use as a multiple module SDCDB test case.
8135
8136         * sim/ucsim/cmd.src/cmdset.cc:
8137         Took out debug printfs in ucsim "next" command.
8138
8139         * sim/ucsim/xa.src:
8140         Karl and Johan start ucsim XA support.  Most dissassembly working,
8141         about 75% emulation done(plenty of work remaining).
8142
8143         * sim/ucsim/z80.src:
8144         Add Z80 support to ucsim, add test-ucz80 regression test,
8145         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
8146         Notice z80 compiler fails on examples/test3.c/crc code.
8147
8148 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
8149
8150         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
8151         Added support for --parms-in-bank1
8152
8153         * src/ds390/peeph.def:
8154         added a few more peephole optimzations
8155
8156         * src/ds390/main.c:
8157         1) added __builtin_inp & __builtin_outp used to read in data of given length
8158            from a memory mapped port
8159         2) added __builtin_memcmp
8160         3) added __builtin_swapw swap bytes of a short
8161
8162         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
8163         1) handle multiple send & receives from register bank1
8164         2) ralloc can now allocate DPTR1 to some liveRanges
8165
8166         * src/SDCCsymt.c, src/SDCCsymt.h:
8167         changes to handle multiple sends & receives
8168
8169         * src/SDCCptropt.h:
8170         added some pointer arithmetic optimization
8171
8172         * src/SDCCptropt.c:
8173         added some pointer arithmetic optimizations but not stable yet so not
8174         called from anywhere (will get this working shortly)
8175
8176         * src/SDCCopt.c: fixed for multiple sends & receives
8177
8178         * src/SDCCmain.c:
8179         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
8180         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
8181            set preprocessor defines (depending on options)
8182
8183         * src/SDCCicode.c, src/SDCCicode.h:
8184         changes made to handle multiple sends & receives
8185
8186         * src/SDCCglobl.h:
8187         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
8188
8189         * src/SDCCcse.c, src/SDCCcse.h:
8190         added function findbackward def (to be used in upcoming optimization)
8191
8192         * src/SDCCcflow.c, src/SDCCcflow.h:
8193         added function returnAtEnd - to determine if a basic block terminates with
8194         a RETURN iCode
8195
8196         * src/SDCCast.c, src/SDCCast.h:
8197         added option parms-in-bank1
8198
8199         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
8200         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
8201         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
8202         adjusted for --parms-in-bank1 option
8203
8204         * device/include/string.h:
8205         donot redefine "reentrant" keyword
8206
8207         * device/include/ds80c390.h: Added some more SFRs
8208
8209 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
8210
8211         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
8212
8213 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
8214
8215         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
8216
8217 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
8218
8219         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
8220
8221 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
8222
8223         * Added --xram-movc option
8224
8225 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
8226
8227         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
8228
8229 2002-01-11  Johan Knol
8230
8231         * Added math lib of Jesus Calvino-Fraga
8232
8233 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
8234
8235         * src/SDCCmain.c (processFile): fix processing of ../../src.c
8236         * support/regression/Makefile: new target test-mcs51-stack-auto
8237         * support/regression/ports/mcs51-stack-auto/spec.mk: added
8238
8239 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
8240
8241         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
8242
8243 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
8244
8245         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
8246
8247 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
8248
8249         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
8250
8251         * src/SDCCglue.h: add definition for printIvalChar()
8252
8253 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
8254
8255         * src/SDCCast.c: fix #498138 by Johan
8256
8257         * src/SDCCglue.c: fix #498138 by Johan
8258
8259 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
8260
8261         * support/regression/Makefile: fix clean
8262
8263         * support/regression/ports/ds390/support.c: fix transmission of last character
8264
8265 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
8266
8267         * /sdcc/src/ds390/gen.c:
8268         a) improved computing address of stack variable
8269         b) took out some #if 0 code
8270         c) improved parmBytes adjustment
8271         d) improved genPlusIncr & genMinusIncr
8272         e) genCmp could generate bad code (when left assigned to DPTR)
8273         f) Fixed bug in hasInc
8274
8275         * /sdcc/src/ds390/ralloc.c:
8276         a) packRegsForSupport could mess up live information (Fixed)
8277         b) packRegsDPTRuse could be incorrect for left & right shift
8278
8279         * /sdcc/src/mcs51/ralloc.c:
8280         packRegsForSupport could mess up the live information (Fixed)
8281
8282         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
8283
8284         * /sdcc/src/SDCCast.c:
8285         can reverse a loop even if function call is present as long
8286         as the loop control variable is local & is not passed as parameter
8287
8288 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8289
8290         * /sdcc/ChangeLog: *** empty log message ***
8291
8292         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
8293         More builtin function additions for TININative
8294
8295         * /sdcc/src/ds390/ralloc.c:
8296         Had broken the regression testsuite
8297
8298         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
8299
8300         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
8301         Added funcattr hasStackParms will be set for reentrant functions when there
8302         are paramteres on the stack, this helps in minimizing frame pointer generation
8303         typeFromStr can handle function pointers now
8304
8305         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
8306         *** empty log message ***
8307
8308 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8309
8310         * /src/ds390/gen.c, /src/ds390/main.c:
8311         More builtin function additions for TININative
8312
8313         * /src/ds390/ralloc.c:
8314         Had broken the regression testsuite
8315
8316         * /src/SDCCast.c: Fixed a bug in dumptree
8317
8318         * /src/SDCCsymt.c, /src/SDCCsymt.h:
8319         Added funcattr hasStackParms will be set for reentrant functions when there
8320         are paramteres on the stack, this helps in minimizing frame pointer generation
8321         typeFromStr can handle function pointers now
8322
8323         * /doc/builtins.txt, /doc/TININative.txt:
8324         *** empty log message ***
8325
8326
8327 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
8328
8329         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
8330         ALPHA version for -mTININative
8331
8332         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
8333         updated to reflect changes in the port structure
8334
8335         * /src/port.h:
8336         added function do_assemble (similar to do_link) if non-null this function
8337         will be called to do assembly (-mTININative) requires a multi command
8338         assembly
8339         added function genAssemblerEnd will be called to generate assembler Epilogue
8340
8341         * /src/SDCCsymt.c:
8342         added _JavaNative to debug info printing
8343
8344         * /src/SDCCmain.c: added option --tini-libid
8345         added port->do_assemble function (-mTININative) has a multi command assemble
8346
8347         * /src/SDCCglue.c: Disabled "constExpr" check
8348         added port->genAssemblerEnd function
8349
8350         * /src/SDCCglobl.h: Added option --tini-libid value
8351
8352         * /src/SDCCast.h:
8353         tookout optimizeCompare from the header (has no external references)
8354
8355         * /src/SDCCast.c: made one more function "static"
8356
8357 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
8358
8359         * src/z80/mappings.i: Added z80asm support.
8360
8361         * src/z80/main.c: Added z80asm support on --asm=z80asm
8362
8363         * src/z80/gen.c: Fixed asm portability issues.
8364
8365         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
8366
8367         * src/SDCCglue.c (printExterns): Added global/extern split.
8368
8369 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
8370
8371         * support/regression/Makefile: added test for mcs51 model large
8372
8373         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
8374
8375         * support/regression/ports/gbz80/spec.mk: added -mgbz80
8376
8377 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
8378
8379         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
8380
8381 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
8382
8383         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
8384
8385         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
8386
8387 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
8388
8389         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
8390
8391         * support/regression/tests/simplefloat.c: Port to mcs51.
8392
8393 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
8394         * support/regression/tests/bug-485362.c: Added.
8395
8396         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
8397
8398         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
8399
8400         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
8401
8402         * src/z80/gen.c (aopDump): Added a dump function.
8403
8404 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
8405         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
8406
8407         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
8408
8409         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
8410
8411         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
8412
8413         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
8414
8415         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
8416
8417         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
8418
8419         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
8420
8421         * support/regression/ports/ds390/support.c: Use tinibios.
8422
8423         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
8424
8425 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
8426
8427         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
8428         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
8429
8430         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
8431
8432         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
8433
8434 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
8435
8436         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
8437
8438         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
8439         (packRegsForIYUse): Created and optimised.
8440
8441 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
8442
8443         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
8444 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
8445
8446         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
8447
8448         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
8449
8450         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
8451
8452 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
8453
8454         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
8455
8456         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
8457
8458 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
8459
8460         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
8461
8462         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
8463
8464         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
8465
8466 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
8467
8468         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
8469         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
8470         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
8471
8472         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
8473
8474         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
8475         (genNotFloat): Added.
8476         (genUminusFloat): Added.
8477
8478         * device/lib/z80/Makefile: Added floating pt stubs.
8479
8480         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
8481
8482         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
8483
8484         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
8485
8486 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
8487
8488         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
8489
8490         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
8491
8492         * sdcc/support/regression/Makefile: Add port ds390.
8493
8494         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
8495
8496         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
8497
8498         * sdcc/support/regression/ports/ds390/spec.mk: Added.
8499
8500         * sdcc/support/regression/ports/ds390/support.c: Added.
8501
8502         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
8503
8504         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
8505
8506         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
8507
8508 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
8509
8510         * device/include/malloc.h: Added z80 and gbz80 support.
8511
8512         * device/lib/gbz80/heap.s: Added.
8513
8514         * device/lib/z80/heap.s: Added.
8515
8516         * device/lib/malloc.c: Added z80 and gbz80 support.
8517
8518         * support/regression/tests/malloc.c (testMalloc): Added.
8519
8520         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
8521
8522         * support/regression/tests/bug-478094.c: Added.
8523
8524         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
8525
8526 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
8527
8528         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
8529
8530         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
8531
8532         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
8533
8534         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
8535
8536         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
8537
8538 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
8539
8540         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
8541
8542 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
8543
8544         * support/regression/tests/bug-477927.c: Added.
8545
8546         * src/z80/peeph.def: Added minor rules.
8547
8548         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
8549
8550         * src/z80/peeph.def: Added jump optimisation modification.
8551
8552 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
8553
8554         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
8555
8556 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
8557
8558         * support/regression/tests/funptrs.c: Added.
8559
8560 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
8561
8562         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
8563
8564 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
8565
8566         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
8567
8568         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
8569
8570         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
8571         (movLeft2ResultLong): Created.
8572
8573         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
8574         (joinPushes): Added.  Joins two char pushes into a word push.
8575
8576 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
8577
8578         * support/cpp2/Makefile.in (install): Added creation of dest dir.
8579
8580         * support/makebin/Makefile (install): Added creation of dest dir.
8581
8582 2001-10-24 Karl Bongers <karl AT turbobit.com>
8583
8584         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
8585
8586 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
8587
8588         * src/z80/ralloc.c: Turned off faulty pack for one use.
8589
8590         * src/z80/peeph-gbz80.def: Removed redundent restart options.
8591
8592         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
8593
8594 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
8595
8596         * support/regression/Makefile: Improved clean
8597
8598         * support/regression/ports/gbz80/spec.mk: Added clean
8599
8600         * support/regression/ports/host/spec.mk: Added clean
8601
8602         * support/regression/ports/z80/spec.mk: Added clean
8603
8604         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
8605
8606         * support/regression/ports/mcs51/timeout.c: little improvements
8607
8608 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
8609
8610         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
8611
8612         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
8613
8614         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
8615
8616 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
8617
8618         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
8619
8620         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
8621
8622 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
8623         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
8624
8625         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
8626
8627         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
8628
8629         * src/mcs51/main.c (_linkCmd): Added bin path to command.
8630
8631         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
8632
8633         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
8634
8635         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
8636
8637         * support/regression/tests/longor.c: Added.
8638
8639 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
8640
8641         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
8642
8643         * as/mcs51/aslink.h: define PATH_MAX
8644
8645         * as/mcs51/asm.h: define PATH_MAX
8646
8647         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
8648
8649         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
8650
8651         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
8652
8653         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
8654
8655         * src/SDCCglobl.h: define PATH_MAX
8656
8657         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
8658
8659         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
8660
8661 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
8662
8663         * src/z80/gen.c (gencjneshort): Fixed
8664
8665         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
8666
8667 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
8668
8669         * support/regression/tests/bug-469671.c: Added.
8670
8671         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
8672
8673 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
8674
8675         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
8676
8677         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
8678
8679 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
8680
8681         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
8682
8683         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
8684
8685         * src/device/lib/_mullong.c : removed hint: nooverlay bug
8686
8687         * src/device/lib/_divuint.c : removed hint: nooverlay bug
8688
8689         * src/device/lib/_divulong.c: removed hint: nooverlay bug
8690
8691         * src/device/lib/_moduint.c : removed hint: nooverlay bug
8692
8693         * src/device/lib/_modulong.c: removed hint: nooverlay bug
8694
8695 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
8696
8697         * 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.
8698
8699         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
8700
8701         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
8702
8703 2001-10-07    <johan AT FRIJA>
8704
8705         * device/lib/gets.c (gets): fixed the return value.
8706
8707 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
8708         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
8709
8710         * 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.
8711
8712         * 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.
8713
8714         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
8715
8716         * src/pic/gen.c: Removed Safe_strdup.
8717
8718         * configure.in: Added option to enable libgc support.
8719
8720         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
8721         (bitVectUnion): Optimised.
8722         (bitVectIntersect): Optimised.
8723         (bitVectBitsInCommon): Optimised.
8724         (bitVectCplAnd): Optimised.
8725
8726         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
8727
8728 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
8729
8730         * src/SDCCmain.c: distinguish between assembler debug and plain options
8731
8732         * src/avr/main.c:   remove standard assembler options
8733
8734         * src/ds390/main.c: remove standard assembler options
8735
8736         * src/mcs51/main.c: remove standard assembler options
8737
8738         * src/port.h: removed "PENDING" comment
8739
8740 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
8741
8742         * src/device/lib/_mulint.c  : new, with assember functions
8743
8744         * src/device/lib/_mullong.c : new, with assember functions
8745
8746         * src/device/lib/_divuint.c : with assember functions
8747
8748         * src/device/lib/_divsint.c : with assember functions
8749
8750         * src/device/lib/_divulong.c: with assember functions
8751
8752         * src/device/lib/_divslong.c: with assember functions
8753
8754         * src/device/lib/_moduint.c : with assember functions
8755
8756         * src/device/lib/_modsint.c : with assember functions
8757
8758         * src/device/lib/_modulong.c: with assember functions
8759
8760         * src/device/lib/_modslong.c: with assember functions
8761
8762         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
8763
8764         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
8765
8766         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
8767                                       replaced _mululong.c and _mulslong.c by _mullong.c
8768
8769 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
8770
8771         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
8772
8773 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
8774
8775         * src/SDCCglue.c: test, if win32api is available for MINGW
8776
8777 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
8778
8779         * src/SDCCsymt.c: no more _modifier in printTypeChain()
8780         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
8781         * support/regression/ports/gbz80/spec.mk: removed GENERIC
8782         * support/regression/ports/host/spec.mk: removed GENERIC
8783         * support/regression/ports/mcs51/spec.mk: removed GENERIC
8784         * support/regression/ports/z80/spec.mk: removed GENERIC
8785
8786 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
8787
8788         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
8789
8790         * support/regression/tests/bug-467035.c: Created.
8791
8792 2001-10-01    <johan AT FRIJA>
8793
8794         * src/SDCC.y: fixed bug #466586 part 1
8795
8796 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
8797
8798         * SDCCicode.c: z80 has no generic pointers
8799         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
8800
8801 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
8802
8803         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
8804
8805 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
8806
8807         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
8808
8809         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
8810
8811 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
8812
8813         * configure.in: Fixed up so that ucsim is only configured once.
8814
8815         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
8816
8817         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
8818         (getPathDifference): As above.
8819
8820         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
8821
8822         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
8823
8824 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
8825         * .version: Updated to 2.3.1
8826
8827         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
8828         Added copyright header.
8829
8830         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
8831         (assemble): Added support for macro based assembler commands.
8832         (linkEdit): Added support for macro based linker commands.
8833         (preProcess): Changed the pre-processor to use macros.
8834         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
8835         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
8836
8837         * device/lib/z80/crt0.s: Added module name for debugging.
8838
8839 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
8840
8841         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
8842
8843         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
8844
8845         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
8846
8847         * src/Makefile.in: Added SDCCmacro and SDCCutil
8848
8849 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
8850
8851         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
8852
8853 2001-09-16    <johan AT FRIJA>
8854
8855         * 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.
8856
8857 2001-09-15    <johan AT FRIJA>
8858
8859         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
8860         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
8861
8862 2001-09-11    <johan AT FRIJA>
8863
8864         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
8865
8866 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
8867
8868         * support/regression/tests/bug-460444.c: Added test case.
8869
8870         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
8871         (genCast): Added justification for all of the asserts.
8872
8873 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
8874
8875         * support/regression/support.c: _xdata replaced by xdata
8876
8877         * support/regression/spec.mk: removed _generic
8878
8879 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
8880
8881         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
8882
8883         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
8884         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
8885
8886         * src/z80/peeph.def: Added a rule to optimise shift then compare.
8887
8888         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
8889
8890         * support/regression/tests/bug-460010.c: Added test case.
8891
8892         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
8893
8894 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
8895
8896         * support/regression/Makefile: inter-port-clean adjusted for mcs51
8897
8898         * support/regression/testfwk.c: removed workaround for bug #436344
8899
8900         * support/regression/tests/bp.c: use less memory with mcs51
8901
8902         * support/regression/tests/bug-441448.c: use less memory
8903
8904         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
8905
8906         * support/regression/collate-results.py: typo
8907
8908 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
8909
8910         * support/regression/tests/fetchoverlap.c: Added new test case.
8911
8912         * support/regression/tests/bp.c: Added new test case.
8913
8914         * support/regression/tests/bug-448984.c: Added new test case.
8915
8916         * support/regression/tests/pow2shifts.c: Added new test case.
8917
8918         * src/z80/gen.c: Turned off the noise it normally generates for the release.
8919         (genlshTwo): Fixed right shift for count > 8.
8920
8921         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
8922
8923 2001-09-08    <johan AT FRIJA>
8924
8925         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
8926
8927 2001-09-07    <johan AT FRIJA>
8928
8929         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
8930
8931         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
8932
8933 2001-09-06    <johan AT FRIJA>
8934
8935         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
8936         * bernhard noted me at this: "() equals to (void)" (1.38)
8937
8938 2001-09-05    <johan AT FRIJA>
8939
8940         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
8941
8942 2001-09-04    <johan AT FRIJA>
8943
8944         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
8945
8946
8947 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
8948
8949         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
8950
8951 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
8952
8953         * link/z80/aslink.h: Fixed path for PATH_MAX
8954
8955 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
8956
8957         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
8958
8959         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
8960
8961         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
8962
8963         * 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.
8964
8965 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
8966
8967         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
8968         (genCmp): Fixed up genCmp for the GB with longs.
8969
8970         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
8971
8972         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
8973
8974         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
8975
8976         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
8977
8978 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
8979
8980         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
8981
8982 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
8983
8984         * 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.
8985
8986         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
8987
8988 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
8989
8990         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
8991
8992         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
8993
8994 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
8995
8996   * sim/ucsim/configure:    little improvement of Cygwin-detection
8997   * sim/ucsim/configure.in: little improvement of Cygwin-detection
8998   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
8999   * support/regression/tests/bug-221100.c: small changes for mcs51
9000   * support/regression/tests/bug-221168.c: small changes for mcs51
9001   * support/regression/tests/bug-227710.c: small changes for mcs51
9002   * support/regression/tests/staticinit.c: small changes for mcs51
9003   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
9004   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9005   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
9006
9007 $Revision$