aboutsummaryrefslogtreecommitdiff
path: root/benchmarks
AgeCommit message (Collapse)AuthorFilesLines
2026-01-07benchmarks: illegal addend for R_RISCV_GOT_HI20 in crt.S (#639)Heinrich Schuchardt1-1/+2
* benchmarks: illegal addend for R_RISCV_GOT_HI20 in crt.S With Ubuntu's GCC 15.2.0-7ubuntu1 building results in an error: /tmp/ccfCpSVm.o: in function `_start': (.text.init+0x100): dangerous relocation: The addend isn't allowed for R_RISCV_GOT_HI20 Split loading _end + 63 into register tp into separate load and add instructions. https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc only describes R_RISCV_GOT_HI20 with offset 0 to a label. The topic of addends for R_RISCV_GOT_HI20 was discussed in https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/184#issuecomment-830988778 Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> * isa/rv64mi/illegal.S: illegal addend for R_RISCV_GOT_HI20 With Ubuntu's GCC 15.2.0-7ubuntu1 building results in an error: rv64mi-p-illegal-illegal.o: in function `reset_vector': (.text.init+0x1dc): dangerous relocation: The addend isn't allowed for R_RISCV_GOT_HI20 Split loading mtvec_handler + 1 into register t into separate load and add instructions. https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc only describes R_RISCV_GOT_HI20 with offset 0 to a label. The topic of addends for R_RISCV_GOT_HI20 was discussed in https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/184#issuecomment-830988778 Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> --------- Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2026-01-07benchmarks: undefined reference to `__printf_chk' (#640)Heinrich Schuchardt1-1/+1
When building with Ubuntu's gcc 15.2.0-7ubuntu1 an error occurs: undefined reference to `__printf_chk' This is due to _FORTIFY_SOURCE being set by the toolchain defaults. Undefine the symbol. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2026-01-07Avoid RWX section (#641)Heinrich Schuchardt1-2/+7
Building leads to a warning riscv64-linux-gnu/bin/ld: warning: median.riscv has a LOAD segment with RWX permissions The text sections should we RX only. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2026-01-07Fix QEMU syscall support (#642)Heinrich Schuchardt2-20/+9
* benchmark: correct tohost, fromhost symbol size Running on the spike virtual machine qemu-system-riscv64 -M spike -nographic -bios none \ -kernel benchmarks/qsort.riscv fails with qemu-system-riscv64: HTIF tohost must be 8 bytes because the symbol size if the ELF file is 0. Move the symbols tohost and fromhost to C code. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> * syscalls: QEMU only implements HTIF_CONSOLE_CMD_PUTC The only console output syscall emulated by QEMU 10.2 via the HTIF interface is writing a single character. String output is not available. Rewrite printstr() as a loop using HTIF_CONSOLE_CMD_PUTC. Rewrite putchar() using HTIF_CONSOLE_CMD_PUTC. With this change the benchmarks provide output on the Spike virtual machine: $ qemu-system-riscv64 -M spike -nographic -bios none \ -kernel benchmarks/qsort.riscv mcycle = 752216 minstret = 749734 Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> --------- Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2026-01-06syscalls: use correct printf code for counters[] (#638)Heinrich Schuchardt1-1/+1
Building benchmarks/common/syscalls.c results in a warning: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘uintptr_t’ {aka ‘long unsigned int’} [-Wformat=] 118 | pbuf += sprintf(pbuf, "%s = %d\n", counter_names[i], counters[i]); | ~^ ~~~~~~~~~~~ | | | | int uintptr_t {aka long unsigned int} Use %lu for to print uintptr_t. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-02-24Compile non-vec benchmarks for rv64gcJerry Zhao1-4/+11
2024-11-18Suppress implicit-int and implicit-function-declaration warnings in ↵Tommy Murphy1-1/+1
Dhrystone which are non-fatal warnings in GCC 13 but fatal errors in GCC 14 (#587)
2024-07-17rsort.c description updated to Radix Sort instead of Quicksort (#572)Büşra Özdemir1-2/+2
2024-06-13If ABI not already passed in then parameterize it based on selected XLEN (#566)Tommy Murphy1-1/+8
2023-05-22Switch bmarks makefile to rv64gcvJerry Zhao1-1/+1
2023-05-22Add vec-strcmpJerry Zhao3-0/+67
2023-05-22Add vec-sgemmJerry Zhao6-0/+663
2023-05-22Update vec-memcpy commentsJerry Zhao1-1/+1
2023-05-22Add vec-daxpyJerry Zhao5-0/+382
2023-05-22Add vec-memcpy benchmarkJerry Zhao8-14/+412
2023-05-22Enable VS for benchmarksJerry Zhao1-2/+2
2023-05-22Add scalar single-threaded/mt memcpyJerry Zhao7-2/+889
2023-05-22Improve performance of syscalls/memcpyJerry Zhao1-1/+15
2023-02-13Update register name to satp (#455)Pascal Cotret1-1/+1
Related to issue https://github.com/riscv-software-src/riscv-tests/issues/453 It seems to be the only modification needed there. It may break backward compatibility with (very?) old compilers. Signed-off-by: Pascal Cotret <pascal.cotret@gmail.com>
2022-06-21Update information about Makefile fragments (#399)Mehmet Oguz Derin1-4/+2
The source of benchmarks' Makefile does not use fragments anymore. This commit removes the mention of them from the readme. Signed-off-by: Mehmet Oguz Derin <mehmetoguzderin@mehmetoguzderin.com>
2021-02-01Prevent GCC from pattern-matching the memset implementationAndrew Waterman1-1/+1
Otherwise, we get infinite recursion. Resolves #321 Resolves #322
2020-10-02Modify PMP benchmark to detect granularity (#295)Moritz Schneider1-10/+24
2020-04-17The HTIF device must live in its own page since it is (generally) a ↵Adrian Harris1-0/+1
bus/hardware device (#274)
2020-02-08Solves https://github.com/riscv/riscv-tests/issues/241 : Each mhartid has ↵Sho Nakatani1-2/+2
the same size of stack & TLS. (#242)
2019-12-28benchmarks: Disassemble .text.init section (#230)Albert Ou1-1/+1
2019-12-10benchmarks: Simplify TLS initialisation (#224)James Clarke3-19/+5
The symbols used to query the size of .tdata and .tbss need not be thread-local themselves; instead, make them linker script-provided non-thread-local symbols.
2019-07-01pmp: first set the address, then cfg (#194)Pentin Alexander Sergeevich1-1/+1
2017-11-27Rename sbadaddr to satpAndrew Waterman1-3/+3
2017-09-19Link against libm for fma()Andrew Waterman1-1/+1
2017-09-14Move link options to end of gcc command lineAndrew Waterman1-1/+1
2017-08-16Inform GCC that "sfence.vma" clobbers memoryPalmer Dabbelt1-1/+1
2017-08-04Improve RVC testAndrew Waterman1-1/+2
Make the page-crossing instruction non-idempotent to detect erroneously executing the first 16 bits of the instruction with garbage MSBs.
2017-05-01Set ELF entry point correctlyAndrew Waterman1-0/+1
2017-04-26Add abort() for benefit of benchmark codeAndrew Waterman1-0/+6
2017-03-30New PMP encodingAndrew Waterman1-5/+8
2017-03-29Prohibit relaxing the initial gp generationPalmer Dabbelt1-0/+3
I've added an additional linker relaxation that relaxes two instruction pc-relative sequences to one instruction gp relative sequences when possible. This sequence now optimizes the initial gp generation to mv gp, gp which is obviously bogus. The fix is to disable relaxations when setting up gp, preventing the linker from relaxing away this setup code.
2017-03-29Change the global pointer symbol to __global_pointer$Palmer Dabbelt2-2/+2
This changed a while ago in binutils.
2017-03-27Separate page faults from physical memory access exceptionsAndrew Waterman1-1/+1
2017-03-25Fix FPU initialization codeAndrew Waterman1-6/+8
2017-03-24Like tests, pass the benchmarks if XLEN disagreesAndrew Waterman1-5/+6
2017-03-22Add PMP testAndrew Waterman2-0/+196
2017-03-22Clean up benchmarks buildAndrew Waterman3-35/+10
2017-03-21Clean up bmarks buildAndrew Waterman14-361/+14
2017-03-21Remove smips/host-debugging cruftAndrew Waterman12-276/+9
2017-01-20Use correct macro to guard floating-point initializationAndrew Waterman1-1/+1
2017-01-20Fix build with glibcAndrew Waterman2-1/+3
2017-01-04Specify Spike ISA explicitlyAndrew Waterman1-1/+1
2016-12-06avoid non-standard predefined macrosAndrew Waterman1-2/+2
2016-08-29On RV32, zero-extend pointers for HTIFAndrew Waterman1-12/+12
2016-08-29Don't explicitly use atomics in rsortAndrew Waterman1-11/+17
This is a pattern GCC should pick up for targets where AMOADD is faster than LW/ADD/SW.