-
Notifications
You must be signed in to change notification settings - Fork 104
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
md5sum: make calloc() use calloc_beebs() and use XOR for result value #147
Conversation
@hirooih Thanks for this. We are explicit in our use or the beebs functions, we don't overload the standard functions, so users can see where we have made the changes. The correct fix is to change the call to Can you explain more how the use of XOR makes the code more portable? We try to avoid rewriting code except to correct errors, in order to maintain a variety of coding styles in the benchmark. BTW, the |
Although malloc_beebs() was used for malloc(), but calloc_beebs() was not used for calloc(). use calloc_beebs() for calloc() and increase the heap size for it.
The result value was the sum of four uint32_t values. The result changes between 32bit and 64bit CPUs. Using XOR (Exclusive OR) fixes the issue.
9503bab
to
0051591
Compare
I think there is a problem with the |
I see. I thought it was better not to change the original code.
I think this is not the case. |
@Roger-Shepherd |
@hirooih I'm sorry - I didn't get round to merging this earlier. Thanks for all your work. |
Now good to merge. |
Thanks! |
Merge in INV/riscv-benchmark from htc/dev/etywoniak-add-embench to htc/master * commit '9e5d0701c152a0c1860711d0871ba64f449f8903': (82 commits) Fix warnings Fix fake frequency, fix license header, make script inherit spike's ret code, fail on non-zero benchmark ret code Add spike cycle count parsing Move to directory Add spike RISC-V simulator support Add handling for multi-word C compilation commands like zig cc Update board.cfg Update link.ld Update link.ld Guard md5sum printf by DEBUG Jsonfix (embench#168) Adding Full Support to WallyVerilog (embench#162) fix md5sum RET parse error (embench#167) md5sum: make calloc() use calloc_beebs() and use XOR for result value (embench#147) RISC-V compilation example (embench#155) Reworded decription of the capabilities of x86 and M1 macs to run x86 and M1 binaries as I found the original confusing - and I wrote it. (embench#150) Tarfind: fix heap size to be multiple of the pointer size (embench#146) [TARFIND] Fix local scale factor, heap size, add iterations and add baseline values. [MD5SUM] Fix local scale factor, heap size, add iterations and add baseline values. Add tarfind benchmark ...
Although malloc_beebs() was used for malloc(), but calloc_beebs() was not used for calloc().
As result calloc() failed.
Use calloc_beebs() for calloc() and increase the heap size for it.
The result value was the sum of four uint32_t values.
The result changes between 32bit and 64bit CPUs.
Using XOR (Exclusive OR) fixes the issue.