Failure to build librseq on ppc

Segher Boessenkool segher at kernel.crashing.org
Thu Jul 9 09:53:31 AEST 2020


Hi!

On Wed, Jul 08, 2020 at 10:27:27PM +1000, Michael Ellerman wrote:
> Segher Boessenkool <segher at kernel.crashing.org> writes:
> > You'll have to show the actual failing machine code, and with enough
> > context that we can relate this to the source code.
> >
> > -save-temps helps, or use -S instead of -c, etc.
> 
> Attached below.

Thanks!

> I think that's from:
> 
> #define LOAD_WORD       "ld "
> 
> #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.

Anyway...  something in rseq_str is wrong, missing %X<n>.  This may
have to do with the abuse of inline asm here, making a fix harder :-(


Segher


More information about the Linuxppc-dev mailing list