From: <lut...@fr...> - 2006-05-28 14:10:03
Attachments:
patch-emitea
|
Hi, the assembler for x86(-64) nearly always tries to emit the shortest possible encoding for displacements. One missed opportunity for this is in EMIT-EA, when assembling the stack reference [RBP-128], where the four-byte form is used instead of the one-byte one. For example: 48899580FFFFFF MOV [RBP-128], RDX instead of 48895580 MOV [RBP-128], RDX Attached is a patch that changes that. This reduces the core size on x86-64 by 12 KB. IMO, not too bad for a one byte source code change ;-) Yours Lutz Euler |
From: Nathan F. <fr...@cs...> - 2006-05-31 02:28:13
|
On Sun, May 28, 2006 at 04:02:54PM +0200, Lutz Euler wrote: > the assembler for x86(-64) nearly always tries to emit the shortest > possible encoding for displacements. One missed opportunity for this > is in EMIT-EA, when assembling the stack reference [RBP-128], where > the four-byte form is used instead of the one-byte one. For example: > > Attached is a patch that changes that. This reduces the core size on > x86-64 by 12 KB. IMO, not too bad for a one byte source code change ;-) Thanks, merged in 0.9.13.11. If only all our patches had such a great (/ change-in-core-size size-of-patch) ratio! -- Nathan | From Man's effeminate slackness it begins. --Paradise Lost The last good thing written in C was Franz Schubert's Symphony Number 9. --Erwin Dieterich |