public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Source code of gcc implementation of printf function in assembly.
@ 2021-05-31  8:58 Amit Choudhary
  2021-05-31  9:53 ` Florian Weimer
  0 siblings, 1 reply; 3+ messages in thread
From: Amit Choudhary @ 2021-05-31  8:58 UTC (permalink / raw)
  To: gcc-help

Hi,

I downloaded the gcc source code to find the source code of gcc
implementation of printf function in assembly. But I could not find it.
Does anyone know. Please let me know.

Amit

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

* Re: Source code of gcc implementation of printf function in assembly.
  2021-05-31  8:58 Source code of gcc implementation of printf function in assembly Amit Choudhary
@ 2021-05-31  9:53 ` Florian Weimer
  2021-05-31  9:58   ` Amit Choudhary
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Weimer @ 2021-05-31  9:53 UTC (permalink / raw)
  To: Amit Choudhary via Gcc-help; +Cc: Amit Choudhary

* Amit Choudhary via Gcc-help:

> I downloaded the gcc source code to find the source code of gcc
> implementation of printf function in assembly. But I could not find it.
> Does anyone know. Please let me know.

The implementation is in the corresponding C library (such as glibc,
musl, or newlib), not in GCC itself.  For glibc, the implementation is
in stdio-common/vfprintf-internal.c, but it is very macro-heavy and tied
to the obsolete libio framework.  Other implementations are perhaps more
straightforward.

Thanks,
Florian


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

* Re: Source code of gcc implementation of printf function in assembly.
  2021-05-31  9:53 ` Florian Weimer
@ 2021-05-31  9:58   ` Amit Choudhary
  0 siblings, 0 replies; 3+ messages in thread
From: Amit Choudhary @ 2021-05-31  9:58 UTC (permalink / raw)
  To: Florian Weimer; +Cc: Amit Choudhary via Gcc-help

Thanks Florian. I appreciate it.

Amit

On Mon, May 31, 2021, 3:23 PM Florian Weimer <fweimer@redhat.com> wrote:

> * Amit Choudhary via Gcc-help:
>
> > I downloaded the gcc source code to find the source code of gcc
> > implementation of printf function in assembly. But I could not find it.
> > Does anyone know. Please let me know.
>
> The implementation is in the corresponding C library (such as glibc,
> musl, or newlib), not in GCC itself.  For glibc, the implementation is
> in stdio-common/vfprintf-internal.c, but it is very macro-heavy and tied
> to the obsolete libio framework.  Other implementations are perhaps more
> straightforward.
>
> Thanks,
> Florian
>
>

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

end of thread, other threads:[~2021-05-31  9:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-31  8:58 Source code of gcc implementation of printf function in assembly Amit Choudhary
2021-05-31  9:53 ` Florian Weimer
2021-05-31  9:58   ` Amit Choudhary

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