Name:
Anonymous
2011-08-27 22:12
Assembly:
repne movsd
C/C++:
while (ecx--) { *((int*)edi++)[0] = ((int*)esi++)[0]; }
Name:
Anonymous
2011-08-28 3:50
>>1
assembly fag op posted incorrect C code.
Name:
Anonymous
2011-08-28 4:13
>>3
memcpy is usually treated as an intrinsic by C/C++ compilers and will emit an inlinted rep* movsd/movsq sequence.
Name:
Anonymous
2011-08-28 5:26
>>6
that would imply compiler writers are idiots. stop saying things.
Name:
Anonymous
2011-08-28 7:09
#define _HAVE_STRING_ARCH_memmove 1
#ifndef _FORCE_INLINES
/* Copy N bytes of SRC to DEST, guaranteeing
correct behavior for overlapping strings. */
#define memmove(dest, src, n) __memmove_g (dest, src, n)
__STRING_INLINE void *__memmove_g (void *, __const void *, size_t)
__asm__ ("memmove");
__STRING_INLINE void *
__memmove_g (void *__dest, __const void *__src, size_t __n)
{
register unsigned long int __d0, __d1, __d2;
register void *__tmp = __dest;
if (__dest < __src)
__asm__ __volatile__
("cld\n\t"
"rep; movsb"
: "=&c" (__d0), "=&S" (__d1), "=&D" (__d2),
"=m" ( *(struct { __extension__ char __x[__n]; } *)__dest)
: "0" (__n), "1" (__src), "2" (__tmp),
"m" ( *(struct { __extension__ char __x[__n]; } *)__src));
else
__asm__ __volatile__
("std\n\t"
"rep; movsb\n\t"
"cld"
: "=&c" (__d0), "=&S" (__d1), "=&D" (__d2),
"=m" ( *(struct { __extension__ char __x[__n]; } *)__dest)
: "0" (__n), "1" (__n - 1 + (__const char *) __src),
"2" (__n - 1 + (char *) __tmp),
"m" ( *(struct { __extension__ char __x[__n]; } *)__src));
return __dest;
}
#endif
Name:
Anonymous
2011-08-28 8:13
>>9
Why would it imply compiler writers are idiots?
Name:
Anonymous
2011-08-28 8:44
>>10
Why does all your variables have two under scores before them?
Horrible.
Name:
Anonymous
2011-08-28 9:40
Congratulations for discovering CISC,
>>1!
Name:
Anonymous
2011-08-28 14:26
slvea SoLVe Everything and All. Fuck this is getting OLD AS FUCK.
Name:
Anonymous
2011-08-28 14:28
>>15
It doesn't have
hax anii though, which makes it way worse than lithps. You can't deny the facts.
Name:
Anonymous
2011-08-28 18:43
>>12
So that the likelihood of my code colliding with the users code is minimal.
Name:
Anonymous
2011-08-28 19:39
Code Less, Create Less Readability