mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
* i387-nat.c (i387_fill_fxsave): Change type of ``val'' from char
to short so that we don't memcpy() beyond the end of this buffer. Also, change shift value used in computing val to account for the fact that only eight bits are used.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2001-12-13 Kevin Buettner <kevinb@redhat.com>
|
||||
|
||||
* i387-nat.c (i387_fill_fxsave): Change type of ``val'' from char
|
||||
to short so that we don't memcpy() beyond the end of this buffer.
|
||||
Also, change shift value used in computing val to account for the
|
||||
fact that only eight bits are used.
|
||||
|
||||
2001-12-13 Corinna Vinschen <vinschen@redhat.com>
|
||||
|
||||
* Makefile.in: Add support for xstormy16.
|
||||
|
||||
@@ -270,7 +270,7 @@ i387_fill_fxsave (char *fxsave, int regnum)
|
||||
{
|
||||
/* Converting back is much easier. */
|
||||
|
||||
unsigned char val = 0;
|
||||
unsigned short val = 0;
|
||||
unsigned short ftag;
|
||||
int fpreg;
|
||||
|
||||
@@ -281,7 +281,7 @@ i387_fill_fxsave (char *fxsave, int regnum)
|
||||
int tag = (ftag >> (fpreg * 2)) & 3;
|
||||
|
||||
if (tag != 3)
|
||||
val |= (1 << (fpreg * 2));
|
||||
val |= (1 << fpreg);
|
||||
}
|
||||
|
||||
memcpy (FXSAVE_ADDR (fxsave, i), &val, 2);
|
||||
|
||||
Reference in New Issue
Block a user