Mail Archives: djgpp/1994/04/06/10:17:00
> Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
> Date: Wed, 06 Apr 94 13:21:54 +0200
> From: eliz AT is DOT elta DOT co DOT il
> X-Mts: smtp
> DJ-Mail-Sort: djgpp@, djgpp
>
> While browsing through the libc.a sources, I noticed that the functions of the
> memxxx family (memcpy(), memset() etc.) use the byte-oriented instructions
> (i.e. rep movsb, rep stosb and the like) rather than the word- or double-word
> oriented variations. Is this intentional? Won't the operation be sped-up two-
> or four-fold by using movsd/stosd instructions?
I'll look at improving them. I'll probably need custom functions for
specific widths (for movedata, at least).
> And while on this theme, let me ask (maybe not DJGCC, but GCC) question: how,
> if at all, can I ask GCC to produce these functions as inline (i.e. assembly-
> language macros or built-in functions)?
Write a static inline function that uses asm operations. The ones in
libc.a won't be inlined.
- Raw text -