This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


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

Re: [Sim] Patch to sim/common/cgen-ops.h


Doug Evans wrote:

> Andrew may have just been refering to the name choice used in the
> generated code.  Either way, this is just a naming choice issue.
> I like the current scheme.

Kind of.

My understanding is that there are three type systems kicking around:

	host
	target
	abstract

host:
	This is the compiler on which
	the system is being run.  It has types
	such as int, long, unsigned, ...

	Their semantics are host platform
	dependant

target:
	This is the type system of the target.
	At one level there are the types for
	the target compiler (eg int which
	could be 16 bits).  At another level
	there are the concrete semantics of
	specific operations.

abstract/portable:
	For sim/common (which took things from PPC).

	This was a type system that was platform
	independant.  The semantics of something
	like:

		unsigned64 = (signed32) val;

	were well defined.  It is more fully:

		unsigned64 = (unsigned64)(signed64)(signed32) val;

	The two important things were that:

	o	The semantics were not tied to either
		the host or the target.  Instead they
		are defined abstractly.

	o	It used a very standard convention.
		C9x adopted int8 etc.  Some have
		used __u8 et.al.

		Programmers are going to be instantly
		familar with such a convention.  They
		are going to simply be bamboozled by
		a more obscure SI, DI, et.al. convention.

		sim/common used signed8 et.al. I've
		more recently seen a suggestion for
		S8, U16, et.al.

I think there are strong technical arguments for avoiding the SI, DI
convention and instead using an abstract type system that more clearly
defines its own semantics.

	enjoy,
		Andrew

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