Appendix A. Sourcery G++ Lite Release Notes

This appendix contains information about changes in this release of Sourcery G++ Lite for MIPS ELF. You should read through these notes to learn about new features and bug fixes.

Table of Contents

A.1. Changes in Sourcery G++ Lite for MIPS ELF

A.1. Changes in Sourcery G++ Lite for MIPS ELF

This section documents Sourcery G++ Lite changes for each released revision.

A.1.1. Changes in Sourcery G++ Lite 2011.03-52

Interprocedural stack optimization.  The compiler has a new experimental optimization that generates code that claims less stack space. To switch this optimization on, use -mframe-header-opt.

MIPS32r2 floating-point multiply-accumulate restrictions lifted.  Following clarifications to the MIPS architecture specification, GCC has been updated to allow floating-point multiply-accumulate instructions on MIPS32r2 processors in all configurations.

Interprocedural register optimization.  The compiler has a new experimental optimization that generates better code for functions that only call functions in the same object. To switch this optimization on, use -fuse-caller-save.

Incorrect C++ warning fixed.  A bug in GCC has been fixed that caused spurious warnings about lambda expressions in C++ code that does not use them.

C++ constructor bug fix.  A compiler bug has been fixed that caused incorrect code for C++ constructors for some class hierarchies that use virtual inheritance and include empty classes. At runtime, the incorrect constructors resulted in memory corruption or other errors.

Improved DSP code.  The compiler now makes better use of DSP accumulator registers when compiling with -mdsp or -mdspr2.

microMIPS branches.  A compiler bug that caused sub-optimal branch instructions to be generated in microMIPS mode has been fixed.

Addr2line bug fix.  A bug has been fixed that caused Addr2line to print ??:0 for any address instead of file and line number.

24K Errata.  The -mfix-24k assembler option has been extended to work around Errata E48: Lost Data on Stores During Refill. In addition, GCC now accepts this command-line option and passes it through to the assembler.

CS3 linker script changes.  CS3 linker scripts for RAM profiles have been changed to reserve only 4K at the start of memory for interrupt vectors, rather than 1M to also preserve memory used by YAMON. This change affects RAM-profile linker scripts for all supported boards, including Malta and SEAD-3 boards. YAMON-profile linker scripts for these boards are unchanged.

A.1.2. Changes in Sourcery G++ Lite 2011.03-12

Compiler optimization improvements.  The compiler has been enhanced with a number of optimization improvements, including:

  • Smaller and faster code for compound conditionals.
  • Improved filling of branch delay slots.
  • Removal of superfluous sign and zero extensions.

GCC version 4.5.2.  Sourcery G++ Lite for MIPS ELF is now based on GCC version 4.5.2.

New -fstrict-volatile-bitfields option.  The compiler has a new option, -fstrict-volatile-bitfields, which forces access to a volatile structure member using the width that conforms to its type. Refer to the GCC manual for details.

GCC code generation bug for casts to volatile types.  A compiler bug has been fixed that sometimes caused incorrect code for references to pointers to types with volatile casts.

Improvements to synchronization primitives.  GCC's __sync built-in functions have been improved to make better use of MIPS atomic instructions.

Incorrect optimization fix.  An optimizer bug that in rare cases caused incorrect code to be generated for complex AND and OR expressions containing redundant subexpressions has been fixed.

GCC microMIPS code size improvement.  GCC has been improved to generate smaller code around function calls.

GCC bug where accesses to volatile structure fields are optimized away.  A bug has been fixed where accesses to volatile fields of a structure were sometimes incorrectly optimized away if the structure instance was defined as non-volatile.

Linker debug information fix.  A bug in linker processing of debug information has been fixed. The bug sometimes prevented the Sourcery G++ debugger from displaying source code if the executable was linked with the --gc-sections option.

microMIPS linker code size optimization bug fix.  A bug has been fixed that sometimes caused the linker to generate incorrect code when the --relax option is used to enable certain code size optimizations.

microMIPS DSP ASE.  The assembler now supports microMIPS encodings for the DSP ASE instructions.

