[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 5/7] x86/alt: Support for automatic padding calculations
On Mon, Feb 12, 2018 at 11:23:05AM +0000, Andrew Cooper wrote: > .macro ALTERNATIVE oldinstr, newinstr, feature > .L\@_orig_s: > \oldinstr > .L\@_orig_e: > + .skip (-((repl_len(1) - orig_len) > 0) * (repl_len(1) - orig_len)), 0x90 clang chokes on this expression, because of the negation at the beginning and I'm also failing to see why are you adding such negation. AFAICT using: .skip (((repl_len(1) - orig_len) > 0) * (repl_len(1) - orig_len)), 0x90 Is correct: it adds the right padding if the alternative code is bigger than the original one, while not adding anything is the original code is greater than the alternative one. The negation just turns the 1 to -1, thus converting the result of the whole expression into a negative value. Roger. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |