Using asm_volatile_goto for get_user()

From: David Laight
Date: Mon Sep 07 2020 - 04:49:35 EST


I had an idea that might let 'asm_volatile_goto' be used for
get_user() even though gcc doesn't allow outputs.

What if (eg) 'register eax asm ("eax") is used for the
output and (probably) given in the 'clobber' list.

Such variables are usually used to get explicit registers
used when there is no suitable constraint.
I don't see why it shouldn't work for 'asm goto' as well
as just 'asm'.

While this forces the read value into a specific register
that probably doesn't make much difference to the code.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)