Subject: Re: Failure to build librseq on ppc

From: Mathieu Desnoyers <[email-masked]>
Date: Thu, 9 Jul 2020 09:43:47 -0400 (EDT)

----- On Jul 8, 2020, at 8:18 PM, Segher Boessenkool [email-masked] wrote:

> On Wed, Jul 08, 2020 at 08:01:23PM -0400, Mathieu Desnoyers wrote:
>> > > #define RSEQ_ASM_OP_CMPEQ(var, expect, label)
>> > > \
>> > >                 LOAD_WORD "%%r17, %[" __rseq_str(var) "]\n\t"                   \
>> > 
>> > The way this hardcodes r17 *will* break, btw.  The compiler will not
>> > likely want to use r17 as long as your code (after inlining etc.!) stays
>> > small, but there is Murphy's law.
>> 
>> r17 is in the clobber list, so it should be ok.
> 
> What protects r17 *after* this asm statement?

As discussed in the other leg of the thread (with the code example),
r17 is in the clobber list of all asm statements using this macro, and
is used as a temporary register within each inline asm.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com