lkml.org 
[lkml]   [2010]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] x86: eliminate TS_XSAVE
From
Date
You don't want to use bool since some gcc versions don't handle bool in asm well; use a u8 instead. 

"Avi Kivity" <avi@redhat.com> wrote:

>On 05/04/2010 09:24 PM, H. Peter Anvin wrote:
>>
>> I would like to request one change, however. I would like to see the
>> alternatives code to be:
>>
>> movb $0,reg
>> movb $1,reg
>>
>> ... instead of using xor (which has to be padded with NOPs, which is of
>> course pointless since the slot is a fixed size.)
>
>Right.
>
>> I would suggest using
>> a byte-sized variable instead of a dword-size variable to save a few
>> bytes, too.
>>
>
>I used a bool, and the code already compiles to a byte mov. Though it
>could be argued that a word instruction is better since it avoids a
>false dependency, and allows a preceding instruction that modifies %reg
>to be executed after the mov instruction.
>
>> Once the jump label framework is integrated and has matured, I think we
>> should consider using it to save the mov/test/jump.
>>
>
>IIRC that has an implied unlikely() which isn't suitable here?
>
>Perhaps the immediate values patches.
>
>--
>error compiling committee.c: too many arguments to function
>

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
\
 
 \ /
  Last update: 2010-05-05 14:15    [W:0.044 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site