This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: i370 port
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: mutazilah at gmail dot com (Paul Edwards)
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 20 Aug 2009 18:51:35 +0200 (CEST)
- Subject: Re: i370 port
Paul Edwards wrote:
> > Hmm, it seems 3.2.x would *always* operate on a function-by-function
> > basis. The unit-at-a-time mode was only introduced with 3.4 (I don't
> > recall if it was already present in 3.3). I don't think there is any
> > way in 3.2.3 to check whether there is a "main" function in the file
> > before it is processed ...
>
> Does that mean I could take advantage of this behaviour?
I don't think this would be a good idea.
> /* Store in OUTPUT a string (made with alloca) containing an
> assembler-name for a local static variable named NAME.
> LABELNO is an integer which is different for each call. */
>
> #ifdef TARGET_PDPMAC
> #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
> { \
> (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10); \
> sprintf ((OUTPUT), "__%d", (LABELNO)); \
> }
How does this work? ASM_FORMAT_PRIVATE_NAME is not supposed
to completely ignore the NAME argument, the function may well
be called with the same LABELNO but different NAME strings,
and this must not result in conflicting symbols ...
> static void
> i370_output_function_prologue (f, l)
> FILE *f;
> HOST_WIDE_INT l;
> {
> /* Don't print stack and args in PDPMAC as it makes the
> comment too long */
> #ifdef TARGET_PDPMAC
> fprintf (f, "* %c-func %s prologue\n",
> mvs_need_entry ? 'X' : 'S',
> mvs_function_name);
> #else
At this point, you may refer to "current_function_decl" to
retrieve information about the function currently being output.
In particular, you can retrieve the original source-level name
associated with the routine via DECL_NAME (current_function_decl).
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com