On Monday 09 April 2007 11:45, Natanael Copa wrote: > > Example: > > on i386, there is no widening constant store instruction > > for some types of address modes, thus > > movl $0x0,(%eax) is "c7 00 00 00 00 00" > > movb $0x0,(%eax) is "c6 00 00" > > (warning: nasm syntax below) > In this specific example you can actually do: > xor eax,eax ; 0x31 0xC0 - 2 bytes
Of course, and gcc does that. Actually, gcc knows many more such tricks. But my example is a store to _memory_ referenced by eax, not to eax itself. -- vda _______________________________________________ busybox mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/busybox
