Skip to contentSkip to conversation

save 4 bytes in "thread_struct" by changing fs/gs to "unsigned short"

PATCH New Marcelo Tosatti 1 participant 1 message Jun 6, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 save 4 bytes in "thread_struct" by changing fs/gs to "unsigned short"

Hi HJLu, Linus, Arjan,

Now that all users of fs and gs fields of "thread_struct" have been switched to use "mov" instead of "movl" (newer binutils requirement), why not save 4 bytes switching those fields to 16-bit data types.

No big deal, but as we say around here, "grain by grain the chicken gets fat".

include/asm-i386/processor.h renamed from include/asm-i386/processor.h.orig +2 -2
@@ -439,8 +439,8 @@ struct thread_struct {
 	unsigned long	sysenter_cs;
 	unsigned long	eip;
 	unsigned long	esp;
-	unsigned long	fs;
-	unsigned long	gs;
+	unsigned short	fs;
+	unsigned short	gs;
 /* Hardware debugging registers */
 	unsigned long	debugreg[8];  /* %%db0-7 debug registers */
 /* fault info */