aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2024-04-08 10:25:47 -1000
committerRichard Henderson <richard.henderson@linaro.org>2024-05-26 12:51:50 -0700
commitfcc9b64d0767563adb03c933a208e7ba5250c6f0 (patch)
treeee26ca059dd73ff3047f9351e108adc52de00d5f /linux-user
parent077c43eb0d30a257ee33f1b48ea5b29eafcf4eb5 (diff)
downloadqemu-fcc9b64d0767563adb03c933a208e7ba5250c6f0.zip
qemu-fcc9b64d0767563adb03c933a208e7ba5250c6f0.tar.gz
qemu-fcc9b64d0767563adb03c933a208e7ba5250c6f0.tar.bz2
linux-user/i386: Remove xfeatures from target_fpstate_fxsave
This is easily computed by advancing past the structure. At the same time, replace the magic number "64". Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/i386/signal.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/linux-user/i386/signal.c b/linux-user/i386/signal.c
index 89048ed..f806469 100644
--- a/linux-user/i386/signal.c
+++ b/linux-user/i386/signal.c
@@ -67,7 +67,6 @@ struct target_fpstate_fxsave {
uint32_t xmm_space[64];
uint32_t hw_reserved[12];
struct target_fpx_sw_bytes sw_reserved;
- uint8_t xfeatures[];
};
#define TARGET_FXSAVE_SIZE sizeof(struct target_fpstate_fxsave)
QEMU_BUILD_BUG_ON(TARGET_FXSAVE_SIZE != 512);
@@ -266,7 +265,7 @@ static void xsave_sigcontext(CPUX86State *env, struct target_fpstate_fxsave *fxs
assert(!(fxsave_addr & 0x3f));
/* Zero the header, XSAVE *adds* features to an existing save state. */
- memset(fxsave->xfeatures, 0, 64);
+ memset(fxsave + 1, 0, sizeof(X86XSaveHeader));
cpu_x86_xsave(env, fxsave_addr, -1);
__put_user(TARGET_FP_XSTATE_MAGIC1, &fxsave->sw_reserved.magic1);
__put_user(extended_size, &fxsave->sw_reserved.extended_size);