i386 inline asm for string functions chaned with GCC 3.x. Why?
Denis Zaitsev
zzz@anda.ru
Wed Dec 24 17:05:00 GMT 2003
The question is concerning the implementation of inline asm string
functions in GLIBC (and at all as well). For some time GLIBC uses
such a construction in the _input_ parameters list for such functions
(sysdeps/i386/i486/bits/string.h):
: output args
: ... "m" ( *(struct { __extension__ char __x[__n]; } *)__s1),
"m" ( *(struct { __extension__ char __x[__n]; } *)__s2)
: other
So, what is the reason for such memory description? Am I understand
right that this tells to GCC that all writes to the memory which the
function's argument may points to must be flushed before this function
is called? Why this was not used with gcc 2.95.x? I'm asking because
this input arguments cause some unnecessary reg reloadings _around_
emiting such an inlines.
Thanks in advance.
More information about the Gcc
mailing list