Date: Sat, 28 Jul 2012 20:31:39 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: ARM floating point setjmp/longjmp support
Hi,
The attached patch is intended to add runtime-conditional support for
saving FPA/VFP/iWMMXt call-preserved registers across setjmp/longjmp.
It's modelled based on what the code in uClibc does, so I'm not sure
if it's correct, but it seems to be, and it avoids using mnemonics
that could fail depending on -march/-mfpu settings.
Could someone familiar with ARM take a look at it and see if it makes
sense, or even better, if it works? I'm a little bit doubtful about
whether the iWMMXt stuff is needed (i.e. whether it's part of any ABI
one could reasonably expect to be honored) or worth the cost, and I'm
unsure if there are other optional coprocessor registers we should be
checking for and possibly saving.
Also, there's the question of whether the conditional-execution
coprocessor instructions will generate illegal instruction exceptions
on machines without the coprocessor when the condition check fails.
One site (http://www.peter-cockerell.net/aalp/html/app-a.html) claims
they're safe, but I'd like to see something more authoritative.
Rich
View attachment "arm-fp-sjlj.diff" of type "text/plain" (1420 bytes)