On Fri, 2020-05-15 at 08:11 +0200, Uros Bizjak via Gcc-patches wrote:
> On Fri, May 15, 2020 at 1:13 AM H.J. Lu <hjl.to...@gmail.com> wrote:
> > The -mgeneral-regs-only option generates code that uses only the
> > general-purpose registers.  It prevents the compiler from using vector
> > registers.  But GCC may still generate calls to memcpy, memmove, memset
> > and memcmp library functions.  In the GNU C library, these library
> > functions are implementated with vector registers, which makes the
> > -mgeneral-regs-only option less effective.  The new -mavoid-libcall
> > option expands memcpy, memmove and memset into REP MOVSB and REP STOSB
> > sequence.  This option can be further enhanced with a cmpmem pattern
> > to expand memcmp into REP CMPSB sequence in the future.
> > 
> > Tested on Linux/x86 and Linux/x86-64.  OK for master?
> 
> No. Library should provide functions that are appropriate for your
> target. There are probably other places in the library that use XMM
> registers, so there is no point working around only some specific
> functions.
Couldn't one make the argument that we should be using -ffreestanding and that
-ffreestanding should be emitting the necessary inline code rather than calling
out to memcpy or whatever it's doing.

jeff
> 

Reply via email to