This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] RISC-V: Improve li expansion for better code density.


Hi Andreas:

Thanks, I was worry about that it might not provided by libc since it's not
in standard C,
but seems like libiberty has one, so I can use it without checking anything.

On Thu, Aug 22, 2019 at 4:05 PM Andreas Schwab <schwab@suse.de> wrote:

> On Aug 21 2019, Kito Cheng <kito.cheng@sifive.com> wrote:
>
> > +  else
> > +    {
> > +      /* In case buf is not enough, malloc a large enough buffer
> > +      and try again. */
> > +      dynbuf_len = r + 1;
> > +      dynbuf = (char *) xmalloc (dynbuf_len);
> > +      r = vsnprintf (dynbuf, dynbuf_len, format, ap);
>
> You can use vasprintf instead.
>
> Andreas.
>
> --
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]