Use the correct register when storing the arm VFP state.

Previously we have been lucky where the state was already in r0, however
this is not guaranteed. Use the passed in register as the location to
store the upper half of the arm VFP registers rather than relying on it
being r0.

Approved by:	re (kib)
This commit is contained in:
Andrew Turner 2018-08-27 10:08:27 +00:00
parent a29173be53
commit 9ea0458663
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=338336

View file

@ -293,7 +293,7 @@ vfp_store(struct vfp_state *vfpsave, boolean_t disable_vfp)
" .fpu vfpv3\n"
" vstmia %0!, {d0-d15}\n" /* d0-d15 */
" cmp %1, #0\n" /* -D16 or -D32? */
" vstmiane r0!, {d16-d31}\n" /* d16-d31 */
" vstmiane %0!, {d16-d31}\n" /* d16-d31 */
" addeq %0, %0, #128\n" /* skip missing regs */
: "+&r" (vfpsave) : "r" (is_d32) : "cc"
);