This is the mail archive of the gcc@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: PDP-10 backend for gcc



  In message <857l8ylv6b.fsf@junk.nocrew.org>you write:
  > Alan Lehotsky <lehotsky@tiac.net> writes:
  > > 	Won't work - you can't tag integers and the back-end won't
  > > 	be able to figure out when an integer is part of a pointer
  > > 	and when it's just adding 1 to a variable.
  > > 
  > > 	The RTL phase discards almost ALL language type information and
  > > 	only operates on things in 'enum machine_mode', which is
  > > 	basically just an enumeration of basic data types of fundemental
  > > 	sizes (viz.  QImode, HImode, SImode...)
  > 
  > Oh.  But the back end MUST know whether it's operating on pointers or
  > integers.  Byte pointer subtraction on a PDP-10 is much different from
  > integer subtraction.  Basically, PDP-10 byte pointers are not are not
  > integers, at least not with respect to how arithmetic are performed on
  > them.
You've got a significant problem then.  You're most likely going to have
to use something like PSImode or PDImode or something new to represent
your pointers.

Fundamentally GCC assumes that arithmetic on pointer types works just
like arithmetic on integer types.

jeff

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