lkml.org 
[lkml]   [2012]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] x86/mce: Pack boolean MCE boot flags into a structure
On Mon, Aug 27, 2012 at 03:58:59PM +0200, Andi Kleen wrote:
> On Mon, Aug 27, 2012 at 04:55:03PM +0530, Naveen N. Rao wrote:
> > Many MCE boot flags are boolean in nature, but are declared as integers
> > currently. We can pack these into a bitfield to save some space.
>
> Note that this doesn't necessarily save anything because it needs more
> code to access, and accesses are more common than the flag
>
> cmpl $0,foo(%rip) 7 bytes
> testl $1,foo(%rip) 10 bytes

I got 7 bytes:

12e9: f6 05 00 00 00 00 02 testb $0x2,0x0(%rip) # 12f0 <mce_start_timer.isra.18+0x30>

vs the old:

1654: 83 3d 00 00 00 00 00 cmpl $0x0,0x0(%rip) # 165b <mce_start_timer.clone.15+0x37>

also 7 bytes.

--
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551


\
 
 \ /
  Last update: 2012-08-27 17:01    [W:0.266 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site