Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
PaoloS02 opened this issue Jun 21, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@PaoloS02
Copy link
Contributor

PaoloS02 commented Jun 21, 2022

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.

@jeremybennett jeremybennett added the bug Something isn't working label Jul 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants