vrclient: Use movaps to shift XMM registers.

Follow what GCC does.
This commit is contained in:
Józef Kucia
2018-10-11 08:21:08 -05:00
committed by Andrew Eikum
parent 824d0765aa
commit f7ffa9c395
2 changed files with 45 additions and 45 deletions
+6 -6
View File
@@ -683,9 +683,9 @@ def generate_x64_call_flat_method(cfile, param_count, has_floats, is_4th_float):
l(r' "movq %r10, %rcx\n\t" // add This pointer')
if has_floats:
l(r' "movq %xmm2, %xmm3\n\t"')
l(r' "movq %xmm1, %xmm2\n\t"')
l(r' "movq %xmm0, %xmm1\n\t"')
l(r' "movaps %xmm2, %xmm3\n\t"')
l(r' "movaps %xmm1, %xmm2\n\t"')
l(r' "movaps %xmm0, %xmm1\n\t"')
l(r' "call *%r11\n\t"')
l(r' "addq $0x%x, %%rsp\n\t"' % stack_space);
@@ -725,9 +725,9 @@ __ASM_GLOBAL_FUNC(call_flat_method_f,
"movq %rdx, %r8\n\t"
"movq %rcx, %rdx\n\t"
"movq %r10, %rcx\n\t" // add This pointer
"movq %xmm2, %xmm3\n\t"
"movq %xmm1, %xmm2\n\t"
"movq %xmm0, %xmm1\n\t"
"movaps %xmm2, %xmm3\n\t"
"movaps %xmm1, %xmm2\n\t"
"movaps %xmm0, %xmm1\n\t"
"jmp *%r11");
extern void call_flat_method_f(void);
""")
+39 -39
View File
@@ -29,9 +29,9 @@ __ASM_GLOBAL_FUNC(call_flat_method_f,
"movq %rdx, %r8\n\t"
"movq %rcx, %rdx\n\t"
"movq %r10, %rcx\n\t" // add This pointer
"movq %xmm2, %xmm3\n\t"
"movq %xmm1, %xmm2\n\t"
"movq %xmm0, %xmm1\n\t"
"movaps %xmm2, %xmm3\n\t"
"movaps %xmm1, %xmm2\n\t"
"movaps %xmm0, %xmm1\n\t"
"jmp *%r11");
extern void call_flat_method_f(void);
@@ -144,9 +144,9 @@ __ASM_GLOBAL_FUNC(call_flat_method4_f,
"movq %rdx, %r8\n\t"
"movq %rcx, %rdx\n\t"
"movq %r10, %rcx\n\t" // add This pointer
"movq %xmm2, %xmm3\n\t"
"movq %xmm1, %xmm2\n\t"
"movq %xmm0, %xmm1\n\t"
"movaps %xmm2, %xmm3\n\t"
"movaps %xmm1, %xmm2\n\t"
"movaps %xmm0, %xmm1\n\t"
"call *%r11\n\t"
"addq $0x28, %rsp\n\t"
"ret");
@@ -159,9 +159,9 @@ __ASM_GLOBAL_FUNC(call_flat_method4_f_f,
"movq %rdx, %r8\n\t"
"movq %rcx, %rdx\n\t"
"movq %r10, %rcx\n\t" // add This pointer
"movq %xmm2, %xmm3\n\t"
"movq %xmm1, %xmm2\n\t"
"movq %xmm0, %xmm1\n\t"
"movaps %xmm2, %xmm3\n\t"
"movaps %xmm1, %xmm2\n\t"
"movaps %xmm0, %xmm1\n\t"
"call *%r11\n\t"
"addq $0x28, %rsp\n\t"
"ret");
@@ -176,9 +176,9 @@ __ASM_GLOBAL_FUNC(call_flat_method5_f,
"movq %rdx, %r8\n\t"
"movq %rcx, %rdx\n\t"
"movq %r10, %rcx\n\t" // add This pointer
"movq %xmm2, %xmm3\n\t"
"movq %xmm1, %xmm2\n\t"
"movq %xmm0, %xmm1\n\t"
"movaps %xmm2, %xmm3\n\t"
"movaps %xmm1, %xmm2\n\t"
"movaps %xmm0, %xmm1\n\t"
"call *%r11\n\t"
"addq $0x38, %rsp\n\t"
"ret");
@@ -193,9 +193,9 @@ __ASM_GLOBAL_FUNC(call_flat_method5_f_f,
"movq %rdx, %r8\n\t"
"movq %rcx, %rdx\n\t"
"movq %r10, %rcx\n\t" // add This pointer
"movq %xmm2, %xmm3\n\t"
"movq %xmm1, %xmm2\n\t"
"movq %xmm0, %xmm1\n\t"
"movaps %xmm2, %xmm3\n\t"
"movaps %xmm1, %xmm2\n\t"
"movaps %xmm0, %xmm1\n\t"
"call *%r11\n\t"
"addq $0x38, %rsp\n\t"
"ret");
@@ -212,9 +212,9 @@ __ASM_GLOBAL_FUNC(call_flat_method6_f,
"movq %rdx, %r8\n\t"
"movq %rcx, %rdx\n\t"
"movq %r10, %rcx\n\t" // add This pointer
"movq %xmm2, %xmm3\n\t"
"movq %xmm1, %xmm2\n\t"
"movq %xmm0, %xmm1\n\t"
"movaps %xmm2, %xmm3\n\t"
"movaps %xmm1, %xmm2\n\t"
"movaps %xmm0, %xmm1\n\t"
"call *%r11\n\t"
"addq $0x38, %rsp\n\t"
"ret");
@@ -231,9 +231,9 @@ __ASM_GLOBAL_FUNC(call_flat_method6_f_f,
"movq %rdx, %r8\n\t"
"movq %rcx, %rdx\n\t"
"movq %r10, %rcx\n\t" // add This pointer
"movq %xmm2, %xmm3\n\t"
"movq %xmm1, %xmm2\n\t"
"movq %xmm0, %xmm1\n\t"
"movaps %xmm2, %xmm3\n\t"
"movaps %xmm1, %xmm2\n\t"
"movaps %xmm0, %xmm1\n\t"
"call *%r11\n\t"
"addq $0x38, %rsp\n\t"
"ret");
@@ -252,9 +252,9 @@ __ASM_GLOBAL_FUNC(call_flat_method7_f,
"movq %rdx, %r8\n\t"
"movq %rcx, %rdx\n\t"
"movq %r10, %rcx\n\t" // add This pointer
"movq %xmm2, %xmm3\n\t"
"movq %xmm1, %xmm2\n\t"
"movq %xmm0, %xmm1\n\t"
"movaps %xmm2, %xmm3\n\t"
"movaps %xmm1, %xmm2\n\t"
"movaps %xmm0, %xmm1\n\t"
"call *%r11\n\t"
"addq $0x48, %rsp\n\t"
"ret");
@@ -273,9 +273,9 @@ __ASM_GLOBAL_FUNC(call_flat_method7_f_f,
"movq %rdx, %r8\n\t"
"movq %rcx, %rdx\n\t"
"movq %r10, %rcx\n\t" // add This pointer
"movq %xmm2, %xmm3\n\t"
"movq %xmm1, %xmm2\n\t"
"movq %xmm0, %xmm1\n\t"
"movaps %xmm2, %xmm3\n\t"
"movaps %xmm1, %xmm2\n\t"
"movaps %xmm0, %xmm1\n\t"
"call *%r11\n\t"
"addq $0x48, %rsp\n\t"
"ret");
@@ -296,9 +296,9 @@ __ASM_GLOBAL_FUNC(call_flat_method8_f,
"movq %rdx, %r8\n\t"
"movq %rcx, %rdx\n\t"
"movq %r10, %rcx\n\t" // add This pointer
"movq %xmm2, %xmm3\n\t"
"movq %xmm1, %xmm2\n\t"
"movq %xmm0, %xmm1\n\t"
"movaps %xmm2, %xmm3\n\t"
"movaps %xmm1, %xmm2\n\t"
"movaps %xmm0, %xmm1\n\t"
"call *%r11\n\t"
"addq $0x48, %rsp\n\t"
"ret");
@@ -319,9 +319,9 @@ __ASM_GLOBAL_FUNC(call_flat_method8_f_f,
"movq %rdx, %r8\n\t"
"movq %rcx, %rdx\n\t"
"movq %r10, %rcx\n\t" // add This pointer
"movq %xmm2, %xmm3\n\t"
"movq %xmm1, %xmm2\n\t"
"movq %xmm0, %xmm1\n\t"
"movaps %xmm2, %xmm3\n\t"
"movaps %xmm1, %xmm2\n\t"
"movaps %xmm0, %xmm1\n\t"
"call *%r11\n\t"
"addq $0x48, %rsp\n\t"
"ret");
@@ -344,9 +344,9 @@ __ASM_GLOBAL_FUNC(call_flat_method9_f,
"movq %rdx, %r8\n\t"
"movq %rcx, %rdx\n\t"
"movq %r10, %rcx\n\t" // add This pointer
"movq %xmm2, %xmm3\n\t"
"movq %xmm1, %xmm2\n\t"
"movq %xmm0, %xmm1\n\t"
"movaps %xmm2, %xmm3\n\t"
"movaps %xmm1, %xmm2\n\t"
"movaps %xmm0, %xmm1\n\t"
"call *%r11\n\t"
"addq $0x58, %rsp\n\t"
"ret");
@@ -369,9 +369,9 @@ __ASM_GLOBAL_FUNC(call_flat_method9_f_f,
"movq %rdx, %r8\n\t"
"movq %rcx, %rdx\n\t"
"movq %r10, %rcx\n\t" // add This pointer
"movq %xmm2, %xmm3\n\t"
"movq %xmm1, %xmm2\n\t"
"movq %xmm0, %xmm1\n\t"
"movaps %xmm2, %xmm3\n\t"
"movaps %xmm1, %xmm2\n\t"
"movaps %xmm0, %xmm1\n\t"
"call *%r11\n\t"
"addq $0x58, %rsp\n\t"
"ret");