On 01/07/16 16:01, Jan Beulich wrote: > ..., rendering affected code more efficient and smaller.
Ooh - this is a neat feature. > > Note that in atomic.h this at once does away with the redundant output > and input specifications of the memory location touched. > > Signed-off-by: Jan Beulich <jbeul...@suse.com> > --- > TBD: Do we want to abstract the pattern > asm ( "...; set<cc> %<out>" : "=<cons>" (var) ... ) > matching > asm ( "..." : "=@cc<cc>" (var) ... ) > via some macro? While this would eliminate many (all?) of the > conditionals added here, it would result in the : no longer being > visible in the actual source, making the asm()s look somewhat odd. > Otherwise, to limit code duplication, it may be preferable to put > the #ifdef-s inside the asm()s instead of around them. I would recommend not abstracting them. asm() statements are already subtle/hard enough to get right, and hiding the :'s will only make matters worse. As for interleaving inside the asm statement itself, we already have precedent for that with the HAVE_GAS_* predicates. It would make the patch rather larger, but might end up looking cleaner. It is probably also worth switching to named parameters to reduce the risk of getting positional parameters out of order. As for the content of the change itself, Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel