|
From: Carl L. <ce...@us...> - 2023-04-18 19:54:14
|
Mark:
On Mon, 2023-04-17 at 09:22 -0700, Carl Love via Valgrind-developers
wrote:
> The test_isa_3_1_R1_RT and test_isa_3_1_R1_XT tests seem to run
> differently then expected. The tests generate multiple lines of
> output
> when only one line was expected. For example:
I have pushed a fix for the two tests. The issue is the tests are
testing load instructions that load relative to the current PC address.
The tests of these instructions adds blocks of OR immediate
instructions before the assembly for the instruction under test.
Unfortunately, the test didn't save and restore the registers touched
by the OR immediate instructions. This is fine as long as you are
calling a function, the touched registers are volitile across a
function call. It seems the more recent GCC is a bit more aggressive
in inlining the test functions. However, the compiler doesn't realize
that the inline OR immediate instructions are touching registers. The
OR immediate instructions were inadvertently changing the value of the
register that held the for loop variable. Thus the loops would execute
more times then expected.
The commit is:
commit 20cc0680c3491e062c76605b24e76dc02e16ef47 (HEAD -> master)
Author: Carl Love <ce...@us...>
Date: Mon Apr 17 17:12:25 2023 -0400
PowerPC:, Fix test test_isa_3_1_R1_RT.c, test_isa_3_1_R1_XT.c
If the commit gets into the current release, great. If not, it is not
an issue. The problem is completely isolated to the test case.
Carl
|