From 778af24d82879efcb52f6c8214759d4de67cf2fb Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sat, 19 May 2018 16:21:12 +1000 Subject: [PATCH] [common] inline get_pc to memcpySSE --- common/memcpySSE2.h | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/common/memcpySSE2.h b/common/memcpySSE2.h index 02047ffb..a43317dc 100644 --- a/common/memcpySSE2.h +++ b/common/memcpySSE2.h @@ -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"