vrclient: Add CFI directives to asm functions.

Fixes backtraces.
This commit is contained in:
Józef Kucia
2018-08-29 17:48:11 +02:00
committed by Andrew Eikum
parent f7ffa9c395
commit 5d073d3f40
3 changed files with 40 additions and 0 deletions

View File

@ -664,6 +664,7 @@ def generate_x64_call_flat_method(cfile, param_count, has_floats, is_4th_float):
l(r"__ASM_GLOBAL_FUNC(%s," % name)
l(r' "subq $0x%x, %%rsp\n\t"' % stack_space);
l(r' __ASM_CFI(".cfi_adjust_cfa_offset %d\n\t")' % stack_space)
if is_4th_float:
l(r' "movq %%xmm3, 0x%x(%%rsp)\n\t"' % dst_offset)
@ -689,6 +690,7 @@ def generate_x64_call_flat_method(cfile, param_count, has_floats, is_4th_float):
l(r' "call *%r11\n\t"')
l(r' "addq $0x%x, %%rsp\n\t"' % stack_space);
l(r' __ASM_CFI(".cfi_adjust_cfa_offset -%d\n\t")' % stack_space)
l(r' "ret");')
l(r'extern void %s(void);' % name);