Appendix A. Sourcery CodeBench Lite Release Notes

This appendix contains information about changes in this release of Sourcery CodeBench 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 CodeBench Lite for MIPS ELF

A.1. Changes in Sourcery CodeBench Lite for MIPS ELF

This section documents Sourcery CodeBench Lite changes for each released revision.

A.1.1. Changes in Sourcery CodeBench Lite 2012.03-64

__attribute__((nomips16)) code generation bug fix .  A bug in GCC that caused incorrect code to be generated for functions with the __attribute__((nomips16)) attribute while compiling with -mips16 has been fixed.

C++ bug fix.  A bug that caused unpredictable program behavior in C++ programs has been fixed.

Invalid microMIPS relocation fixed.  A bug in branch code generation for microMIPS, reported by the linker as relocation truncated to fit: R_MICROMIPS_PC16_S1, has been fixed.

Improved size optimization for microMIPS.  The compiler now aligns microMIPS functions more efficiently when the -Os option is used.

Compiler crash fixed.  A GCC bug that occasionally caused an internal compiler error during register allocation has been fixed.

Register allocation bug fix.  A bug in the register allocator that caused incorrect code generation has been fixed.

Linker --gc-sections bug fix.  A linker bug that incorrectly caused undefined references to be diagnosed when the --gc-sections option is used has been fixed.

EVA support.  GAS now supports MIPS EVA instructions. You can specify the -meva option to GCC and GAS to indicate that EVA instructions are being used.

A.1.2. Changes in Sourcery CodeBench Lite 2012.03-41

Nondeterministic code generation bug fix.  A GCC bug has been fixed that caused nondeterministic code generation for some input files when optimizing.

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

Fix for internal compiler error.  A GCC bug has been fixed that caused an internal compiler error when using pointer casts in C++0x constexpr initialization expressions.

Compact C++ exception handling tables.  GCC now defaults to emitting a compact encoding of C++ exception handling tables, rather than using a DWARF-based scheme. For more information, refer to the documentation of the -mcompact-eh and -mno-compact-eh options in the GCC manual.

Fix for bit-field optimization bug.  A compiler bug that caused incorrect code to be generated for programs using bit-fields has been fixed.

Incorrect accesses to volatile memory.  The compiler no longer generates SWP, LWP, SWM or LWM instructions to access objects declared with the volatile type qualifier, as these instructions can cause multiple memory accesses of unspecified ordering.

GCC version 4.6.3.  Sourcery CodeBench Lite for MIPS ELF is now based on GCC version 4.6.3. For more information about issues that have been fixed since version 4.6.1, see http://gcc.gnu.org/gcc-4.6/changes.html.

GCC stack usage improvement.  GCC now generates better code for stack allocation in some cases when compiling with -fno-strict-aliasing.

Linker --gc-sections option bug fix.  A bug has been fixed that caused the linker to incorrectly remove the .debug_types section when using the --gc-sections option.

Installer failure during upgrade.  Some recent releases were affected by an installer bug on Windows hosts that caused installing a newer version of Sourcery CodeBench Lite into the same directory to fail with the error Sourcery CodeBench Lite for MIPS ELF upgrade failed. This bug has now been fixed, but the affected releases cannot be upgraded. As a workaround, uninstall the older release before installing the new version.

C++ debugging bug fix.  A GDB bug has been fixed that caused GDB to fail to find enum constants in base classes when debugging C++ code.

Fix for crash in GDB.  A memory corruption bug in GDB has been fixed that under very rare circumstances made it crash or exhibit other unpredictable behavior. On GNU/Linux hosts, this bug caused crashes with an error message similar to: *** glibc detected *** mips-sde-elf-gdb: free(): invalid next size (normal): 0x09466198 *** followed by a backtrace.

Fix debugger remote target interruption.  A bug in GDB's handling of requests to interrupt execution on a remote target has been fixed that caused it to stop the target but not emit a stopped MI record.

GDB internal error fix.  A bug has been fixed that caused GDB to produce messages of the form: warning: (Internal error: pc 0x1000a0 in read in psymtab, but not in symtab.) when taking the addresses of symbols from objects added with the add-symbol-file command.

A.1.3. Changes in Sourcery CodeBench Lite 2011.09-86

