public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* Re: [Sim] Patch to sim/common/cgen-ops.h
       [not found] <200012040402.eB442Sk23037@scooby.cygnus.com>
@ 2000-12-03 20:12 ` Andrew Cagney
  2000-12-03 21:09   ` Doug Evans
  2000-12-04  4:55   ` Frank Ch. Eigler
  0 siblings, 2 replies; 6+ messages in thread
From: Andrew Cagney @ 2000-12-03 20:12 UTC (permalink / raw)
  To: Ben Elliston; +Cc: gdb-patches, cgen

Oh, what the heck.

Why is CGEN follow the GCC convention of SI, UI, BI, ZI, NFI, rather
than the sim-common convention of signed8, unsigned64, ...

	Andrew

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Sim] Patch to sim/common/cgen-ops.h
  2000-12-03 20:12 ` [Sim] Patch to sim/common/cgen-ops.h Andrew Cagney
@ 2000-12-03 21:09   ` Doug Evans
  2000-12-03 22:27     ` Ben Elliston
  2000-12-04  4:55   ` Frank Ch. Eigler
  1 sibling, 1 reply; 6+ messages in thread
From: Doug Evans @ 2000-12-03 21:09 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Ben Elliston, gdb-patches, cgen

Andrew Cagney writes:
 > Oh, what the heck.
 > 
 > Why is CGEN follow the GCC convention of SI, UI, BI, ZI, NFI, rather
 > than the sim-common convention of signed8, unsigned64, ...

'cus cgen rtl is based on gcc rtl and I like having the types
be the same in the emitted code as in the rtl.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Sim] Patch to sim/common/cgen-ops.h
  2000-12-03 21:09   ` Doug Evans
@ 2000-12-03 22:27     ` Ben Elliston
  2000-12-04 10:53       ` Doug Evans
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Elliston @ 2000-12-03 22:27 UTC (permalink / raw)
  To: Doug Evans; +Cc: Andrew Cagney, gdb-patches, cgen

    > Why is CGEN follow the GCC convention of SI, UI, BI, ZI, NFI, rather
    > than the sim-common convention of signed8, unsigned64, ...

   'cus cgen rtl is based on gcc rtl and I like having the types be the
   same in the emitted code as in the rtl.

I think Andrew was asking why the rtl uses these names.  Using other names
for the modes would not preclude the use of an rtl, it just wouldn't look
like GCC's.  Is that a bad thing, given that it would allow the programmer
to be more explicit about data representation on the target side?

Ben

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Sim] Patch to sim/common/cgen-ops.h
  2000-12-03 20:12 ` [Sim] Patch to sim/common/cgen-ops.h Andrew Cagney
  2000-12-03 21:09   ` Doug Evans
@ 2000-12-04  4:55   ` Frank Ch. Eigler
  1 sibling, 0 replies; 6+ messages in thread
From: Frank Ch. Eigler @ 2000-12-04  4:55 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Ben Elliston, gdb-patches, cgen

Hi -

On Mon, Dec 04, 2000 at 03:02:54PM +1100, Andrew Cagney wrote:
: [...]
: Why is CGEN follow the GCC convention of SI, UI, BI, ZI, NFI, rather
: than the sim-common convention of signed8, unsigned64, ...

CGEN does more than simulators (assembler/disassembler)
and more simulators than sim/common.

- FChE
-- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6K5RKVZbdDOm/ZT0RAjZSAJ91/N/P2BBJtWGX+g3UEn7C/XIJ/wCeLlb/
dbI2Cnl4OkwOLABL9oWdd0E=
=nyVA
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Sim] Patch to sim/common/cgen-ops.h
  2000-12-03 22:27     ` Ben Elliston
@ 2000-12-04 10:53       ` Doug Evans
  2000-12-04 14:31         ` Andrew Cagney
  0 siblings, 1 reply; 6+ messages in thread
From: Doug Evans @ 2000-12-04 10:53 UTC (permalink / raw)
  To: Ben Elliston; +Cc: Andrew Cagney, gdb-patches, cgen

Ben Elliston writes:
 >     > Why is CGEN follow the GCC convention of SI, UI, BI, ZI, NFI, rather
 >     > than the sim-common convention of signed8, unsigned64, ...
 > 
 >    'cus cgen rtl is based on gcc rtl and I like having the types be the
 >    same in the emitted code as in the rtl.
 > 
 > I think Andrew was asking why the rtl uses these names.  Using other names
 > for the modes would not preclude the use of an rtl, it just wouldn't look
 > like GCC's.  Is that a bad thing, given that it would allow the programmer
 > to be more explicit about data representation on the target side?

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Sim] Patch to sim/common/cgen-ops.h
  2000-12-04 10:53       ` Doug Evans
@ 2000-12-04 14:31         ` Andrew Cagney
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Cagney @ 2000-12-04 14:31 UTC (permalink / raw)
  To: Doug Evans; +Cc: Ben Elliston, gdb-patches, cgen

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2000-12-04 14:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200012040402.eB442Sk23037@scooby.cygnus.com>
2000-12-03 20:12 ` [Sim] Patch to sim/common/cgen-ops.h Andrew Cagney
2000-12-03 21:09   ` Doug Evans
2000-12-03 22:27     ` Ben Elliston
2000-12-04 10:53       ` Doug Evans
2000-12-04 14:31         ` Andrew Cagney
2000-12-04  4:55   ` Frank Ch. Eigler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).