Release 2.1.9G
- Applied several patches provided by "Anton Voloshin" <vav@isv.ru> mainly to SDCCglue.c, SDCCmain.c & sdcdb/cmd.c
- First parameter of struct member function pointer not passed in register.
- Parameter passing problem if first parameter of a routine passed as second parm of another routine, vice versa. This bug would caused some of the library routines to fail.
- Address of structure member passed as parameter caused problems.
- #pragma callee-saves did not always work.
- Furthur bug fix for live range computation within loops.
- Register 'b' could be clobbered when there was '*', '/' or '%' operation for generic pointers.
- initialisation for pointers to structure elements in code space generated errors.
- Debugger info lost when multiple files were linked .
- Fixed buf in printf_large.c(vsprintf called with wrong parms) .
- "extern" variables when spilt did not allocate spill locations . i.e. "sloc" undefined error. .
- Added optimization for PUSH. "xdata" variables do not need to be assigned to temps to be pushed. .
- Fixed aliasing problem where some pointer sub expressions were carried across basic blocks .
- Upgraded to version 0.2.36 of ucsim .
- Added new optimization within basic blocks pointer set values will replace get pointer values within a basic block. (across basic blocks is a little bit complex will have to think about it some more).
which in plain english means.
a->b = 10;
putchar(a->b);
will come..
a->b = 10;
putchar(10);
Release 2.1.9F
- pointers passed to functions as parameters are removed from cse list.
- live range computation for variables inside loops improved.
- upgraded ucsim to latest release 0.2.31
- loop invariant bug fix for (global variables assigned constant values inside a loop)
- Applied patch provided by "Anton Voloshin" <vav@isv.ru> rel files put into separate lines in the .lnk file.
- union of structures caused compiler to generate incorrect code for member access.
- added patch to vprintf.c to null terminate output string. BESSIERE_Jerome@stna.dgac.fr (BESSIERE Jerome)
- Debugger had problem with structures/unions on stack
- Debugger will now stop when simulator stops even when break point not hit.
- Debugger will display simulators "startup message", this makes it a clearer to the user that the debugger is actually piggy backing on top of the simulator.
- Applied patch to assembler/linker some names were getting truncated @ 8 characters . patch by "Anton Voloshin" <vav@isv.ru>
- _gptrput.c was leaving a byte on stack if unknown storage class.
- parameter passing was incorrect for reentrant functions when prototype declared without parameter name.
Release 2.1.9E
- "remat " was not being cleared for global variables.
- stack offset of a variable computed incorrectly in some situations.
- Applied patch for floating point routine provided by Wojciech Zabolotny <wzab@ise.pw.edu.pl>
- Force allocation of local variable if address taken (even if not initialised)
- Fixed loop reversal bug .
- Fixed another bug in register allocator , long variables can be printfed now.
- DEBUGGER can now print values on stack and aggregates.
- Upgraded to 0.2.26 of ucsim.
Release 2.1.9D
- Fixed loop optimization bug was treating variables defined twice as loop induction.
- Fixed loop optimization constrained induction variable detection.
- Fixed bug in some floating point routines (fix provided by Wojciech Zabolotny <wzab@ise.pw.edu.pl>)
- Fixed code generation bug for return literal floating point.
- Fixed register packing was not moving return value under certain conditions.
- Improved error recovery for undefined symbols.
Release 2.1.9C
- Fixed bug with register allocation, effected mostly large routines compiled using the --model-large option.
- Fixed bug in array of structures dereferncing.
- Simplified the intermediate code generattion , removed some tree nodes. The parser will not generate nodes with structure derefs, and the operators +=,-= ..etc will be changed at parse time, this creates a simplififed parse tree.
- Upgraded to latest version of "gc", compile problems on Redhat 6.0 should be fixed.
- Fixed passing simulator parameters from the debugger command line.
- Fixed problem with the floating point routines.
Release 2.1.9B
- Fixed pointer access and array reference bug introduced in the previous version.
- integrated ucsim.0.2.25
- Fixed bug for code not generated for global pointers assigned to address of array element.
- Fixed one more bug in live range computation.
- Fixed bug in register allocator , it was overwriting computed liverange values.
Release 2.1.9A
- Fixed bug in common subexpression elimination, problem was found when a local variable was assigned values more than once in a basic block.
- Added warning when a "void" object is cast to a non-void object.
- Added warning when a non-pointer type is cast to a _generic pointer.
- Added a peephole optimization rule to remove some moves.
- Fixed problem in register packing , registers assigned to parameters were not being saved on the stack.
- Bug in loop inductions, the induction variable detection was not correctly replacing all references.
- Merged bug fixes provided by Wojciech Stryjewski <wstryj1@tiger.lsu.edu to> SDCCgen51.c
- Local variable treated as invariant even when address is taken.
- Fixed Parameter problem for functions with empty bodies.
- Fixed problem with array dereferncing when array of pointers.
Release 2.1.9
- Integrated new simulator from Daniel "ucsim-0.20.xx"
- .cdb file will be created always, and will contain global variables & function entry/extis information always. This will facilitate debuggers especially NoICE.
- Fixed bug when using typedefed types in a structure.
- Fixed aliasing bug in the loop optimizer, when a global array is used in a loop it should not be treated as an invariant if there are function calls in the loop.
- Fixed problem with register allocation, this was causing some of the "long" routines to fail.
- Fixed problem of clobbering value of _bp.
- Fixed problem of clobbering acc when a long variable is the first argument to a reentrant function.
- Fixed a peephole optimizer problem, when it was changing the ljmp to a sjmp in a jump-table.
- Enhanced the initialization routines to support initialization with '&' operations.
Release 2.1.8
- Void function returning value check was not working properly.(fixed)
- Assigning 'void' values to variables will generate warning.
- Improved register allocation to use "acc" , this will improve code generation , but for this register color is severely restricted, will gradually work on improving this. This reduces the redundant register moved drastically (once totally implemented)
- Added some peephole rules eliminate jump to jumps.
- Bug in SDCCgen51.c when using a bit variable (locally defined) in an if statement.
- Literal values being cast to pointers was not working.
- 'volatile' arrtibute for structure/union elements were bieng ignored. Now we can selectively declare structure elements to be volatile.
- Did some profiling to improve performance, changed peephole optimizer a little with profiler feedback.
- Was generating incorrect "cjne" code under some situations.
- Improved data flow computation.
- Fixed bug in geniCodeCast for floating point conversions.
- Fixed bug in modulong routine found by Béla Török <aseht@ms1.kssg.ch>
- Fixed bug for long shift left found by Béla Török <aseht@ms1.kssg.ch>
- Fixed bug with register allocator , was marking variables as rematerializable too aggresively.
- Added --version option.
- Fixed problem of compiling source files not in current directory.
- Fixed a bug in a bitvector routine (bitVectResize)
- Added error message when "continue/break" are out of context.
- Fixed bug in error checking for uninitialised local variables.
- Fixed bug in code generation for not (!) operation.
- Fixed bug in live range computation when intervenening unreachable block is present.
- Changed register saving scheme, bank will be saved only when called from a interrupt service routine.
- Fixed bug with >> and << with unknown shift count.
- The fix to the bit vector exposed some problem with the register allocation, fixed now.
- Added an extra heuristic for register spilling, now the spilling will a lot lower than before.
- Added some more optimizations for register packing.
- Added a bunch of preprocessor options see command line options in the documentation for details.
- Some cosmetics like timestamp in .asm in addition to Version Number.
- fixed another bug with live range computation.
- Automatic static variables will not be assigned to registers.
- The parameter name mangling a little so that it gives the warnings/errors with the correct name, also required for debugger.
- Jean Louis fixed some bugs with shifting "long" variables.
- Fixed bug of access of local bit variables when compiling with --model-large
- Fixed two bugs in Register allocator.
- Added fix to peephole optimizer rule matching , fixed provided by Frieder.
- "Mark O'Farrell" <ofarrell@haq.com.au> added segment type to the segment definition.
- "Mark O'Farrell" <ofarrell@haq.com.au> added option to start stack after the data segment --stack-after-data (see documentation)
- Changed the computation for default stack location, now if all four banks are used the stack will be placed after the data segment (--stack-after-data), so as not to clobber the bit segment (this should make Daniel Drotos happy:).
- Compiler will no longer crash when an uninitialised local variable is detected.
- Fixed bug for bad code generation for anl,xor & or when operand is on stack .
- Fixed bug for side effecting parameters when calling a reentrant function.
- Improved optimization for ++ & -- operation when operand is on stack.
- Was STILL saving entire register bank when calling function with different register bank from non ISR function.
- Changed register saveing for ISR functions not using register bank (see documentation [Interrupt Service Routines])
- Josef Wolf <jw@raven.inka.de> provided a set of serial routines which do not use the external ram (ser_ir.c), included these as libraries.
- PSW was not being saved for ISRs with no register bank specification.
- Integrated Daniel's simulator with the compiler source distribution.
- Added reduced "printf" routine it works but is very resource intensive.
- Certain complex pointer declarations were not being handled correctly.
- switch statements with empty bodies were causing the compiler to crash.
- sizeof union object computed incorrectly.
- union element when passed as parameter to a function generated incorrect code.
- Martijn van Balen <balen@natlab.research.philips.com> provided a complete set of printf routines including sprintf.
- Fixed bug when union member is a pointer and is used on the right side of an assignment.
- Improved register allocation for arrays, structure & union members in data space will no longer be spilt.
- Some optimizations for pointer access had got clobbered put them back.
- Fixed bug for right shifting signed quantity by zero.
- Constant propagation had problem when long variables were used in division.
- Fixed bug in register allocator on rare situations it saved wrong live ranges.
- Fixed Bug with Backend (gen51.c) incorrect code was generated when far space variable assigned o variable in far space.
- Fixed problem with loop invariant processing, was not taking into consideration when address or pointer was passed as parameter to a function.
- Added --help & -h option.
- Added the peephole optimization rules provided by Frieder <fe@lake.iup.uni-heidelberg.de>
- Function prototypes without parameter names were occasionally causing problems.
- Fixed problem with _spx inc/dec when using xternal stack.
- Register allocation bug
- Addition of constant to generic pointer was causing problems sometimes.
- Improved register allocation some more.
- Fixed bug in live range analysis (for some complex contro flow situations.
- Fixed bug of 'b' getting clobbered in some left & right shift operations.
- Added --callee-saves (documentation updated)
- Fixed bug in hTabDeleteItem() in SDCChasht.c (exposed during debugger development)
- Fixed bug in grammar .. to allow absolute address for local "bit" variables.
- Added #pragma CALLEE-SAVES (same effect as --calle-saves)
- Added #pragma EXCLUDE (see docs)
- Fixed problem xrl generating incorrect code.
- Yet another problem in register allocator fixed.
- Fixed a bug with dataflow computation, was computing pointer kills incorrectly.
- Added loop reversal.
- Fixed bug in structure declaration
- Fixed floating point routines
- Fixed parsing problem for LONG hex constants
- Fixed bug to allow local variables to be declared in 'code' space.
- Fixed bug in code generation for floating point .
- Parameters access was incorrect when callee-saves && reentrant.
- Fixed bug in hashTable routine.
- Fixed bug when string initialisers are used for char arrays with bounds.
- Was generating incorrect code when options --model-large && --stack-auto were used together
- Replaced 32bit multiplication routine with JeanLouis VERN's much better routine.
- Fixed problem with loop-reversing
- Introduced parameter passing using registers.
- Applied improvements/cleanups supplied by Larry Dolittle.
- Moved the variable substitution by register equivalent to earlier phase , this generates much more optimized code.
- Compiler crashed when first parameter was declared "const"
- Assembler generated bad opcode for "djnz" when the "." operator was used.
Release 2.1.7
- Fixed a bug in the DEF-USE chaining algorithm , was keeping some dead DEFs alive in the DEF bit vector of a symbol.
- Fixed bug with "(null)" operand generated in rare situations.
- Trefor <Trefor@magera.freeserve.co.uk> did some more clean up.
- Fixed bug that was introduced with '&' with a literal.
- Added alternate serial package provided by "Wolfgang Esslinger "<wolfgang@WiredMinds.com> in ./sdcc51lib/_ser.c (documentation updated)
- Added Header file sab80515.h provided by Béla Török <aseht@ms1.kssg.ch>
- Had made flow computation for global variables too restrictive, now constant propagation will be allowed with global variables.
Release 2.1.6
Fixed bug in the routines _*2fs.c the variable 'sign' should be declared as 'long'. Included _char2fs in libfloat.lib Fixed register allocator bug for allocating pointers (found by "Dr. Ed Croson" <soarebc@internetcds.com>). Furthur loop induction variable detection improvement. Changed loop induction detection so that it does not treat global variables as induction any more, this saves some code, since assignments to global variables cannot be easily eliminated. Fixed problem of __sdcc_program_startup being out of range when large amount of initialization code is present. Fixed bug with function returning pointers. Changed register allocation to aggressively allocate local variables to registers, users will see a vast improvement in the generated code, not only in terms of speed but also in terms of data space utilization. Previously if there were multiple definitions for a local variable flowing into a basic block the compiler would allocate space for the variable, now it will allocate space only if it runs out of registers. Jean-Louis VERN (jlvern@<writeme.com>) has done some more enhancements to the code generator ..... his comments. I did some light improvement s:
- increment 16&32bits
- decrement 16&32bits
- assignment with literal
- return with literal
and some cosmetics before optimizing mult and div...*"BESSIERE Jerome" <BESSIERE_Jerome@stna.dgac.fr> made a lot of improvements to the support routines, these include reducing some memory leaks.. here are his comments. //* Incorrect call of werror(E_OUT_OF_MEM,...);
//* 1-a In file SDCCBBlock.c / function iCodeBreakDown (...)
//* 1-b In file SDCChasht.c / function newHashTable(...)
//* 1-c In file SDCCmain.c / function parseCmdLine(...)//* Sometime the compiler crash due to compilation error
//* In file SDCCast.c / function createFunction(...)//* Sometime SDCC access not allocated memory
//* In file SDCChasht.c / function hTabSearch(...)/* Many and many memory leak when not using CYGWIN32
//* and garblage collector (I'm using MS VC++ 6.0 and WIN32)
//* specially in peepHole function consuming Mo and Mo
//* even on compiling small function
//* I created a new function in file SDCChasht.c for deleting an hTab
//* It Reduces memory leaks"Salvador Eduardo Tropea \(SET\)" <salvador@inti.gov.ar> provided patches required to compile the system using DJGPP, the executables produced can run on plain DOS. He has also created a readme.dj file for those who want to compile using DJGPP. Added code to issue warnings if something is compared to / assigned a literal value which is greater than what the variable can hold. Changed the data/space extended message to info , since this not really a warning message. Added routine auto baud, for automatic baud rate detection , adapted from Paul Stoffregen's <paul@ece.orst.edu> autobaud.asm Was not doing check for constants in case for ++/--, i.e. a variable declared as const could be incremented or decremented Fixed bug when setting & fetching data from far space . Added bunch of peephole optimization rules. Trefor@magera.freeserve.co.uk. Updated the build script to give a choice to compile the libraries as large model or small model. Trefor also got rid of those annoying warnings when compiling with egcs ( braces about ambiguous 'else') Added some heuristics in constant folding routine , to prevent pointer live ranges from becoming too long, this was causing some avoidable spill code to be generated. Added support for ANSI routines setjmp and longjmp. Documentation updated. Was generating code for unreachable basic blocks ... now will not generate code for unreachable code... will issue a warning. Was generating incorrect code when adding values to generic pointers (some times). Improved bitwise '&' operation a little bit to improve code generation.
Release 2.1.5Mostly a bug fix release
Fixed post & pre increment / Decrement problem and inefficiency Structures/Unions. Three things were done this structure declarations. The long standing union problem has been fixed, a very rudimentary solution right now , will some up with a better solution shortly. Structures declared inside function scopes were not being properly cleaned up, came across this problem while generating debug information fixed now. pointers declared inside structures were broken after the pointer fix in Version 2.1.3, now fixed. Fixed some library routines , for --model-large . Added whole lot of stuff for debug information generation (DO NOT use --debug option might cause unpredictable results).
Release 2.1.4
- Problem with parameter overlay : when two functions with overlaid parameters were nested, the parameters of the outer function was clobbered. This has been fixed, now the inner function call will be lifted out and evaluated before parameters for the outer call are assigned values.
- New optimization added (suggested by Jean Louis VERN <jlvern@writeme.com> to prevent global variables in near space from being assigned to registers.
- Improved loop optimization, now will keep induction variables alive after loops even if loops have more that one exit. This makes me happy, it takes care of almost all the common loop constructs. So unless the user is doing something really weird the induction variables will be carried outside the loop. This also lays down the ground work for value based optimizations, i.e. when the loop count is known, then value of the induction variables will also be known at certain exit points.
- Fixed bug in genPlus, genAnd,genXor,genOr routines , was generating incorrect code for Far Space variable with Literal.
- Fixed bugs in SDCCglue.c, was generating -ve size for variables of size 32768 or greater.
- Changed register allocator to try & keep all local variables in 'registers' regardless of they are declared with the register storage class or not, this will reduce the amount of data space required by the compiler generated code.
- Fixed bug in SDCCmain.c , was unlinking file preOutName before reading it (okay with POSIX , not okay with DOS).
- David Bonnel <dbonnell@ozemail.com.au>. fixed the following bugs
- In SDCCicode.c at line# 1314 should be calling valMod not valDiv.
- In line# 2728 missing a break statement after the division case .
- David Bonnell <dbonnell@ozemail.com.au>. also added a new option --iram-size <value> . His description of it ..... (Dave speaking)
Anyway, if this command is given, the (new) function iramcheck() is called after linking to check that the OSEG, ISEG, and DSEG's do not extend past the end of internal RAM. (Internal RAM is from 0..iram_size-1). It spits out a warning such as:
- I added the command '-a [iram-size]' to the linker. iram-size defaults to 128 (0x80) if it is omitted (which is the amount of internal RAM I have on my DS5000T chip :-)
WARNING! Segment DSEG extends past the end of internal RAM. Check map file.
when such a problem is detected.
Then I added a new command-line option to SDCC, '--iram-size iram-size'. When this command is given the linker command shown above is added to the linker command file so that it will do the checking for internal RAM overflow.
- BESSIERE Jerome <BESSIERE_Jerome@stna.dgac.fr> fixed the following bugs.
- File sdccicod.c / function operandOperation(...)
- File sdccval.c / function valDiv(...)
- File sdccbitv.c / function bitVectBitValue(...)
- File sdccbitv.c / function bitVectUnSetBit(...)
Release 2.1.3
- Fixed bug in assembler i51mch.c ; dot operator when used in branch instructions was generating incorrect opcode.
- Enhanced Dead Code elimination, (it was missing some ).
- Added new rules to SDCCpeeph.def provided by Frieder <fe@lake.iup.uni-heidelberg.de>
- Fixed pointer return bug found by David Bonnel <dbonnell@ozemail.com.au>.
- Fixed the POINTER fiasco, I had misinterpreted the grammar.
- data char *p; was interpreted as [generic pointer to char, with p in data space]. now interpreted as pointer to character in data space with the pointer residing in unknown space.
- Updated the documentation for this.
- Updated documentation to include comments about Parameter Overlaying.
- Improved type checking to generate error message when a void type is casted to some other type
- Jean-Louis VERN (instead of sleeping at night) has made some GREAT!! improvements to the back end for frequently used expressions like
- if ( x & literal) ...
- if ( x ^ literal) ...
- if ( x | literal) ...
- if ( bit & x) ...
- if ( bit | x ) ...
- if (bit ^ x) ....
- Jean-Louis VERN rewrote the _decdptr.c routine to improve it.
Release 2.1.2
- Bug in genAnd (SDCCgen51.c) caused the compiler to issue error message for some bit wise and operations.
- File _spx.c missing from source bundle.
- Invalid code generated when interrupt service routine used with external stack option.
- Added --no-peep option to disable peep hole optimization.
- Added --peep-asm option to optionally pass inline assembler code through the peephole optimizer.
- Fixed bug in _strcpy.c David Bonnell <dbonnell@ozemail.com.au>.
Release 2.1.1
- bit variables could not be declared extern , bug was introduces while improving type checking for bit fields in structures.
Release 2.1.0
A full source code release. Lots of stuff done in this release.
- Floating point support completed (although cannot be used in small model).
- Data flow computation enhanced to stop flow computation of global variables when there is a call to another function.
- JeanLouis VERN added a whole lot of optimizations to the back end.
- Function return value assigned to a bit variable was crashing the compiler.
- Changed the way peep hole optimizer rules were being included. Now it is much easier to add default rules.
- Added two new pointer types "* pdata" and "* idata" these will facilitate the following
- Optimized access to near data
- Implementation of external stack (External stack is required if the compiler is going to be used to implement an RTOS)
- Fixed problem of Compiler giving warning when it did not find any reaching definition for a local static variable.
- Added code to backed for more optimized access to arrays, structures & unions placed in near space, now the compiler will not use indirect addressing to fetch the data if the offset is can be determined at compile time.
- Changed the way the startup code works. Documentation updated see section Startup for more details.
- Completed implementation of external stack. Documentation updated see section External stack.
- Jean-Louis VERN added a LOT of optimizations to the back end code generator, following is only a small list.
- gencjne improved
- gencmp improved
- genand improved
- genor improved.
- _divuint improved
- _divuint improved.
- Variables with absolute addresses now considered as VOLATILE.
- Dead Code elimination routine updated : will not eliminate global assignments to global variables when function call present.
- Added file at89S8252.h to distribution file supplied by "Michael Schmitt" <mschmitt@mainz-online.de>
- Martijn van Balen <balen@natlab.research.philips.com>. Fixed problems in assembler and linker. Files affected are asout.c and lklist.c
- Initialized character array variables with no size were being generated one byte less in length.
- Access to bit fields within structures mucho mucho improved.
- The compiler was allocating space on the stack for local variables (for reentrant functions) even when not needed, this has been fixed, the compiler will not allocate space on the stack for local variables if they are assigned to registers.
Release 2.0.21
Enhancement made to unsigned long & integer division by Martijn van Balen <balen@natlab.research.philips.com> _gptrget.c & _gptrput.c made register bank independent by Martijn van Balen <balen@natlab.research.philips.com>. sdccbuil.sh script fixed by Subject: Markus Mathes <mathes@prp.physik.tu-darmstadt.de> Martijn van Balen <balen@natlab.research.philips.com> found some problems with post & pre increment of pointer variables , these are fixed.
Release 2.0.20Mostly enhancements in this release. Some bug fixes by Jean Louis.
Enhanced loop optimization (induction variables), will generate more compact code for simple loops Enhanced some aspects of basic block processing. Added a couple more MCU header files. Jean Louis made some enhancements in SDCCgen51.c for better code generation. Jean Louis also fixed some bugs in the back end .
Release 2.0.19
Assignment of array variable to a pointer sometimes did not generate code. File containing intialised variables ONLY with NO functions caused the compiler to crash Initialising global volatile variables caused the compiler to fail. Generated incorrect code when bit variables were modified and subsequently used in a conditional statement. Added 3 more header files for Atmel MCUs , provided by Bernd Bartmann (Bernd.Bartmann@picard.isdn.cs.tu-berlin.de) Added a lot of peephole optimization rules, some suggested by Daniel Drotos <drdani@mazsola.iit.uni-miskolc.hu> Added check to make sure functions do not return 'bit'. Jean Louis-VERN (jlvern@writeme.com) fixed bug for divide with literal in his code.
2) asxxxx/lkmain.c:195
*ip is a character
variable and so should not be
compared with NULL.
3) asxxxx/lkmain.c:717
ctype[c] is a character
variable so the expression (ctype[c] != ILL)
is always true on
machines where char variables are signed.
4) SDCCmain.c:780
The preprocessor output
file was left in the temporary directory.