On Wed, May 11, 2022 at 5:49 PM Bruce Richardson <bruce.richard...@intel.com> wrote: > > On Wed, May 11, 2022 at 05:07:25PM +0200, Stanislaw Kardach wrote: > > Forcing inlining in test_ring_enqueue and test_ring_dequeue can cause > > the compiled code to grow extensively when compiled with no optimization > > (-O0 or -Og). This is default in the meson's debug configuration. This > > can collide with compiler bugs and cause issues during linking of unit > > tests where the api_type or esize are non-const variables causing > > inlining cascade. In perf tests this is not the case in perf-tests as > > esize and api_type are const values. > > > > One such case was discovered when porting DPDK to RISC-V. GCC 11.2 (and > > no fix still in 12.1) is generating a short relative jump instruction > > (J <offset>) for goto and for loops. When loop body grows extensively in > > ring test, the target offset goes beyond supported offfset of +/- 1MB > > from PC. This is an obvious bug in the GCC as RISC-V has a > > two-instruction construct to jump to any absolute address (AUIPC+JALR). > > > > However there is no reason to force inlining as the test code works > > perfectly fine without it. > > > > GCC has a bug report for a similar case (with conditionals): > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93062 > > > > Fixes: a9fe152363 test/ring: add custom element size functional tests
Fixes: a9fe152363e2 ("test/ring: add custom element size functional tests") > > > > Signed-off-by: Stanislaw Kardach <k...@semihalf.com> > Acked-by: Bruce Richardson <bruce.richard...@intel.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagaraha...@arm.com> Acked-by: Konstantin Ananyev <konstantin.v.anan...@yandex.ru> Applied, thanks. -- David Marchand