This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Function to compute size of i386 adress operand.



  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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]