[Glibc-bsd-commits] r1569 - in trunk/glibc-2.3-head: linuxthreads/kfreebsd/i386 sysdeps/kfreebsd/i386

Petr Salinger ps-guest at costa.debian.org
Wed May 17 09:44:00 UTC 2006


Author: ps-guest
Date: 2006-05-17 09:43:59 +0000 (Wed, 17 May 2006)
New Revision: 1569

Modified:
   trunk/glibc-2.3-head/linuxthreads/kfreebsd/i386/sysdep-cancel.h
   trunk/glibc-2.3-head/sysdeps/kfreebsd/i386/sysdep.h
Log:
* add some cfi marking for i386


Modified: trunk/glibc-2.3-head/linuxthreads/kfreebsd/i386/sysdep-cancel.h
===================================================================
--- trunk/glibc-2.3-head/linuxthreads/kfreebsd/i386/sysdep-cancel.h	2006-05-12 19:01:48 UTC (rev 1568)
+++ trunk/glibc-2.3-head/linuxthreads/kfreebsd/i386/sysdep-cancel.h	2006-05-17 09:43:59 UTC (rev 1569)
@@ -61,12 +61,13 @@
 	fork()
 	vfork()
 	rfork()
+	pipe()
    
    none of them is cancelable, therefore
 */
 
-# define PUSHRESULT	pushl %eax; pushfl
-# define POPRESULT	popfl; popl %eax
+# define PUSHRESULT	pushl %eax; cfi_adjust_cfa_offset (4);  pushfl;    cfi_adjust_cfa_offset (4)
+# define POPRESULT	popfl;      cfi_adjust_cfa_offset (-4); popl %eax; cfi_adjust_cfa_offset (-4)
 
 # ifdef IS_IN_libpthread
 #  define CENABLE	call __pthread_enable_asynccancel;
@@ -74,15 +75,23 @@
 # elif defined IS_IN_librt
 #  ifdef PIC
 #   define CENABLE	pushl %ebx; \
+			cfi_adjust_cfa_offset (4); \
+			cfi_rel_offset (ebx, 0); \
 			call __i686.get_pc_thunk.bx; \
 			addl     $_GLOBAL_OFFSET_TABLE_, %ebx; \
 			call __librt_enable_asynccancel at PLT; \
-			popl %ebx;
+			popl %ebx; \
+			cfi_adjust_cfa_offset (-4); \
+			cfi_restore (ebx);
 #   define CDISABLE	pushl %ebx; \
+			cfi_adjust_cfa_offset (4); \
+			cfi_rel_offset (ebx, 0); \
 			call __i686.get_pc_thunk.bx; \
 			addl     $_GLOBAL_OFFSET_TABLE_, %ebx; \
 			call __librt_disable_asynccancel at PLT; \
-			popl %ebx;
+			popl %ebx; \
+			cfi_adjust_cfa_offset (-4); \
+			cfi_restore (ebx);
 #  else
 #   define CENABLE	call __librt_enable_asynccancel;
 #   define CDISABLE	call __librt_disable_asynccancel

Modified: trunk/glibc-2.3-head/sysdeps/kfreebsd/i386/sysdep.h
===================================================================
--- trunk/glibc-2.3-head/sysdeps/kfreebsd/i386/sysdep.h	2006-05-12 19:01:48 UTC (rev 1568)
+++ trunk/glibc-2.3-head/sysdeps/kfreebsd/i386/sysdep.h	2006-05-17 09:43:59 UTC (rev 1569)
@@ -136,14 +136,20 @@
 #  else
 #   define SYSCALL_ERROR_HANDLER					      \
 0:pushl %ebx;								      \
+  cfi_adjust_cfa_offset (4);                                                  \
+  cfi_rel_offset (ebx, 0);                                                    \
   SETUP_PIC_REG (bx);							      \
   addl $_GLOBAL_OFFSET_TABLE_, %ebx;					      \
   pushl %eax;								      \
+  cfi_adjust_cfa_offset (4);                                                  \
   PUSH_ERRNO_LOCATION_RETURN;						      \
   call BP_SYM (__errno_location)@PLT;					      \
   POP_ERRNO_LOCATION_RETURN;						      \
   popl %ecx;								      \
+  cfi_adjust_cfa_offset (-4);                                                 \
   popl %ebx;								      \
+  cfi_adjust_cfa_offset (-4);                                                 \
+  cfi_restore (ebx);                                                          \
   movl %ecx, (%eax);							      \
   orl $-1, %eax;							      \
   jmp L(pseudo_end);




More information about the Glibc-bsd-commits mailing list