diff options
author | kib <kib@FreeBSD.org> | 2013-05-09 17:25:29 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2013-05-09 17:25:29 +0000 |
commit | e51caee7844036c335fdcef0aef1e80750642cbb (patch) | |
tree | 7d7866186b45a29d94a448a0a11e295126679f32 /sys/amd64 | |
parent | f2445b061d612f9b1548197f7d0d407a3fddfa84 (diff) | |
download | FreeBSD-src-e51caee7844036c335fdcef0aef1e80750642cbb.zip FreeBSD-src-e51caee7844036c335fdcef0aef1e80750642cbb.tar.gz |
Correct the type for the literal used on the left side of the shift up
to 63 bit positions.
Do not fill the save area and do not set the saved bit in the xstate
bit vector for the state which is not marked as enabled in xsave_mask.
Reported and tested by: Jim Ohlstein <jim@ohlste.in>
MFC after: 3 days
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/fpu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c index de79baa..9bc8a2f 100644 --- a/sys/amd64/amd64/fpu.c +++ b/sys/amd64/amd64/fpu.c @@ -687,8 +687,8 @@ fpugetregs(struct thread *td) offsetof(struct xstate_hdr, xstate_bv)); max_ext_n = flsl(xsave_mask); for (i = 0; i < max_ext_n; i++) { - bit = 1 << i; - if ((*xstate_bv & bit) != 0) + bit = 1ULL << i; + if ((xsave_mask & bit) == 0 || (*xstate_bv & bit) != 0) continue; bcopy((char *)fpu_initialstate + xsave_area_desc[i].offset, |