Skip to content
Commit 93a3ae40 authored by Jacob Xu's avatar Jacob Xu Committed by Paolo Bonzini
Browse files

x86: Do not assign values to unaligned pointer to 128 bits



When compiled with clang, the following statement gets converted into a
movaps instructions.
mem->u[0] = 5; mem->u[1] = 6; mem->u[2] = 7; mem->u[3] = 8;

Since mem is an unaligned pointer to sse_union, we get a GP when
running. Let's avoid using a pointer to sse_union at all, since doing so
implies that the pointer is aligned to 128 bits.

Fixes: e5e76263 ("x86: add additional test cases for sse exceptions to
emulator.c")

Signed-off-by: default avatarJacob Xu <jacobhxu@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210511015016.815461-1-jacobhxu@google.com>
parent c986dbe8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment