public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* REGISTER_PREFIX in egcs 1.0.2
@ 1998-05-02  8:47 Joel Sherrill
  1998-05-03 22:02 ` Jeffrey A Law
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Sherrill @ 1998-05-02  8:47 UTC (permalink / raw)
  To: egcs

The RTEMS source code uses the same trick as newlib to write portable
assembly language across object formats.  We try to use the macros
__REGISTER_PREFIX__ and __USER_LABEL_PREFIX__ which are sometimes provided
by gcc.  This works great on the m68k and a handful of other CPU families.
But it is not supported by all. 

This would be easy to add to all the configurations if one had the right
knowledge. How would be the safest way to go about adding these to make
sure they are correct?

Thanks.

--joel
Joel Sherrill                    Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (205) 722-9985





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

* Re: REGISTER_PREFIX in egcs 1.0.2
  1998-05-02  8:47 REGISTER_PREFIX in egcs 1.0.2 Joel Sherrill
@ 1998-05-03 22:02 ` Jeffrey A Law
  1998-05-04  5:51   ` Joel Sherrill
  0 siblings, 1 reply; 3+ messages in thread
From: Jeffrey A Law @ 1998-05-03 22:02 UTC (permalink / raw)
  To: Joel Sherrill; +Cc: egcs

  In message < Pine.BSF.3.96.980502104403.8122D-100000@vespucci.advicom.net >you write:

  > The RTEMS source code uses the same trick as newlib to write portable
  > assembly language across object formats.  We try to use the macros
  > __REGISTER_PREFIX__ and __USER_LABEL_PREFIX__ which are sometimes provided
  > by gcc.  This works great on the m68k and a handful of other CPU families.
  > But it is not supported by all. 
  > 
  > This would be easy to add to all the configurations if one had the right
  > knowledge. How would be the safest way to go about adding these to make
  > sure they are correct?
I'm not 100% sure I understand what you're asking for.

Are you asking for all the ports to actually use REGISTER_PREFIX
and friends?  This would be a lot of work, and I doubt it's worth
the effort since few ports need this facility.

Or are you asking that REGISTER_PREFIX and friends always be available 
for use by assembly code fed through gcc/cpp?  It looks like we try
to always make them available (defaulting their value to "" if the
target doesn't provide a definition).

jeff

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

* Re: REGISTER_PREFIX in egcs 1.0.2
  1998-05-03 22:02 ` Jeffrey A Law
@ 1998-05-04  5:51   ` Joel Sherrill
  0 siblings, 0 replies; 3+ messages in thread
From: Joel Sherrill @ 1998-05-04  5:51 UTC (permalink / raw)
  To: law; +Cc: egcs

On Sun, 3 May 1998, Jeffrey A Law wrote:

>   > 
>   > This would be easy to add to all the configurations if one had the right
>   > knowledge. How would be the safest way to go about adding these to make
>   > sure they are correct?
> I'm not 100% sure I understand what you're asking for.

I would like to eventually see at least USER_LABEL_PREFIX and
REGISTER_PREFIX available and correct on all ports.

> Are you asking for all the ports to actually use REGISTER_PREFIX
> and friends?  This would be a lot of work, and I doubt it's worth
> the effort since few ports need this facility.

I agree that it is not a pressing need.  I think this is something which
could be fixed as it is needed.

> Or are you asking that REGISTER_PREFIX and friends always be available 
> for use by assembly code fed through gcc/cpp?  

I am asking exactly this.  

> It looks like we try
> to always make them available (defaulting their value to "" if the
> target doesn't provide a definition).

The problem for me right now if that this is not always correct.

In the i386 asm.h we have in RTEMS, I have to undef __REGISTER_PREFIX__
from "" to set it to %.  This generates a warning every time our asm.h is
used.  I was on a warning elimination sweep and was going to fix this in
config/i386 when I realized that I did not know what it should be on EVERY
i386 target so was unsure what was correct. 

I would be happy to add these correctly to every CPU that has an RTEMS
port (so I can test them), if I had any confidence I was not going to
break something for another target.  Doing anything general in the i386
directory is scary given the number of users on that port. :) 

I think REGISTER_PREFIX should be % for for at least i386-coff and
i386-rtems.  It probably should be % for i386 elf configurations as well. 
I also have a note that in our asm.h that USER_LABEL_PREFIX is broken for
go32 but have not verified that recently. 

Any suggestions on how to get at least the i386 right without fear 
of breaking anything else?

--joel



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

end of thread, other threads:[~1998-05-04  5:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-05-02  8:47 REGISTER_PREFIX in egcs 1.0.2 Joel Sherrill
1998-05-03 22:02 ` Jeffrey A Law
1998-05-04  5:51   ` Joel Sherrill

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).