[patch 1/2] i386: add CFI macros for stack manipulation

From: Chuck Ebbert
Date: Fri Jul 28 2006 - 13:54:40 EST


Add macros to dwarf2.h to simplify pushing and popping stack
variables.

Signed-off-by: Chuck Ebbert <76306.1226@xxxxxxxxxxxxxx>

--- 2.6.18-rc2-32.orig/include/asm-i386/dwarf2.h
+++ 2.6.18-rc2-32/include/asm-i386/dwarf2.h
@@ -51,4 +51,26 @@

#endif

-#endif
+.macro CFI_pushl val
+ pushl \val
+ CFI_ADJUST_CFA_OFFSET 4
+.endm
+
+.macro CFI_pushl_reg reg
+ pushl %\reg
+ CFI_ADJUST_CFA_OFFSET 4
+ CFI_REL_OFFSET \reg, 0
+.endm
+
+.macro CFI_popl val
+ popl \val
+ CFI_ADJUST_CFA_OFFSET -4
+.endm
+
+.macro CFI_popl_reg reg
+ popl %\reg
+ CFI_ADJUST_CFA_OFFSET -4
+ CFI_RESTORE \reg
+.endm
+
+#endif /* _DWARF2_H */
--
Chuck
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/