From f5b3e2bc822ebb0e34642a500667f87bba2f5105 Mon Sep 17 00:00:00 2001 From: Mark Seaborn Date: Wed, 10 Jun 2009 22:35:10 +0100 Subject: [PATCH] Fix up disallowed instructions in pthread_once --- nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S b/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S index f31d968bc5..b43a043bd0 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S @@ -37,7 +37,7 @@ __pthread_once: testl $2, (%ecx) jz 1f xorl %eax, %eax - ret + popl %ecx; nacljmp %ecx 1: pushl %ebx cfi_adjust_cfa_offset (4) @@ -119,7 +119,8 @@ __pthread_once: call HIDDEN_JUMPTARGET(__pthread_register_cancel) /* Call the user-provided initialization function. */ - call *24+UNWINDBUFSIZE(%esp) + movl 24+UNWINDBUFSIZE(%esp), %eax + naclcall %eax /* Pop the cleanup handler. */ leal 8(%esp), %eax @@ -150,7 +151,7 @@ __pthread_once: cfi_adjust_cfa_offset (-4) cfi_restore (3) xorl %eax, %eax - ret + popl %ecx; nacljmp %ecx 7: /* __sigsetjmp returned for the second time. */ movl 20+UNWINDBUFSIZE(%esp), %ebx @@ -190,6 +191,6 @@ pthread_once = __pthread_once .type __i686.get_pc_thunk.cx,@function __i686.get_pc_thunk.cx: movl (%esp), %ecx; - ret + popl %ecx; nacljmp %ecx .size __i686.get_pc_thunk.cx,.-__i686.get_pc_thunk.cx #endif -- 2.11.4.GIT