Ticket #530 (Fixed)Sat Oct 30 19:48:04 UTC 2021
VFPSupport 0.16: unbalanced stack / register corruption in fp64pow
Reported by: | Stuart Swales (8827) | Severity: | Normal |
Part: | RISC OS: Module | Release: | |
Milestone: | Status | Fixed |
Details by Stuart Swales (8827):
Passing a NaN as a parameter to the double precision elementary function pow (implemented by fp64pow in Power64.s) leaves the stack unbalanced and some of the registers v1-v5 corrupt.
It’s missing a Pull “v1-v5, lr”,HI between the VADD/BX in
<pre>
…
10
VADDHI.F64 d0, d0, d1 ; Propagate NaNs
Pull “v1-v5, lr”,HI ; <<< insert me
BXHI lr
…
</pre>
(that’s line 510 in my source)
I’ve checked that this fix works for me in a standalone module build on ARMX6, though all platforms will be affected.
Note that the single precision pow is fine as that hasn’t pushed anything by the time the corresponding check is performed.
Changelog:
Modified by Stuart Swales (8827) Wed, November 03 2021 - 14:57:26 GMT
- Status changed from Open to Fixed
Fixed in VFPSupport 0.17