pCode live-range analysis algorithms have been added.
[fw/sdcc] / ChangeLog
1 2002-06-22  Scott Dattalo <scott@dattalo.com>
2         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced. 
3         - Rewrote the register banking algorithm. 
4         - Added pCode live-range analysis to registers (for now, only non-used and 
5         singly-used registers optimized away)
6
7         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
8
9         * support/scripts/inc2h.pl Kevin L. Pauba <klpauba@cox.net> submitted this perl script for converting MicroChip include files into SDCC Pic include files.
10         
11 2002-05-10  Scott Dattalo <scott@dattalo.com>
12         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
13         
14 2002-04-22  Michael Hope  <michaelh@vroom>
15
16         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
17
18         * configure.in (DD_COPT): Added include support required for gbdk.
19
20         * .version: Bumped version number just to increase it.
21
22         * src/SDCCmain.c: Added -nostdinc to the default options.
23
24 2002-04-15  Michael Hope  <michaelh@vroom>
25
26         * device/lib/z80/printf.c (sprintf): Added.
27
28         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
29
30         * src/z80/peeph.def: Added transpose redundent load rule.
31
32         * src/z80/main.c: Added force callee saves for jaune.
33
34         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
35
36         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
37
38 2002-03-28  Johan Knol  <johan@balder>
39
40         * src/SDCCval.c: fixed bug #532436
41
42 2002-03-14  Scott Dattalo <scott@dattalo.com>
43         * /src/port.h:
44         Added "char *Processor" field to the port structure.
45
46         * /src/SDCCmain.c:
47         Added -p option. Allows port dependent processor to be specified.
48
49         * all ports:
50         Initialized the new field char *Processor field to NULL in all ports
51
52         * /src/pic/*:
53         Compiler generated registers for interrupt context saving
54         were not getting allocated.
55                 
56 2002-03-16  Sandeep Dutta  <sandeep@ddi.com>
57
58         * /src/SDCCast.c:
59         Fixed left shift. Will promote the left side of a left shift
60         if a) left shifting more than size of operand or b) when assigned
61         to something size > size of left side
62
63 2002-03-14  Scott Dattalo <scott@dattalo.com>
64         * src/pic/*
65         tons of changes. Register allocation has been 
66         rewritten. Added customization for the various PICs. Flow
67         analysis is restructured. ...
68
69         * src/pic/device.h:
70         Added
71
72         * src/pic/device.c:
73         Added. device.c is a PIC port hack to accomodate variations
74         in PIC devices.
75
76 2002-03-13  Michael Hope  <michaelh@vroom>
77
78         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
79
80 2002-03-04  johanknol  <johanknol@manik>
81
82         * /src/SDCCval.c: fixed
83
84         const unsigned char arr[][2] = { { 0, 1 } };
85         t18.c:1: error: Initializer element is not constant
86
87 2002-03-04  bela  <bela@manik>
88
89         * /device/include/mcs51reg.h:
90         ds89c420 register definition update
91
92 2002-03-03    <johan@FRIJA>
93
94         * support/Util/SDCCerr.c: did something, but don't no why anymore
95
96         * support/regression/tests/bug-524691.c: made it a little less shy 
97
98         * src/SDCCast.c (decorateType): fixed bug #524697 
99
100         * src/SDCCast.c: made some lineno improvements
101
102         * src/SDCCval.c (getNelements): changed warning to error
103
104         * src/SDCCglue.c (printIvalArray): changed warning to error
105
106         * src/SDCCicode.c: fixed a warning for mingw
107
108         * src/SDCCast.c (decorateType): fixed the << promotion for ops
109
110         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
111
112 2002-03-02  Sandeep Dutta  <sandeep@ddi.com>
113
114         * src/ds390/peeph.def:
115         Added some more peephole rules
116
117         * src/ds390/gen.c: Various fixes & enhancements
118
119         * src/SDCClrange.c, src/SDCClrange.h:
120         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
121
122         * src/ds390/ralloc.c:
123         various fixes & enhancements (ds390) specific
124
125         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
126         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
127         from rallocs.
128
129         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
130
131 2002-03-02    <johan@FRIJA>
132
133         * src/SDCCast.c (decorateType): fixed bug #524708
134
135         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
136
137         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
138
139 2002-03-01  Michael Hope  <michaelh@vroom>
140
141         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
142
143         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
144
145 2002-03-01    <johan@FRIJA>
146
147         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
148
149         * src/SDCCast.c (decorateType): fixed bug #524209
150
151         * src/SDCCval.c (valNot): fixed bug #524195
152
153 2002-02-26    <johan@balder>
154
155         * src/xa51/gen.c: fixed a warning
156
157         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
158
159         * src/SDCCast.c (decorateType): fixed bug #522534
160
161 2002-02-23    <johan@balder>
162
163         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
164
165 2002-02-22    <johan@balder>
166
167         * src/SDCCast.c: fixed bug #514865
168
169         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
170
171 2002-02-21  Sandeep Dutta  <sandeep@ddi.com>
172
173         * sdcc/src/SDCCloop.c:
174         Previous fix was not good. basic blocks that have "break" or "return" are
175         not really partof a loop , but live ranges used in these blocks should
176         be live thru the entire loop, so set partOfLoop but don't add them to
177         loop region
178
179 2002-02-21    <johan@FRIJA>
180
181         * src/SDCCcse.c: fixed bug #514308
182
183 2002-02-20  Sandeep Dutta  <sandeep@ddi.com>
184
185         * src/SDCCloop.c:
186         Fixed BUG #519583. If a conditional block ended in a return/break
187         statement inside a loop, it was not being considered part of the loop.
188
189         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
190
191 2002-02-10  Karl Bongers <karl@turbobit.com>
192
193         * debugger/*:
194         Fixed up SDCDB debugger somewhat.  Updated debugger/README
195         with lots of comments and notes.
196
197         * device/examples/test2.c:
198         Fix bug, "red" variable not being initialized(compiler complained).
199
200         * device/examples/Makefile, examples/test3.c:
201         Add Makefile in device/examples folder, compiles test3.c
202         for use as a multiple module SDCDB test case.
203
204         * sim/ucsim/cmd.src/cmdset.cc:
205         Took out debug printfs in ucsim "next" command.
206
207         * sim/ucsim/xa.src:
208         Karl and Johan start ucsim XA support.  Most dissassembly working,
209         about 75% emulation done(plenty of work remaining).
210
211         * sim/ucsim/z80.src:
212         Add Z80 support to ucsim, add test-ucz80 regression test,
213         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
214         Notice z80 compiler fails on examples/test3.c/crc code.
215
216 2002-01-30  Sandeep Dutta  <sandeep@ddi.com>
217
218         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
219         Added support for --parms-in-bank1
220
221         * src/ds390/peeph.def:
222         added a few more peephole optimzations
223
224         * src/ds390/main.c:
225         1) added __builtin_inp & __builtin_outp used to read in data of given length
226            from a memory mapped port
227         2) added __builtin_memcmp
228         3) added __builtin_swapw swap bytes of a short
229
230         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
231         1) handle multiple send & receives from register bank1
232         2) ralloc can now allocate DPTR1 to some liveRanges
233
234         * src/SDCCsymt.c, src/SDCCsymt.h:
235         changes to handle multiple sends & receives
236
237         * src/SDCCptropt.h:
238         added some pointer arithmetic optimization
239
240         * src/SDCCptropt.c:
241         added some pointer arithmetic optimizations but not stable yet so not
242         called from anywhere (will get this working shortly)
243
244         * src/SDCCopt.c: fixed for multiple sends & receives
245
246         * src/SDCCmain.c:
247         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
248         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
249            set preprocessor defines (depending on options)
250
251         * src/SDCCicode.c, src/SDCCicode.h:
252         changes made to handle multiple sends & receives
253
254         * src/SDCCglobl.h:
255         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
256
257         * src/SDCCcse.c, src/SDCCcse.h:
258         added function findbackward def (to be used in upcoming optimization)
259
260         * src/SDCCcflow.c, src/SDCCcflow.h:
261         added function returnAtEnd - to determine if a basic block terminates with
262         a RETURN iCode
263
264         * src/SDCCast.c, src/SDCCast.h:
265         added option parms-in-bank1
266
267         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c 
268         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c 
269         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
270         adjusted for --parms-in-bank1 option
271
272         * device/include/string.h:
273         donot redefine "reentrant" keyword
274
275         * device/include/ds80c390.h: Added some more SFRs
276
277 2002-01-28  Bernhard Held  <bernhard@bernhardheld.de>
278
279         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4 
280
281 2002-01-26  Bernhard Held  <bernhard@bernhardheld.de>
282
283         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
284
285 2002-01-22  Bernhard Held  <bernhard@bernhardheld.de>
286
287         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
288
289 2002-01-18  Paul Stoffregen  <paul@pjrc.com>
290
291         * Added --xram-movc option
292
293 2002-01-13  Bernhard Held  <bernhard@bernhardheld.de>
294
295         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
296
297 2002-01-11  Johan Knol
298
299         * Added math lib of Jesus Calvino-Fraga
300
301 2002-01-08  Bernhard Held  <bernhard@bernhardheld.de>
302
303         * src/SDCCmain.c (processFile): fix processing of ../../src.c
304         * support/regression/Makefile: new target test-mcs51-stack-auto
305         * support/regression/ports/mcs51-stack-auto/spec.mk: added
306
307 2002-01-04  Bernhard Held  <bernhard@bernhardheld.de>
308
309         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
310
311 2002-01-04  Bernhard Held  <bernhard@bernhardheld.de>
312
313         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
314
315 2002-01-03  Bernhard Held  <bernhard@bernhardheld.de>
316
317         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
318
319         * src/SDCCglue.h: add definition for printIvalChar()
320
321 2002-01-02  Bernhard Held  <bernhard@bernhardheld.de>
322
323         * src/SDCCast.c: fix #498138 by Johan
324
325         * src/SDCCglue.c: fix #498138 by Johan
326
327 2002-01-02  Bernhard Held  <bernhard@bernhardheld.de>
328
329         * support/regression/Makefile: fix clean
330
331         * support/regression/ports/ds390/support.c: fix transmission of last character
332
333 2001-12-29  Sandeep Dutta  <sandeep@ddi.com>
334
335         * /sdcc/src/ds390/gen.c:
336         a) improved computing address of stack variable
337         b) took out some #if 0 code
338         c) improved parmBytes adjustment
339         d) improved genPlusIncr & genMinusIncr
340         e) genCmp could generate bad code (when left assigned to DPTR)
341         f) Fixed bug in hasInc
342
343         * /sdcc/src/ds390/ralloc.c:
344         a) packRegsForSupport could mess up live information (Fixed)
345         b) packRegsDPTRuse could be incorrect for left & right shift
346
347         * /sdcc/src/mcs51/ralloc.c:
348         packRegsForSupport could mess up the live information (Fixed)
349
350         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
351
352         * /sdcc/src/SDCCast.c:
353         can reverse a loop even if function call is present as long
354         as the loop control variable is local & is not passed as parameter
355
356 2001-12-24  Sandeep Dutta  <sandeep@ddi.com>
357
358         * /sdcc/ChangeLog: *** empty log message ***
359
360         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
361         More builtin function additions for TININative
362
363         * /sdcc/src/ds390/ralloc.c:
364         Had broken the regression testsuite
365
366         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
367
368         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
369         Added funcattr hasStackParms will be set for reentrant functions when there
370         are paramteres on the stack, this helps in minimizing frame pointer generation
371         typeFromStr can handle function pointers now
372
373         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
374         *** empty log message ***
375
376 2001-12-24  Sandeep Dutta  <sandeep@ddi.com>
377
378         * /src/ds390/gen.c, /src/ds390/main.c:
379         More builtin function additions for TININative
380
381         * /src/ds390/ralloc.c:
382         Had broken the regression testsuite
383
384         * /src/SDCCast.c: Fixed a bug in dumptree
385
386         * /src/SDCCsymt.c, /src/SDCCsymt.h:
387         Added funcattr hasStackParms will be set for reentrant functions when there
388         are paramteres on the stack, this helps in minimizing frame pointer generation
389         typeFromStr can handle function pointers now
390
391         * /doc/builtins.txt, /doc/TININative.txt:
392         *** empty log message ***
393
394
395 2001-12-24  Sandeep Dutta  <sandeep@ddi.com>
396
397         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
398         ALPHA version for -mTININative
399
400         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
401         updated to reflect changes in the port structure
402
403         * /src/port.h:
404         added function do_assemble (similar to do_link) if non-null this function
405         will be called to do assembly (-mTININative) requires a multi command
406         assembly
407         added function genAssemblerEnd will be called to generate assembler Epilogue
408
409         * /src/SDCCsymt.c:
410         added _JavaNative to debug info printing
411
412         * /src/SDCCmain.c: added option --tini-libid
413         added port->do_assemble function (-mTININative) has a multi command assemble
414
415         * /src/SDCCglue.c: Disabled "constExpr" check
416         added port->genAssemblerEnd function
417
418         * /src/SDCCglobl.h: Added option --tini-libid value
419
420         * /src/SDCCast.h:
421         tookout optimizeCompare from the header (has no external references)
422
423         * /src/SDCCast.c: made one more function "static"
424
425 2001-12-23  Michael Hope  <michaelh@juju.net.nz>
426
427         * src/z80/mappings.i: Added z80asm support.
428
429         * src/z80/main.c: Added z80asm support on --asm=z80asm
430
431         * src/z80/gen.c: Fixed asm portability issues.
432
433         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
434
435         * src/SDCCglue.c (printExterns): Added global/extern split.
436
437 2001-12-17  Bernhard Held  <bernhard@bernhardheld.de>
438
439         * support/regression/Makefile: added test for mcs51 model large
440
441         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
442
443         * support/regression/ports/gbz80/spec.mk: added -mgbz80
444
445 2001-12-05  Michael Hope  <michaelh@juju.net.nz>
446
447         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
448
449 1904-01-06  Michael Hope  <michaelh@juju.net.nz>
450
451         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
452
453         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
454
455 2001-12-02  Bernhard Held  <bernhard@bernhardheld.de>
456
457         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
458
459         * support/regression/tests/simplefloat.c: Port to mcs51.
460
461 2001-11-25  Michael Hope  <michaelh@juju.net.nz>
462         * support/regression/tests/bug-485362.c: Added.
463
464         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
465
466         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
467
468         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
469
470         * src/z80/gen.c (aopDump): Added a dump function.
471
472 2001-11-25  Bernhard Held  <bernhard@bernhardheld.de>
473         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
474
475         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
476
477         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
478
479         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
480
481         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
482
483         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
484
485         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
486
487         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
488
489         * support/regression/ports/ds390/support.c: Use tinibios.
490
491         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
492
493 2001-11-23  Michael Hope  <michaelh@juju.net.nz>support/regression/tests/bug-460010.c
494
495         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
496         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
497
498         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
499
500         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
501
502 2001-11-18  Michael Hope  <michaelh@juju.net.nz>
503
504         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
505
506         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
507         (packRegsForIYUse): Created and optimised.
508
509 2001-11-07  Michael Hope  <michaelh@juju.net.nz>
510
511         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
512 2001-11-18  Bernhard Held  <bernhard@bernhardheld.de>
513
514         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
515
516         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
517
518         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
519
520 2001-11-07  Bernhard Held  <bernhard@bernhardheld.de>
521
522         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
523
524         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
525
526 2001-11-07  Bernhard Held  <bernhard@bernhardheld.de>
527
528         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
529
530         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
531
532         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
533
534 2001-11-07  Michael Hope  <michaelh@juju.net.nz>
535
536         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
537         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
538         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
539
540         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
541
542         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
543         (genNotFloat): Added.
544         (genUminusFloat): Added.
545
546         * device/lib/z80/Makefile: Added floating pt stubs.
547
548         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
549
550         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
551
552         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
553
554 2001-11-07  Bernhard Held  <bernhard@bernhardheld.de>
555
556         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
557
558         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
559
560         * sdcc/support/regression/Makefile: Add port ds390.
561
562         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
563
564         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
565
566         * sdcc/support/regression/ports/ds390/spec.mk: Added.
567
568         * sdcc/support/regression/ports/ds390/support.c: Added.
569
570         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
571
572         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
573
574         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
575
576 2001-11-04  Michael Hope  <michaelh@juju.net.nz>
577
578         * device/include/malloc.h: Added z80 and gbz80 support.
579
580         * device/lib/gbz80/heap.s: Added.
581
582         * device/lib/z80/heap.s: Added.
583
584         * device/lib/malloc.c: Added z80 and gbz80 support.
585
586         * support/regression/tests/malloc.c (testMalloc): Added.
587
588         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
589
590         * support/regression/tests/bug-478094.c: Added.
591
592         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
593
594 2001-11-04  Bernhard Held  <bernhard@bernhardheld.de>
595
596         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
597
598         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
599
600         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
601
602         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
603
604         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
605
606 2001-11-04  Michael Hope  <michaelh@juju.net.nz>
607
608         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
609
610 2001-11-03  Michael Hope  <michaelh@juju.net.nz>
611
612         * support/regression/tests/bug-477927.c: Added.
613
614         * src/z80/peeph.def: Added minor rules.
615
616         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
617
618         * src/z80/peeph.def: Added jump optimisation modification.
619
620 2001-11-01  Michael Hope  <michaelh@juju.net.nz>
621
622         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
623
624 2001-10-30  Michael Hope  <michaelh@juju.net.nz>
625
626         * support/regression/tests/funptrs.c: Added.
627
628 2001-10-29  Michael Hope  <michaelh@juju.net.nz>
629
630         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
631
632 2001-10-28  Michael Hope  <michaelh@juju.net.nz>
633
634         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
635
636         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
637
638         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
639         (movLeft2ResultLong): Created.
640
641         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
642         (joinPushes): Added.  Joins two char pushes into a word push.
643
644 2001-10-27  Michael Hope  <michaelh@juju.net.nz>
645
646         * support/cpp2/Makefile.in (install): Added creation of dest dir.
647
648         * support/makebin/Makefile (install): Added creation of dest dir.
649
650 2001-10-24 Karl Bongers <karl@turbobit.com>
651
652         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
653
654 2001-10-21  Michael Hope  <michaelh@juju.net.nz>
655
656         * src/z80/ralloc.c: Turned off faulty pack for one use.
657
658         * src/z80/peeph-gbz80.def: Removed redundent restart options.
659
660         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
661
662 2001-10-21  Bernhard Held  <bernhard@bernhardheld.de>
663
664         * support/regression/Makefile: Improved clean
665
666         * support/regression/ports/gbz80/spec.mk: Added clean
667
668         * support/regression/ports/host/spec.mk: Added clean
669
670         * support/regression/ports/z80/spec.mk: Added clean
671
672         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
673
674         * support/regression/ports/mcs51/timeout.c: little improvements
675
676 2001-10-17  Michael Hope  <michaelh@juju.net.nz>
677
678         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
679
680         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
681
682         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
683
684 2001-10-16  Bernhard Held  <bernhard@bernhardheld.de>
685
686         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
687
688         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
689
690 2001-10-13  Michael Hope  <michaelh@juju.net.nz>
691         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
692
693         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
694
695         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
696
697         * src/mcs51/main.c (_linkCmd): Added bin path to command.
698
699         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
700
701         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
702
703         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
704
705         * support/regression/tests/longor.c: Added.
706
707 2001-10-11  Bernhard Held  <bernhard@bernhardheld.de>
708
709         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
710
711         * as/mcs51/aslink.h: define PATH_MAX
712
713         * as/mcs51/asm.h: define PATH_MAX
714
715         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
716
717         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
718
719         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
720
721         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
722
723         * src/SDCCglobl.h: define PATH_MAX
724
725         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
726
727         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
728
729 2001-10-11  Michael Hope  <michaelh@juju.net.nz>
730
731         * src/z80/gen.c (gencjneshort): Fixed
732
733         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
734
735 2001-10-09  Michael Hope  <michaelh@juju.net.nz>
736
737         * support/regression/tests/bug-469671.c: Added.
738
739         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
740
741 2001-10-08  Michael Hope  <michaelh@juju.net.nz>
742
743         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
744
745         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
746
747 2001-10-08  Bernhar Held  <bernhard@bernhardheld.de>
748
749         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
750
751         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
752
753         * src/device/lib/_mullong.c : removed hint: nooverlay bug
754
755         * src/device/lib/_divuint.c : removed hint: nooverlay bug
756
757         * src/device/lib/_divulong.c: removed hint: nooverlay bug
758
759         * src/device/lib/_moduint.c : removed hint: nooverlay bug
760
761         * src/device/lib/_modulong.c: removed hint: nooverlay bug
762
763 2001-10-07  Michael Hope  <michaelh@juju.net.nz>
764
765         * 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.
766
767         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
768
769         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
770
771 2001-10-07    <johan@FRIJA>
772
773         * device/lib/gets.c (gets): fixed the return value.
774
775 2001-10-06  Michael Hope  <michaelh@juju.net.nz>
776         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
777
778         * 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.
779
780         * 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.
781
782         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
783
784         * src/pic/gen.c: Removed Safe_strdup.
785
786         * configure.in: Added option to enable libgc support.
787
788         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
789         (bitVectUnion): Optimised.
790         (bitVectIntersect): Optimised.
791         (bitVectBitsInCommon): Optimised.
792         (bitVectCplAnd): Optimised.
793
794         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
795
796 2001-10-03 Bernhard Held <bernhard@bernhardheld.de>
797
798         * src/SDCCmain.c: distinguish between assembler debug and plain options
799
800         * src/avr/main.c:   remove standard assembler options
801
802         * src/ds390/main.c: remove standard assembler options
803
804         * src/mcs51/main.c: remove standard assembler options
805
806         * src/port.h: removed "PENDING" comment
807
808 2001-10-03 Bernhard Held <bernhard@bernhardheld.de>
809
810         * src/device/lib/_mulint.c  : new, with assember functions
811
812         * src/device/lib/_mullong.c : new, with assember functions
813
814         * src/device/lib/_divuint.c : with assember functions
815
816         * src/device/lib/_divsint.c : with assember functions
817
818         * src/device/lib/_divulong.c: with assember functions
819
820         * src/device/lib/_divslong.c: with assember functions
821
822         * src/device/lib/_moduint.c : with assember functions
823
824         * src/device/lib/_modsint.c : with assember functions
825
826         * src/device/lib/_modulong.c: with assember functions
827
828         * src/device/lib/_modslong.c: with assember functions
829
830         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
831
832         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
833
834         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
835                                       replaced _mululong.c and _mulslong.c by _mullong.c
836
837 2001-10-03 Bernhard Held <bernhard@bernhardheld.de>
838
839         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
840
841 2001-10-01 Bernhard Held <bernhard@bernhardheld.de>
842
843         * src/SDCCglue.c: test, if win32api is available for MINGW
844
845 2001-10-01 Bernhard Held <bernhard@bernhardheld.de>
846
847         * src/SDCCsymt.c: no more _modifier in printTypeChain()
848         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
849         * support/regression/ports/gbz80/spec.mk: removed GENERIC
850         * support/regression/ports/host/spec.mk: removed GENERIC
851         * support/regression/ports/mcs51/spec.mk: removed GENERIC
852         * support/regression/ports/z80/spec.mk: removed GENERIC
853
854 2001-10-01  Michael Hope  <michaelh@juju.net.nz>
855
856         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
857
858         * support/regression/tests/bug-467035.c: Created.
859
860 2001-10-01    <johan@FRIJA>
861
862         * src/SDCC.y: fixed bug #466586 part 1
863
864 2001-10-01  Johan Knol <johan.knol@iduna.nl>
865
866         * SDCCicode.c: z80 has no generic pointers
867         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
868         
869 2001-09-30  Michael Hope  <michaelh@juju.net.nz>
870
871         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
872
873 2001-09-29  Michael Hope  <michaelh@juju.net.nz>
874
875         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
876
877         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
878
879 2001-09-25  Michael Hope  <michaelh@juju.net.nz>
880
881         * configure.in: Fixed up so that ucsim is only configured once.
882
883         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
884
885         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
886         (getPathDifference): As above.
887
888         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
889
890         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
891
892 2001-09-23  Michael Hope  <michaelh@juju.net.nz>
893         * .version: Updated to 2.3.1
894
895         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
896         Added copyright header.
897
898         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
899         (assemble): Added support for macro based assembler commands.
900         (linkEdit): Added support for macro based linker commands.
901         (preProcess): Changed the pre-processor to use macros.
902         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
903         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
904
905         * device/lib/z80/crt0.s: Added module name for debugging.
906
907 2001-09-20  Michael Hope  <michaelh@juju.net.nz>
908
909         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
910
911         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
912
913         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
914
915         * src/Makefile.in: Added SDCCmacro and SDCCutil
916
917 2001-09-19  Michael Hope  <michaelh@juju.net.nz>
918
919         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
920
921 2001-09-16    <johan@FRIJA>
922
923         * 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.
924
925 2001-09-15    <johan@FRIJA>
926
927         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
928         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
929
930 2001-09-11    <johan@FRIJA>
931
932         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
933
934 2001-09-10  Michael Hope  <michaelh@juju.net.nz>
935
936         * support/regression/tests/bug-460444.c: Added test case.
937
938         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
939         (genCast): Added justification for all of the asserts.
940
941 2001-09-10  Bernhard Held <bernhard@bernhardheld.de>
942
943         * support/regression/support.c: _xdata replaced by xdata
944
945         * support/regression/spec.mk: removed _generic
946
947 2001-09-09  Michael Hope  <michaelh@juju.net.nz>
948
949         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
950
951         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
952         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
953
954         * src/z80/peeph.def: Added a rule to optimise shift then compare.
955
956         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
957
958         * support/regression/tests/bug-460010.c: Added test case.
959
960         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
961
962 2001-09-09  Bernhard Held <bernhard@bernhardheld.de>
963
964         * support/regression/Makefile: inter-port-clean adjusted for mcs51
965
966         * support/regression/testfwk.c: removed workaround for bug #436344
967
968         * support/regression/tests/bp.c: use less memory with mcs51
969
970         * support/regression/tests/bug-441448.c: use less memory
971
972         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
973
974         * support/regression/collate-results.py: typo
975
976 2001-09-08  Michael Hope  <michaelh@juju.net.nz>
977
978         * support/regression/tests/fetchoverlap.c: Added new test case.
979
980         * support/regression/tests/bp.c: Added new test case.
981
982         * support/regression/tests/bug-448984.c: Added new test case.
983
984         * support/regression/tests/pow2shifts.c: Added new test case.
985
986         * src/z80/gen.c: Turned off the noise it normally generates for the release.
987         (genlshTwo): Fixed right shift for count > 8.
988
989         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
990
991 2001-09-08    <johan@FRIJA>
992
993         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
994
995 2001-09-07    <johan@FRIJA>
996
997         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
998
999         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
1000
1001 2001-09-06    <johan@FRIJA>
1002
1003         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
1004         * bernhard noted me at this: "() equals to (void)" (1.38)
1005
1006 2001-09-05    <johan@FRIJA>
1007
1008         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
1009
1010 2001-09-04    <johan@FRIJA>
1011
1012         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
1013
1014
1015 2001-09-04  Paul Stoffregen  <paul@pjrc.com>
1016
1017         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
1018
1019 2001-09-03  Michael Hope  <michaelh@juju.net.nz>
1020
1021         * link/z80/aslink.h: Fixed path for PATH_MAX
1022
1023 2001-09-02  Michael Hope  <michaelh@juju.net.nz>
1024
1025         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
1026
1027         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
1028
1029         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
1030
1031         * 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.
1032
1033 2001-09-01  Michael Hope  <michaelh@juju.net.nz>
1034
1035         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
1036         (genCmp): Fixed up genCmp for the GB with longs.
1037
1038         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
1039
1040         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
1041
1042         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
1043
1044         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
1045
1046 2001-08-30  Paul Stoffregen  <paul@pjrc.com>
1047
1048         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
1049
1050 2001-08-30  Michael Hope  <michaelh@juju.net.nz>
1051
1052         * 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.
1053
1054         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
1055
1056 2001-08-29  Michael Hope  <michaelh@juju.net.nz>
1057
1058         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
1059
1060         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
1061
1062 2001-08-30 Bernhard Held   <bernhard@bernhardheld.de>
1063
1064   * sim/ucsim/configure:    little improvement of Cygwin-detection      
1065   * sim/ucsim/configure.in: little improvement of Cygwin-detection      
1066   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
1067   * support/regression/tests/bug-221100.c: small changes for mcs51
1068   * support/regression/tests/bug-221168.c: small changes for mcs51
1069   * support/regression/tests/bug-227710.c: small changes for mcs51
1070   * support/regression/tests/staticinit.c: small changes for mcs51
1071   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
1072   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
1073   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601