lkml.org 
[lkml]   [2000]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] abuse of macros in swab.h
   Date: 	Tue, 19 Sep 2000 19:13:31 -0400 (EDT)
From: Alexander Viro <viro@math.psu.edu>

Nice spotting, but bad fix, IMO. swab...() stuff is a perfect
example of the dangerous use of macros. BTW, 2.4 has the same
problem.

Would you mind taking a look at the difference in code output when
register pressure in a given function is moderate to high? :-)

Unfortunately, gcc does not make inline functions as cheap as "macros
with type checking". There are extra costs and often the register
allocator cannot cope and stuff starts getting spilled to the stack.

I agree with you totally from the "dangerous use" standpoint.

Later,
David S. Miller
davem@redhat.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.128 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site