MCU ASE instructions assembler bug fixes.  Bugs have been fixed that caused the assembler to sometimes generate incorrect code for the MCU ASE ACLR, ASET and IRET instructions.

COP2 instruction bug fix.  A bug in handling of the COP2 instruction's argument has been fixed in the assembler and disassembler.

GDB microMIPS disassembler bug fix.  A bug in GDB has been fixed that caused some microMIPS instructions to disassemble incorrectly.

Debugger warnings quieted.  GDB no longer prints RMT ERROR diagnostics on connection to the Sourcery G++ Debug Sprite. In spite of the alarming appearance of the messages, they were not actually indicative of a serious problem.

A.1.3. Changes in Sourcery G++ Lite 2010.09-28

Changes to Sourcery G++ version numbering.  Sourcery G++ product and Lite toolchains now uniformly use a version numbering scheme of the form 2011.03-52. The major and minor parts of the version number, in this case 2011.03, identify the release branch, while the final component is a build number within the branch. There are also new preprocessor macros defined by the compiler for the version number components so that you may conditionalize code for Sourcery G++ or particular Sourcery G++ versions. Details are available in the Sourcery G++ Knowledge Base.

Alignment attributes.  A bug has been fixed that caused the compiler to ignore alignment attributes of C++ static member variables where the attribute was present on the definition, but not the declaration.

Compiler optimization improvements.  The compiler has been enhanced with a number of optimization improvements, including:

  • More efficient assignment for structures containing bitfields.
  • Better code for initializing C++ arrays with explicit element initializers.
  • Improved logic for eliminating/combining redundant comparisons in code with nested conditionals.
  • Better selection of loop variables, resulting in fewer temporaries and more efficient register usage.
  • Better code when constant addresses are used as arguments to inline assembly statements.
  • Better code for copying small constant strings.

GCC version 4.5.1.  Sourcery G++ Lite for MIPS ELF is now based on GCC version 4.5.1. For more information about changes from GCC version 4.4 that was included in previous releases, see http://gcc.gnu.org/gcc-4.5/changes.html.

Archiver bug fix.  A bug has been fixed in the ar utility, which sometimes caused it to produce unrecognizable 64-bit files. The bug also caused similar problems in the strip and objcopy utilities when processing 64-bit archives.

Fix for incorrect MIPS16 and microMIPS relocations.  An assembler bug has been fixed that caused incorrect relocation information to be produced for MIPS16 and microMIPS code, diagnosed by a Can't find matching LO16 reloc linker warning.

Additional validation in the assembler.  The assembler now diagnoses an error, instead of producing an invalid object file, when directives such as .hidden are missing operands.

Binutils update.  The binutils package has been updated to version 2.20.51.20100809 from the FSF trunk. This update includes numerous bug fixes.

Additional alignment in CS3-defined linker scripts.  Sourcery G++ now ensures 8-byte alignment at additional points in CS3-defined linker scripts. Previously, placing a symbol in certain sections broke the initialization of the .data and/or .bss sections.

Newlib update.  The Newlib package has been updated to version 1.18.0, with additions from the community CVS trunk as of 2010-08-12. This update provides additional wide-character functions, along with other bug fixes and enhancements.

GDB update.  The included version of GDB has been updated to 7.2.50.20100908. This update adds numerous bug fixes and new features, including improved C++ language support, a new command to save breakpoints to a file, a new convenience variable $_thread that holds the number of the current thread, among many other improvements.

GDB crash fix.  A bug has been fixed that caused GDB to crash on launch if the environment variable CYGPATH is set to a program that does not exist or cannot be executed.

Debug Sprite abnormal termination bug fix.  The Sourcery G++ Debug Sprite no longer terminates abnormally if GDB is killed while the target is waiting for semihosted I/O to complete. The bug was only triggered when running GDB on a Windows host.

A.1.4. Changes in Older Releases

For information about changes in older releases of Sourcery G++ Lite for MIPS ELF, please refer to the Getting Started guide packaged with those releases.