Commit 8331003f authored by Alexandre Julliard's avatar Alexandre Julliard

vcomp: Fix stack alignment in the fork wrapper on ARM.

parent a1e553aa
...@@ -107,37 +107,32 @@ __ASM_GLOBAL_FUNC( _vcomp_fork_call_wrapper, ...@@ -107,37 +107,32 @@ __ASM_GLOBAL_FUNC( _vcomp_fork_call_wrapper,
#elif defined __arm__ #elif defined __arm__
__ASM_GLOBAL_FUNC( _vcomp_fork_call_wrapper, __ASM_GLOBAL_FUNC( _vcomp_fork_call_wrapper,
"push {r4, r5, LR}\n\t" "push {fp, lr}\n\t"
"mov r4, r0\n\t" ".seh_save_regs_w {fp, lr}\n\t"
"mov r5, SP\n\t" "mov fp, sp\n\t"
".seh_save_sp fp\n\t"
".seh_endprologue\n\t"
"lsl r3, r1, #2\n\t" "lsl r3, r1, #2\n\t"
"cmp r3, #0\n\t"
"beq 5f\n\t"
"sub SP, SP, r3\n\t"
"tst r1, #1\n\t" "tst r1, #1\n\t"
"it eq\n\t" "it ne\n\t"
"subeq SP, SP, #4\n\t" "addne r3, r3, #4\n\t"
"1:\tsub r3, r3, #4\n\t" "cmp r3, #16\n\t"
"ldr r0, [r2, r3]\n\t" "it lt\n\t"
"str r0, [SP, r3]\n\t" "movlt r3, #16\n\t"
"cmp r3, #0\n\t" "sub sp, sp, r3\n\t"
"bgt 1b\n\t" "mov ip, r0\n\t"
"cmp r1, #1\n\t" "mov r3, #0\n\t"
"bgt 2f\n\t" "cmp r1, #0\n\t"
"pop {r0}\n\t" "beq 2f\n"
"b 5f\n\t" "1:\tldr r0, [r2, r3]\n\t"
"2:\tcmp r1, #2\n\t" "str r0, [sp, r3]\n\t"
"bgt 3f\n\t" "add r3, r3, #4\n\t"
"pop {r0-r1}\n\t" "subs r1, r1, #1\n\t"
"b 5f\n\t" "bne 1b\n"
"3:\tcmp r1, #3\n\t" "2:\tpop {r0-r3}\n\t"
"bgt 4f\n\t" "blx ip\n\t"
"pop {r0-r2}\n\t" "mov sp, fp\n\t"
"b 5f\n\t" "pop {fp, pc}" )
"4:\tpop {r0-r3}\n\t"
"5:\tblx r4\n\t"
"mov SP, r5\n\t"
"pop {r4, r5, PC}" )
#elif defined __aarch64__ #elif defined __aarch64__
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment