lkml.org 
[lkml]   [2019]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf/x86/intel: Mark expected switch fall-throughs
On Thu, Jun 27, 2019 at 09:12:50AM +0200, Peter Zijlstra wrote:

> Josh came up with the following:
>
> + /* If the jump target is close, do a 2-byte nop: */
> + ".skip -(%l[l_yes] - 1b <= 126), 0x66\n"
> + ".skip -(%l[l_yes] - 1b <= 126), 0x90\n"
> + /* Otherwise do a 5-byte nop: */
> + ".skip -(%l[l_yes] - 1b > 126), 0x0f\n"
> + ".skip -(%l[l_yes] - 1b > 126), 0x1f\n"
> + ".skip -(%l[l_yes] - 1b > 126), 0x44\n"
> + ".skip -(%l[l_yes] - 1b > 126), 0x00\n"
> + ".skip -(%l[l_yes] - 1b > 126), 0x00\n"
>
> Which is a wonderfully gruesome hack :-) So I'll be playing with that
> for a bit.

For those with interest; full patches at:

https://lkml.kernel.org/r/20190628102113.360432762@infradead.org

\
 
 \ /
  Last update: 2019-06-28 15:32    [W:0.104 / U:7.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site