Messages in this thread | | | Date | Tue, 22 Apr 2003 00:50:09 +0100 | From | Jamie Lokier <> | Subject | Re: [PATCH] new system call mknod64 |
| |
H. Peter Anvin wrote: > > and in fact the patches I have been giving out use kdev_t > > as internal format, where you can think of kdev_t as > > u64, or, if you prefer, as struct { u32 major, minor; }. > > Any reason why we don't just *make it* a struct? (Well, besides that > it'd somewhat suck on 64-bit architectures?)
It varies very much between architectures.
I just checked, and simple copies of this structure are absolutely atrocious in GCC 3.2 (I tried Alpha, Mips64 and Sparc64). The code was approx. 3 times longer to copy the 32:32 struct than to copy a 64 bit scalar.
On x86_64, the struct produces the same code as the scalar. The same is true on s390x.
If you change this to test 16:16, on i386 (or x86_64 with -m32), the struct still produces the same code as the scalar.
Looks like a part of GCC that might be easy to improve, given that it works quite well on some architectures already.
-- Jamie - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |