aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2013-07-21 12:47:33 +0000
committerAndrew Turner <andrew@FreeBSD.org>2013-07-21 12:47:33 +0000
commitf44fbb4c13de5f3b38dcc3aaa2acbcbd0329e66a (patch)
tree8e2454523870301dec4c58a813c404d55d8de835
parent1addf6e47a2dd3157e6dbed6fc6272fbef4f3b94 (diff)
downloadsrc-f44fbb4c13de5f3b38dcc3aaa2acbcbd0329e66a.tar.gz
src-f44fbb4c13de5f3b38dcc3aaa2acbcbd0329e66a.zip
Teach siglongjmp about the VFP version of the setjmp buffer.
This fixes a bug where a call to sigsetjmp followed by siglongjmp may fail when run on a machine with VFP enabled.
Notes
Notes: svn path=/head/; revision=253518
-rw-r--r--lib/libc/arm/gen/sigsetjmp.S8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libc/arm/gen/sigsetjmp.S b/lib/libc/arm/gen/sigsetjmp.S
index 320c40da2e05..79f1f9d4cebe 100644
--- a/lib/libc/arm/gen/sigsetjmp.S
+++ b/lib/libc/arm/gen/sigsetjmp.S
@@ -57,8 +57,10 @@ ENTRY(sigsetjmp)
WEAK_ALIAS(__siglongjmp, siglongjmp)
ENTRY(siglongjmp)
- ldr r2, .L_setjmp_magic
- ldr r3, [r0]
- teq r2, r3
+ ldr r2, .L_setjmp_magic /* load magic */
+ ldr r3, [r0] /* get magic from jmp_buf */
+ bic r3, r3, #(_JB_MAGIC__SETJMP ^ _JB_MAGIC__SETJMP_VFP)
+ /* ignore VFP-ness of magic */
+ teq r2, r3 /* magic correct? */
beq PIC_SYM(_C_LABEL(_longjmp), PLT)
b PIC_SYM(_C_LABEL(longjmp), PLT)