comp.lang.ada
 help / color / mirror / Atom feed
* GNAT on SPARC
@ 2002-07-05  9:27 Arne Carlsson
  2002-07-06 11:08 ` Anders Gidenstam
  0 siblings, 1 reply; 4+ messages in thread
From: Arne Carlsson @ 2002-07-05  9:27 UTC (permalink / raw)


Hello,

I am working with GNAT (in fact GNAT-ORK) for an embedded SPARC sytem
(ERC32 processor).

I want to use in-line assembler in the Ada code. My question is: are
there any SPARC registers I can use without risk for conflict with
GNAT-use of registers?

For example, could the following inline assembler statement be in
conflict with GNAT code generation?

                    Asm ("and %%g4,%%g5,%%g6");

I have tried to find documentation about this item with no result.

Best regards
Arne Carlsson

arne.carlsson@space.se





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

* Re: GNAT on SPARC
  2002-07-05  9:27 GNAT on SPARC Arne Carlsson
@ 2002-07-06 11:08 ` Anders Gidenstam
  2002-07-06 18:30   ` Robert Dewar
  0 siblings, 1 reply; 4+ messages in thread
From: Anders Gidenstam @ 2002-07-06 11:08 UTC (permalink / raw)


In article <3D256669.71819371@space.se>,
	Arne Carlsson <arne.carlsson@space.se> writes:
> Hello,
> 
> I am working with GNAT (in fact GNAT-ORK) for an embedded SPARC sytem
> (ERC32 processor).
> 
> I want to use in-line assembler in the Ada code. My question is: are
> there any SPARC registers I can use without risk for conflict with
> GNAT-use of registers?
> 
> I have tried to find documentation about this item with no result.

Read the GNAT inline assembler tutorial at adapower.com,
http://www.adapower.com/articles/gnatasm/ and the GNAT reference
manual.
The tutorial targets x86 but the inline mechanisms are the same, in
particular look at the 'Clobber' argument to Asm.

Best Regards,

Anders Gidenstam
-- 
The trouble with having an open mind, of course, is that people
will insist on coming along and trying to put things in it. 
   -- (Terry Pratchett, Diggers)
---------------------------------------------------------------------
| Anders Gidenstam              | Chalmers University of Technology |
| Email: andersg@cs.chalmers.se | WWW: www.cs.chalmers.se/~andersg  |
---------------------------------------------------------------------




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

* Re: GNAT on SPARC
  2002-07-06 11:08 ` Anders Gidenstam
@ 2002-07-06 18:30   ` Robert Dewar
  2002-07-07  9:08     ` Anders Gidenstam
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Dewar @ 2002-07-06 18:30 UTC (permalink / raw)


anders@legolas.gidenstam.org (Anders Gidenstam) wrote in message news:<g2j6ga.262.ln@legolas>...

> Read the GNAT inline assembler tutorial at adapower.com,
> http://www.adapower.com/articles/gnatasm/ and the GNAT reference
> manual.
> The tutorial targets x86 but the inline mechanisms are the same, in
> particular look at the 'Clobber' argument to Asm.

All this is fine, but has nothing whatsoever to do with the original
query, which was about reserved registers on the SPARC!



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

* Re: GNAT on SPARC
  2002-07-06 18:30   ` Robert Dewar
@ 2002-07-07  9:08     ` Anders Gidenstam
  0 siblings, 0 replies; 4+ messages in thread
From: Anders Gidenstam @ 2002-07-07  9:08 UTC (permalink / raw)


In article <5ee5b646.0207061030.453d5d7a@posting.google.com>,
	dewar@gnat.com (Robert Dewar) writes:
> anders@legolas.gidenstam.org (Anders Gidenstam) wrote in message news:<g2j6ga.262.ln@legolas>...
> 
>> Read the GNAT inline assembler tutorial at adapower.com,
>> http://www.adapower.com/articles/gnatasm/ and the GNAT reference
>> manual.
>> The tutorial targets x86 but the inline mechanisms are the same, in
>> particular look at the 'Clobber' argument to Asm.
> 
> All this is fine, but has nothing whatsoever to do with the original
> query, which was about reserved registers on the SPARC!

Well, I thought he wanted to know how to tell the code generator which
registers his assembler code affects and in that case the Clobber
argument seems to be appropriate.

Btw. what do you mean by reserved? Reserved as in 'only accessible in
privileged mode' or reserved as in 'GNAT/GCC generated code uses them'?

/Anders
-- 
The trouble with having an open mind, of course, is that people
will insist on coming along and trying to put things in it. 
   -- (Terry Pratchett, Diggers)
---------------------------------------------------------------------
| Anders Gidenstam              | Chalmers University of Technology |
| Email: andersg@cs.chalmers.se | WWW: www.cs.chalmers.se/~andersg  |
---------------------------------------------------------------------




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

end of thread, other threads:[~2002-07-07  9:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-05  9:27 GNAT on SPARC Arne Carlsson
2002-07-06 11:08 ` Anders Gidenstam
2002-07-06 18:30   ` Robert Dewar
2002-07-07  9:08     ` Anders Gidenstam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox