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 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
bt $0,foo(%rip) 8 bytes

Even worse for writes. The best you can usually do is to use chars on
x86.

-Andi


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