64-bit multilibs.  Sourcery CodeBench Lite now includes libraries and linker scripts to build applications for MIPS64R2 N64 ABI. Use the -mabi=64 option to compile using 64-bit multilibs, and linker scripts for the Malta board with a 64-bit processor (e.g., malta64-ram-hosted.ld to link executables. Multilibs for the N64 ABI are available for all combinations of big/little endianness and hardware/software floating point. Refer to Section 3.2, “Library Configurations” for more information about the 64-bit multilibs.

GCC crash bug fix.  A GCC bug has been fixed that caused an internal compiler error when a MIPS16 function was inlined into a MIPS32 function.

GCC optimization bug fix.  A bug in the GCC optimizer has been fixed that caused incorrect code to be generated for some cases of multiplication by a constant when compiling with -O2 or -O3.

GCC wrong code fix.  An optimizer bug has been fixed that caused GCC to generate code with incorrect scheduling of memory reference instructions.

Fix for assembler internal error.  A bug has been fixed that caused the assembler to abort with an assertion failure in emit_inc_line_addr.

A.1.4. Changes in Sourcery CodeBench Lite 2011.09-76

Changes to included libraries.  Library variants built with -mfp64, -mno-float, and -mcode-readable=no have been removed from Sourcery CodeBench Lite for MIPS ELF. Please refer to Section 3.2, “Library Configurations” for a list of the currently-supported multilibs.

Fix for compiler hang.  A bug that caused GCC to become stuck in an infinite loop in the optimizer has been fixed.

Optimization bug fix.  A compiler bug has been fixed that affected some programs using type-aliased assignments to pointer variables. The bug caused incorrect code to be generated when compiled with -O2 or -O3.

Binutils version 2.21.  Sourcery CodeBench Lite for MIPS ELF is now based on binutils version 2.21.

Assembler crash.  The assembler now warns when there is line information for the *ABS* section, rather than crash. This can occur when the .offset directive is used incorrectly.

Fix for crash in GDB maint print arch A bug in the GDB command maint print arch that sometimes caused GDB to crash has been fixed.

Remote command bug fix.  A bug in the Sourcery CodeBench Debug Sprite has been fixed that caused GDB's monitor remote commands to fail without performing the intended action on some versions of Windows.

Debug Sprite option defaults.  The Sourcery CodeBench Debug Sprite now uses default option values specified in board configuration files. Options included in the device URL override the default values.

Changes to host operating system requirements.  The minimum required Microsoft Windows OS needed to run Sourcery CodeBench Lite is now Windows XP (SP1).

A.1.5. Changes in Sourcery CodeBench Lite 2011.03-106

Wrong-code bug fix.  A compiler bug that caused incorrect code to be generated for some branches with -mbranch-likely optimization enabled has been fixed.

Map file name demangling bug fix.  GCC now properly passes the --demangle and --no-demangle options to the linker to control map file output. The default behavior on all hosts is now to demangle C++ names.

MIPS16 branch bug fix.  A compiler bug that caused incorrect code to be generated for MIPS16 branches with offsets greater than 65534 or less than -65536 has been fixed.

Smaller exception handling tables.  The compiler now marks exception handling information for template functions so that the linker can remove duplicates. This also affects non-inlined inline functions.

Binutils support for 32-bit microMIPS instructions.  The assembler and linker now support generation of 32-bit instructions only when making microMIPS code. For more information, refer to the documentation of the -minsn32 assembler option and the --insn32 linker option.

GDB interrupt handling bug fix.  A bug in GDB has been fixed that caused it to sometimes fail to interrupt lengthy single-step operations (as by a Ctrl+C when using GDB from the command line).

Fix GDB crash during connection to debug agent.  A bug has been fixed that caused GDB to crash while connecting to any debug agent through standard IO where the debug agent had detected an early error and terminated the communication.

Debug Sprite register reporting bug fix.  In recent releases, the Sourcery CodeBench Debug Sprite reported an incorrect set of registers to GDB in some circumstances. This bug has been fixed.

Improved download speed on Windows hosts.  The Sourcery CodeBench Debug Sprite now downloads binaries to the target faster when using Windows hosts.

A.1.6. Changes in Sourcery CodeBench Lite 2011.03-92

MIPS16 switch statement compilation fix.  A bug has been fixed that caused very large switch statements to be compiled incorrectly for MIPS16.

Support for MIPS M14Ke and M14Kec processors.  Sourcery CodeBench Lite now supports the MIPS M14Ke and M14Kec processors. To compile for these targets, use the -march=m14ke -mmicromips or -march=m14kec -mmicromips command-line options.

MIPS16 static data bug fix.  A compiler bug has been fixed that caused static data to be accessed incorrectly from position-independent MIPS16 code in rare cases.

A.1.7. Changes in Sourcery CodeBench Lite 2011.03-76

New Sourcery CodeBench Lite branding.  Sourcery G++ has been renamed to Sourcery CodeBench. This change affects the names of the default installation directory and installer-created shortcuts, but no internal pathnames or tool names within the installation directory have been changed.

Improved function call profiling.  The compiler now supports the -finstrument-function-calls option. Please see the GCC documentation for more details.

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 that make use of the ADDIUPC instruction.

Improved GDB diagnostics.  A bug has been fixed in GDB that caused cryptic assertion fail messages whenever a file in the unsupported SGI IRIX variation of the ELF binary format was selected. GDB now issues explanatory warning messages instead.

Improved disassembler performance in the debugger.  GDB's disassembler has been improved to use more efficient memory access on remote targets.

A.1.8. 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.9. 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.10. 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 2012.03-64. The major and minor parts of the version number, in this case 2012.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.11. 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.