This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Function to compute size of i386 adress operand.
- To: Jan Hubicka <hubicka at atrey dot karlin dot mff dot cuni dot cz>
- Subject: Re: Function to compute size of i386 adress operand.
- From: Jeffrey A Law <law at upchuck dot cygnus dot com>
- Date: Wed, 14 Apr 1999 00:14:45 -0600
- cc: egcs-patches at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
In message <19990413133958.46467@atrey.karlin.mff.cuni.cz>you write:
> Hi
> Many decisions in instruction selections depends on resulting opcode length
> (because many CPUs hanle opcodes longer than 7 bytes badly). To make this
> decision possible I've added function MEMORY_ADDRESS_SIZE to caluclate size
> of memory operand.
>
> Most of code is borrowed from print_operand function, so hope it works
> correctly. I've tested it in some cases.
>
> It makes possible my NEG changes to work better.
Yea. This is a good idea. It turns out Cygnus wrote some similar code
internally to compute the same information.
Cygnus's code didn't handle the K6 [ESI] -> [ESI+0] transformation, but did
handle autoincremented addresses for push/pop. I think Cygnus's code is just
a tiny bit easier to read.
I went ahead and merged in the K6 stuff to Cygnus's version and installed it
into egcs.
Thanks for pointing out this issue!
jeff