RE: [PATCH v5 1/5] x86/asm: Carve out a generic movdir64b() helper for general usage
From: David Laight
Date: Thu Sep 24 2020 - 07:25:40 EST
> > No, that just says the asm uses the value of the pointer.
> > Not what it points to.
>
> Err, no, it is *exactly* what it points to that is important here and
> you're telling the compiler that the instruction will read that much
> memory through the pointer.
You need to use an "m" constraint for that.
A 'register' constraint just requires the value of the address
to be valid.
Look at the asm output from the example code I posted.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)