Re: [PATCH] Fix msr register allocation

2007-07-30 Thread Andi Kleen
Glauber de Oliveira Costa <[EMAIL PROTECTED]> writes: > > Note that the EAX output constraint is re-used in the input section for > > (u32)val, i.e. the lower half of the value to be written. And "wrmsr" > > needs that in EAX, so you cannot change the output constraint without > > touching the

Re: [PATCH] Fix msr register allocation

2007-07-30 Thread Glauber de Oliveira Costa
On Mon, 2007-07-30 at 17:37 +0200, Björn Steinbrink wrote: > On 2007.07.30 12:25:54 -0300, Glauber de Oliveira Costa wrote: > > Since the value in ret will go through a return statement, > ^^^ > You mean "err" I guess? Yeah, you're right. > Note that the EAX output constraint

Re: [PATCH] Fix msr register allocation

2007-07-30 Thread Björn Steinbrink
On 2007.07.30 12:25:54 -0300, Glauber de Oliveira Costa wrote: > Since the value in ret will go through a return statement, ^^^ You mean "err" I guess? > it does not need to be put in eax register directly. Instead, > we let the compiler do his job and choose what to do with

[PATCH] Fix msr register allocation

2007-07-30 Thread Glauber de Oliveira Costa
Since the value in ret will go through a return statement, it does not need to be put in eax register directly. Instead, we let the compiler do his job and choose what to do with it, potentially getting a better register allocation. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]>

[PATCH] Fix msr register allocation

2007-07-30 Thread Glauber de Oliveira Costa
Since the value in ret will go through a return statement, it does not need to be put in eax register directly. Instead, we let the compiler do his job and choose what to do with it, potentially getting a better register allocation. Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED]

Re: [PATCH] Fix msr register allocation

2007-07-30 Thread Björn Steinbrink
On 2007.07.30 12:25:54 -0300, Glauber de Oliveira Costa wrote: Since the value in ret will go through a return statement, ^^^ You mean err I guess? it does not need to be put in eax register directly. Instead, we let the compiler do his job and choose what to do with it,

Re: [PATCH] Fix msr register allocation

2007-07-30 Thread Glauber de Oliveira Costa
On Mon, 2007-07-30 at 17:37 +0200, Björn Steinbrink wrote: On 2007.07.30 12:25:54 -0300, Glauber de Oliveira Costa wrote: Since the value in ret will go through a return statement, ^^^ You mean err I guess? Yeah, you're right. Note that the EAX output constraint is

Re: [PATCH] Fix msr register allocation

2007-07-30 Thread Andi Kleen
Glauber de Oliveira Costa [EMAIL PROTECTED] writes: Note that the EAX output constraint is re-used in the input section for (u32)val, i.e. the lower half of the value to be written. And wrmsr needs that in EAX, so you cannot change the output constraint without touching the input