Hmm. I am sort of jumping into the middle of things here. The question is how portable the code needs to be? If it's using inline assembly,

It was *not* using inline assembly, but function which is *known* to be implemented as intrinsic by *a number* of compilers. So it was portable, yet leaving compilers with a choice to inline few instructions instead. Note "was," as it's memmove now:-)

Although, if it's to be x86-specific, I'd be tempted to replace it with:
    ((unsigned int *) ptr)[0] = ((unsigned int *) (ptr+off))[0];
    ((unsigned int *) ptr)[1] = ((unsigned int *) (ptr+off))[1];

Once again, both gcc and icc 8 were doing this *all by themselves*. No need for gcc-isms, x86-specifics, just show them perfectly portable memcpy(a,b,8) and they'll inline it as above. Which is why memcpy was [consciously] chosen. Again, note "were," as it's memmove now and it's a call:-) But enough about sad:-) Cheers. A.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to