Benchmark results for M16C

Leading code optimizations

In addition to its powerful and unique features, IAR Embedde Workbench generates the most compact code on the market for M16C/R8C devices.

Tools used for this benchmark test

This benchmark compares the total size of linked code and constants between the following tools:

IAR Embedded Workbench for M16C - v3.30
Options: -e -Ohz --use_DIV --data_model=near --variable_data=near --constant_data=far

Renesas NC30 - v5.42r0 
Options: --c -v -ORM fnear_ROM

GNU M16C32C - v0803
Options: -c -Os -fno-function-cse -funit-at-a-time -falign-jumps -fdata-sections -ffunction-sections -Wl, --gc-sections. M16C/M32C optimized GNU libraries used.

Notes:

  1. IAR XLINK Linker has the ability to remove un-referenced segment parts. This feature is not present in the other tools and therefore, the option -g* was used to disable this feature.
  2. GNUM16CM32C limitations: The GNUM16CM32C compiler is designed with 16 bit pointer size only (first 64KB). However, constant data resides the ROM region at 20-bit addresses. Therefore, constant data must be copied from ROM to RAM during startup leading to a waste of RAM. Another effect off the 16-bit pointer size limitation is that pointers in far memory pointing to data in near memory, are not supported.

Results

On average, EWM16C generates 32% and 50% smaller code respectively than N30 and GNUM16C.


 

Benchmark code examples

The following code examples were used in this benchmark:

Rexexp Regular expression scanner. Uses search string with special characters to match patterns of text.
Web server  Web server application
Microwave sensor Microwave sensor application
Spirometer  Device that determines how well the lungs receive, hold, and utilize air, to monitor a lung disease.
Temp.mon Temperature monitoring device
Bluetooth  Bluetooth stack

© IAR Systems 1995-2016 - All rights reserved.