diff options
author | Daniel Jacobowitz <drow@false.org> | 2007-03-30 15:29:46 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2007-03-30 15:29:46 +0000 |
commit | 73725ff3e14348ac544538ffa3cb9db48b57f610 (patch) | |
tree | 12c8efca56ddeb08792c24b901dfe69d40fce9d5 /gdb/gdbserver/i387-fp.c | |
parent | 3c707909b23a5458d20df1af10120ddc2c0da00d (diff) | |
download | gdb-73725ff3e14348ac544538ffa3cb9db48b57f610.zip gdb-73725ff3e14348ac544538ffa3cb9db48b57f610.tar.gz gdb-73725ff3e14348ac544538ffa3cb9db48b57f610.tar.bz2 |
* i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
(i387_fxsave_to_cache): Check fp->ftag while building ftag value.
Diffstat (limited to 'gdb/gdbserver/i387-fp.c')
-rw-r--r-- | gdb/gdbserver/i387-fp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/gdbserver/i387-fp.c b/gdb/gdbserver/i387-fp.c index cce8790..e0b460f 100644 --- a/gdb/gdbserver/i387-fp.c +++ b/gdb/gdbserver/i387-fp.c @@ -174,6 +174,7 @@ i387_cache_to_fxsave (void *buf) /* Convert to the simplifed tag form stored in fxsave data. */ collect_register_by_name ("ftag", &val); val &= 0xFFFF; + val2 = 0; for (i = 7; i >= 0; i--) { int tag = (val >> (i * 2)) & 3; @@ -270,7 +271,7 @@ i387_fxsave_to_cache (const void *buf) for (i = 7; i >= 0; i--) { int tag; - if (val & (1 << i)) + if (fp->ftag & (1 << i)) tag = i387_ftag (fp, (i + 8 - top) % 8); else tag = 3; |