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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Chuck Ebbert <[email protected]>

--- 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux