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 2018-08-27 10:08:27 +00:00
parent 7cbaa4254c
commit 23eccc1282

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"
);