Thanks Richard for the detailed comments/code pointers! I've switched to using MO_ALIGN_16 and implemented record_sigbus and do_unaligned_access hooks to simulate #GP(0) as suggested. Given what was said about the low likelihood of implementing #AC anytime soon, I have hardcoded #GP(0) in these hooks for now rather than plumbing through an extra bit in MemOp. Let me know if that seems reasonable, thanks!
Ricky Zhou (1): target/i386: Raise #GP on unaligned m128 accesses when required. target/i386/tcg/excp_helper.c | 13 ++++++++ target/i386/tcg/helper-tcg.h | 28 +++++++++------- target/i386/tcg/sysemu/excp_helper.c | 8 +++++ target/i386/tcg/tcg-cpu.c | 1 + target/i386/tcg/translate.c | 49 ++++++++++++++++++---------- target/i386/tcg/user/excp_helper.c | 7 ++++ 6 files changed, 77 insertions(+), 29 deletions(-) -- 2.37.2