Author: jgardou
Date: Fri Sep 29 17:31:23 2017
New Revision: 75989
URL:
http://svn.reactos.org/svn/reactos?rev=75989&view=rev
Log:
[ASM]
- Add CFI annotation macros
CORE-13850 #resolve
Modified:
trunk/reactos/sdk/include/asm/asm.inc
Modified: trunk/reactos/sdk/include/asm/asm.inc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/asm/asm.inc?re…
==============================================================================
--- trunk/reactos/sdk/include/asm/asm.inc [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/asm/asm.inc [iso-8859-1] Fri Sep 29 17:31:23 2017
@@ -8,6 +8,13 @@
#ifndef __ASM_INC__
#define __ASM_INC__
+
+/* Common definitions for FPO macro
+ see
http://msdn.microsoft.com/en-us/library/ms679352%28VS.85%29.aspx */
+#define FRAME_FPO 0
+#define FRAME_TRAP 1
+#define FRAME_TSS 2
+#define FRAME_NONFPO 3
#ifdef _USE_ML
@@ -194,6 +201,18 @@
#define LF 10
#define NUL 0
+/* For compatibility with gas */
+#define CFI_STARTPROC
+#define CFI_ENDPROC
+#define CFI_ADJUST_CFA_OFFSET
+#define CFI_OFFSET
+#define CFI_REGISTER
+#define CFI_DEF_CFA_REGISTER
+#define CFI_DEF_CFA
+#define CFI_REL_OFFSET
+#define CFI_SAME_VALUE
+#define CFI_DEF_CFA_OFFSET
+
#else /***********************************************************************/
/* Force intel syntax */
@@ -284,7 +303,9 @@
/* check
http://msdn.microsoft.com/en-us/library/9c9k076y%28VS.80%29.aspx
and
http://msdn.microsoft.com/en-us/library/ms679352%28VS.85%29.aspx */
.macro FPO cdwLocals, cdwParams, cbProlog, cbRegs, fUseBP, cbFrame
- /* dummy */
+ .if (cbFrame == FRAME_TRAP)
+ .cfi_signal_frame
+ .endif
.endm
/* Macros for x64 stack unwind OPs */
@@ -364,13 +385,18 @@
#define LF "\n"
#define NUL "\0"
+/* CFI annotations */
+#define CFI_STARTPROC .cfi_startproc
+#define CFI_ENDPROC .cfi_endproc
+#define CFI_ADJUST_CFA_OFFSET .cfi_adjust_cfa_offset
+#define CFI_OFFSET .cfi_offset
+#define CFI_REGISTER .cfi_register
+#define CFI_DEF_CFA_REGISTER .cfi_def_cfa_register
+#define CFI_DEF_CFA .cfi_def_cfa
+#define CFI_REL_OFFSET .cfi_rel_offset
+#define CFI_SAME_VALUE .cfi_same_value
+#define CFI_DEF_CFA_OFFSET .cfi_def_cfa_offset
+
#endif
-/* Common definitions for FPO macro
- see
http://msdn.microsoft.com/en-us/library/ms679352%28VS.85%29.aspx */
-#define FRAME_FPO 0
-#define FRAME_TRAP 1
-#define FRAME_TSS 2
-#define FRAME_NONFPO 3
-
#endif /* __ASM_INC__ */