This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
float copy
- To: egcs at cygnus dot com
- Subject: float copy
- From: "Alexander V. Lukyanov" <lav at long dot yar dot ru>
- Date: Fri, 25 Sep 1998 02:28:53 +0400
Hi!
I noticed that gcc and egcs use fpu to copy floats on intel.
I think it is not the fastest way. I tried to use the following
macro in several places of mesa library and got frame rate
improvement 17.0 -> 17.3 :) (on pentum mmx 166)
#define COPY( DST, SRC ) \
if (sizeof(GLuint)==sizeof(DST)) { \
__typeof__(DST) tmp=(SRC); \
*((GLuint*)&(DST)) = *((const GLuint*)&tmp); \
} \
else { \
(DST) = (SRC); \
}
I verified asm output and integer load/store were really used.
Alexander.