embench/embench-iot

crc32 size increases is we specify a frequency with --cpu-mhz different from 1 MHz

PaoloS02 opened this issue · 0 comments

I'm noting this down here because I discovered it by mistake and it might get lost otherwise.
I built the benchmarks with the standard command used for the baseline:

./build_all.py --arch arm --chip cortex-m4 --board stm32f4-discovery --cc arm-none-eabi-gcc --cflags='-c -Os -ffunction-sections -march=armv7-m -mcpu=cortex-m4 -mfloat-abi=soft -mthumb' --ldflags='-Wl,-gc-sections -nostartfiles -nostdlib' --dummy-libs='crt0 libc libgcc libm' --cpu-mhz 16 --clean

and used --cpu-mhz 16 by mistake. I then noticed that crc32 was 4 bytes bigger then expected. By removing --cpu-mhz 16 or by using --cpu-mhz 1 I got the expected size. I tried with different values between 1 and 16 and the expected result comes only with 1 MHz. cpu-mhz isn't used for the size benchmark so it shouldn't have an effect. It shouldn't affect size in any case.

At a first glance it only enters the benchmark in the standard benchmark body function:
int benchmark (void) { return benchmark_body (LOCAL_SCALE_FACTOR * CPU_MHZ); }
like all the other benchmarks. I might have done something wrong but if someone else can reproduce this behaviour then we have a bug to investigate.

I tested this with embench 0.5/1.0/master and alsways got this behaviour.