x86 bitops adjustment
PATCH 1/7 x86 bitops adjustment
(partly in preparation for initial PAE-guest-on-64bit patches) For constant_test_bit(), since the bitfield is split into 'unsigned int'-s, also only used an unsigned literal one for shifting (should produce slightly smaller code on x86-64).
For variable_test_bit(), the 'const' modifier was missing from the bitfield parameter - the 'variable' in the name is regarding the 'nr' parameter, not the bitfield.
Signed-off-by Jan Beulich <[email protected]>
xen/include/asm-x86/bitops.h +2 -2
@@ -224,10 +224,10 @@ static __inline__ int test_and_change_bistatic __inline__int constant_test_bit (int nr,const volatile void * addr) { -return ((1UL << (nr &31 )) & (((const volatile unsigned int *) addr)[nr >>5 ])) !=0 ; +return ((1U << (nr &31 )) & (((const volatile unsigned int *) addr)[nr >>5 ])) !=0 ; } -static __inline__int variable_test_bit (int nr,volatile void * addr) +static __inline__int variable_test_bit (int nr,const volatile void * addr) {int oldbit;
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel