On Tue, Mar 16, 2021 at 2:04 AM Andreas Schwab wrote: > > On Mär 15 2021, Carlos O'Donell via Libc-alpha wrote: > > > Then we try to fix this with the new sequence: > > > > asm volatile ("movq %q0,%%fs:%P1" : > > : "i" ((uint64_t) cast_to_integer (value)), > > "i" (offsetof (struct pthread, member))); > > > > Note that "%q0" is a machine constraint for any register. > > An operand modifier isn't a constraint. It does not change what the > compiler matches for the operand, it only modifies the way the operand > is output. 'q' has no meaning for an operand matched by the 'i' > constraint, since that is never a register. That is correct. Since movq takes a register or a signed 32-bit immediate source operand, select the immediate source operand only if it is known to be 32-bit signed immediate at compile-time. Here is the v5 patch with a testcase. OK for master? Thanks. -- H.J.