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: 64 to (nearly) 32 bit cross fix


  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



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