]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgcc/config/i386/linux-unwind.h
Update x32 __NR_rt_sigreturn system call number.
[thirdparty/gcc.git] / libgcc / config / i386 / linux-unwind.h
index de44823e053f343c3cb774a904e5d53e44b0dfd9..f17a46cc8e7101a0c11d63c2c54f7fc630ec23b4 100644 (file)
@@ -44,9 +44,14 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
   struct sigcontext *sc;
   long new_cfa;
 
-  /* movq __NR_rt_sigreturn, %rax ; syscall  */
+  /* movq $__NR_rt_sigreturn, %rax ; syscall.  */
+#ifdef __LP64__
+#define RT_SIGRETURN_SYSCALL   0x050f0000000fc0c7ULL
+#else
+#define RT_SIGRETURN_SYSCALL   0x050f40002006c0c7ULL
+#endif
   if (*(unsigned char *)(pc+0) == 0x48
-      && *(unsigned long *)(pc+1) == 0x050f0000000fc0c7)
+      && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
     {
       struct ucontext *uc_ = context->cfa;
       /* The void * cast is necessary to avoid an aliasing warning.