Commit 5aa2d45a authored by Jinoh Kang's avatar Jinoh Kang Committed by Alexandre Julliard

ntdll: Move CFI helper macros out of signal_x86_64.c.

parent 81ce03df
......@@ -1010,4 +1010,35 @@ static void apply_frame_state( CONTEXT *context, struct frame_state *state,
*context = new_context;
}
#if defined(__x86_64__)
#define DW_OP_rcx DW_OP_breg2
#define DW_OP_rbp DW_OP_breg6
#define DW_OP_rsp DW_OP_breg7
#define DW_REG_rbx 0x03
#define DW_REG_rsi 0x04
#define DW_REG_rdi 0x05
#define DW_REG_rbp 0x06
#define DW_REG_rsp 0x07
#define DW_REG_r12 0x0c
#define DW_REG_r13 0x0d
#define DW_REG_r14 0x0e
#define DW_REG_r15 0x0f
#define DW_REG_rip 0x10
#endif /* defined(__x86_64__) */
#define __ASM_CFI_STR(...) #__VA_ARGS__
#define __ASM_CFI_ESC(...) \
__ASM_CFI(".cfi_escape " __ASM_CFI_STR(__VA_ARGS__) "\n\t")
#define __ASM_CFI_CFA_IS_AT1(base, offset) \
__ASM_CFI_ESC(DW_CFA_def_cfa_expression, 0x03, DW_OP_ ## base, offset, DW_OP_deref)
#define __ASM_CFI_REG_IS_AT1(reg, base, offset) \
__ASM_CFI_ESC(DW_CFA_expression, DW_REG_ ## reg, 0x02, DW_OP_ ## base, offset)
#define __ASM_CFI_CFA_IS_AT2(base, lo, hi) \
__ASM_CFI_ESC(DW_CFA_def_cfa_expression, 0x04, DW_OP_ ## base, lo, hi, DW_OP_deref)
#define __ASM_CFI_REG_IS_AT2(reg, base, lo, hi) \
__ASM_CFI_ESC(DW_CFA_expression, DW_REG_ ## reg, 0x03, DW_OP_ ## base, lo, hi)
#endif /* __NTDLL_DWARF_H */
......@@ -2524,33 +2524,6 @@ __ASM_GLOBAL_FUNC( signal_exit_thread,
__ASM_CFI(".cfi_rel_offset %r15,8\n\t")
"call *%rsi" )
#define DW_OP_rcx DW_OP_breg2
#define DW_OP_rbp DW_OP_breg6
#define DW_OP_rsp DW_OP_breg7
#define DW_REG_rbx 0x03
#define DW_REG_rsi 0x04
#define DW_REG_rdi 0x05
#define DW_REG_rbp 0x06
#define DW_REG_rsp 0x07
#define DW_REG_r12 0x0c
#define DW_REG_r13 0x0d
#define DW_REG_r14 0x0e
#define DW_REG_r15 0x0f
#define DW_REG_rip 0x10
#define __ASM_CFI_STR(...) #__VA_ARGS__
#define __ASM_CFI_ESC(...) \
__ASM_CFI(".cfi_escape " __ASM_CFI_STR(__VA_ARGS__) "\n\t")
#define __ASM_CFI_CFA_IS_AT1(base, offset) \
__ASM_CFI_ESC(DW_CFA_def_cfa_expression, 0x03, DW_OP_ ## base, offset, DW_OP_deref)
#define __ASM_CFI_REG_IS_AT1(reg, base, offset) \
__ASM_CFI_ESC(DW_CFA_expression, DW_REG_ ## reg, 0x02, DW_OP_ ## base, offset)
#define __ASM_CFI_CFA_IS_AT2(base, lo, hi) \
__ASM_CFI_ESC(DW_CFA_def_cfa_expression, 0x04, DW_OP_ ## base, lo, hi, DW_OP_deref)
#define __ASM_CFI_REG_IS_AT2(reg, base, lo, hi) \
__ASM_CFI_ESC(DW_CFA_expression, DW_REG_ ## reg, 0x03, DW_OP_ ## base, lo, hi)
/***********************************************************************
* __wine_syscall_dispatcher
*/
......
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