Re: [PATCH v2] gdb/record: avoid rax usage in i386-avx-record.exp

Guinevere Larsen <[email protected]>
Newsgroups gmane.comp.gdb.patches
Message-ID <[email protected]>
On 8/13/26 11:51 AM, Simon Marchi wrote:
> On 8/13/26 9:10 AM, Guinevere Larsen wrote:
>> My recent commit, 1c04308f0958cbac83bad22703758139ea6969b6:
>>
>>      Author: Guinevere Larsen <[email protected]>
>>      Date:   Tue Jun 16 16:03:43 2026 -0300
>>      gdb/record: add support for BMI2 instructions
>>
>> Introduced a few tests that rely on the rax register being set before
>> entering the function. This isn't reliable, as programs compiled with
>> gcc-14 and earlier will have the register. To avoid compiler versions
> This sentence ends abruptly.
>
> It's not clear to me what the problem is, could you explain it in simple
> words :)?
>
> Simon
>
oops, sorry, need to do more proofreading I guess. The sentence should 
be "will have the registered clobbered, saving 0 on it"

I haven't looked at the disassembly to know why, but something about how 
GCC 14 encodes the function calls makes EAX be 0 every time, and the 
test expects eax to be something else. Moving to a different register 
sidesteps this

-- 
Cheers,
Guinevere Larsen
it/its
she/her (deprecated)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.