64 to (nearly) 32 bit cross fix

Jeffrey A Law law@cygnus.com
Tue Jul 27 01:54:00 GMT 1999


  In message < 19990722182045.A13140@cygnus.com >you write:
  > Consider a target with 64-bit words but a 32-bit Pmode.
  > Begin with a tree like
  > 
  > 	minus
  > 	  plus
  > 	    symbol foo
  > 	    const 8
  > 	  const 8
  > 
  > we'll fold this to
  > 
  > 	plus
  > 	  plus
  > 	    symbol foo
  > 	    const 8
  > 	  const 0xfffffff8
  > 
  > During expansion, we'll try plus_constant on
  > 
  > 	(const:SI (symbol_ref:SI foo)
  > 		  (const_int 8))
  > 
  > 	(const_int 0xfffffff8)
I think ^^^^^^^^^^^^^^^^^^^^^^

Is the root of the problem.  You shouldn't get that kind of a const_int in
this case.  It should have been sign extended out to the size of a
HOST_WIDE_INT.

This sounds awful similar to a bug I recently fixed in expr.c.  Where is
that const_int hunk of rtl being created?

jeff




More information about the Gcc-patches mailing list