Function to compute size of i386 adress operand.

Jeffrey A Law law@upchuck.cygnus.com
Fri Apr 30 22:47:00 GMT 1999


  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



More information about the Gcc-patches mailing list