[common] inline get_pc to memcpySSE

This commit is contained in:
Geoffrey McRae 2018-05-19 16:21:12 +10:00
parent cd6caea4b0
commit 778af24d82

View File

@ -30,15 +30,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#define OP(...) #__VA_ARGS__ "\n\t"
#ifdef __i386__
__asm__ (
".global get_pc\n\t"
"get_pc:\n\t"
"mov (%esp), %eax \n\t"
"ret"
);
#endif
inline static void memcpySSE(void *dst, const void * src, size_t length)
{
#if !defined(NATIVE_MEMCPY) && (defined(__x86_64__) || defined(__i386__))
@ -117,13 +108,19 @@ inline static void memcpySSE(void *dst, const void * src, size_t length)
#ifdef __x86_64__
"leaq (%%rip), %%rax\n\t"
#else
"call get_pc\n\t"
"call GetPC_%=\n\t"
#endif
"Offset_%=:\n\t"
"add $(BlockTable_%= - Offset_%=), %%" REG "\n\t"
"add %[off],%%" REG " \n\t"
"jmp *%%" REG " \n\t"
#ifdef __i386__
"GetPC_%=:\n\t"
"mov (%%esp), %%eax \n\t"
"ret \n\t"
#endif
"BlockTable_%=:\n\t"
#ifdef __x86_64__
"vmovaps 0xE0(%[src]),%%xmm14 \n\t"