[Mono-devel-list] [PATCH] Use smallest encoding for <alu> eax, imm

Ben Maurer bmaurer at users.sourceforge.net
Fri May 21 23:26:26 EDT 2004


Hello,

The attached patch uses the smallest possible encoding for operations
such as

add eax, 5

Before we emitted 5 as a 32 bit value in order to save one bit by using
the eax trick -- a foolish trade.

Results:

# Before
[benm at Ben mono]$ mono --stats --compile-all /devel/mcs/class/lib/default/mscorlib.dll | grep Native
Native code size:       1429905
# After
[benm at Ben mono]$ mini/mono --stats --compile-all /devel/mcs/class/lib/default/mscorlib.dll | grep Native
Native code size:       1424838

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mini-alu-eax-imm.patch
Type: text/x-patch
Size: 1010 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040521/511f9044/attachment.bin 


More information about the Mono-devel-list mailing list