From: James Buchanan <jamesbuch@iprimus.com.au>
To: "Joseph D. Wagner" <wagnerjd@prodigy.net>,<gcc@gcc.gnu.org>
Subject: RE: Generated unique labels
Date: Fri, 03 Jan 2003 00:43:00 -0000 [thread overview]
Message-ID: <5.1.0.14.0.20030103114012.009fe840@pop.iprimus.com.au> (raw)
In-Reply-To: <004301c2b232$6c286210$578a3841@joe>
I prefer this option that Joseph has given, if possible. Using assembler local
labels means different labels for different types of assembler, doesn't it? A
platform independent label generator is probably best. Then again, I don't
really know, or understand what exactly the requirements of these labels are.
At 01:41 AM 1/2/2003 -0600, Joseph D. Wagner wrote:
>I don't know if this will work or not, but it's worth a shot.
>
>Uses C++
>
>Joseph Wagner
>
>-----Original Message-----
>From: gcc-owner@gcc.gnu.org [mailto:gcc-owner@gcc.gnu.org] On Behalf Of
>James Buchanan
>Sent: Sunday, December 29, 2002 10:32 AM
>To: gcc@gcc.gnu.org
>Subject: Generated unique labels
>
>In the Projects file:
>
>===
>Generated unique labels. Have some way of generating distinct
>labels for use in extended asm statements. I don't know what a
>good syntax would be.
>===
>
>Has this been done yet? If not has anyone been assigned to it?
>
>Where would this be done? What is an extended asm statement,
>is this asm code generated by the back end? Is there any
>distinction between asm and extended asm? So things peculiar
>to local labels can't be used?
>
>Would this be a function, let's say:
>
>...in file uniquelabel.h
>
>char *
>gen_unique_label();
>
>...in file uniquelabel.c
>char *
>gen_unique_label()
>{
> /* Get some memory or just return a pointer?? */
> char *the_label = (char *)safe_malloc();
>
> /*
> Let's say we only use a static char array
> and return a pointer to it. The caller gets it
> and copies the string straight away, but
> this seems silly. Functions should take
> care of it.
> */
>
> /*
> Or perhaps allocate a string, the caller
> can do free(the_label)
> */
>
> /* do stuff */
> return (the_label);
>}
>
>?
>
>
next prev parent reply other threads:[~2003-01-03 0:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-29 11:47 James Buchanan
2003-01-02 7:42 ` Joseph D. Wagner
2003-01-03 0:43 ` James Buchanan [this message]
2003-01-03 0:25 ` Richard Henderson
2003-01-03 0:44 ` James Buchanan
2003-01-03 12:28 ` Jonah
2003-01-03 17:34 ` Richard Henderson
2003-01-03 18:16 ` Jonah
2003-01-03 19:37 ` Joseph S. Myers
2003-01-07 16:29 Joern Rennecke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5.1.0.14.0.20030103114012.009fe840@pop.iprimus.com.au \
--to=jamesbuch@iprimus.com.au \
--cc=gcc@gcc.gnu.org \
--cc=wagnerjd@prodigy.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).