summaryrefslogtreecommitdiffstats
path: root/lib/libc/arm
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2013-07-21 12:47:33 +0000
committerandrew <andrew@FreeBSD.org>2013-07-21 12:47:33 +0000
commit80d48d248e044b205f9085e9be44aeb18c5c4cfd (patch)
tree8e2454523870301dec4c58a813c404d55d8de835 /lib/libc/arm
parentf9052e5539810cb72cf7a43461e9c6b3653662b7 (diff)
downloadFreeBSD-src-80d48d248e044b205f9085e9be44aeb18c5c4cfd.zip
FreeBSD-src-80d48d248e044b205f9085e9be44aeb18c5c4cfd.tar.gz
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.
Diffstat (limited to 'lib/libc/arm')
-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 320c40d..79f1f9d 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)
OpenPOWER on IntegriCloud