[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4ABB7DDF.8010100@zytor.com>
Date: Thu, 24 Sep 2009 07:10:39 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Jason Baron <jbaron@...hat.com>
CC: Ingo Molnar <mingo@...e.hu>,
Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
Thomas Gleixner <tglx@...utronix.de>,
Steven Rostedt <rostedt@...dmis.org>, Andi Kleen <ak@...e.de>,
linux-kernel@...r.kernel.org
Subject: Re: Immediate values
Jason Baron wrote:
>
> right we've proposed an alternative to the immediate values, which I've
> been calling 'jump label', here:
>
> http://marc.info/?l=linux-kernel&m=125200966226921&w=2
>
> The basic idea is that gcc, 4.5 will have support for an 'asm goto'
> construct which can refer to c code labels. Thus, we can replace a nop
> in the code stream with a 'jmp' instruction to various branch targets.
>
> In terms of a comparison between the two, IMO, I think that the syntax
> for the immediate variables can be more readable, since it just looks
> like a conditional expression.
>
> The immediate values do a 'mov', 'test' and then a jump, whereas jump
> label can just do a jump. So in this respect, I believe jump label can
> be more optimal. Additinally, if we want to mark sections 'cold' so they
> don't impact the istruction cache, the jump label already has the labels
> for doing so. Obviously, a performance comparison would be interesting
> as well.
>
Direct jumps should at least theoretically be able to have better
performance, but it would still be nice to have measurements of both.
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists