Re: [PATCH 1/1] target/i386: Raise #GP on unaligned m128 accesses when required.

2022-08-29 Thread Richard Henderson
On 8/29/22 13:46, Ricky Zhou wrote: Thanks for taking a look at this - did you see the bit in the cover letter where I discuss doing this via alignment requirements on the memory operation? My logic was that the memop alignment checks seem to be more oriented towards triggering #AC exceptions (ev

Re: [PATCH 1/1] target/i386: Raise #GP on unaligned m128 accesses when required.

2022-08-29 Thread Ricky Zhou
On Mon, Aug 29, 2022 at 9:45 AM Richard Henderson wrote: > > On 8/29/22 07:23, Ricky Zhou wrote: > This trap should be raised via the memory operation: > ... > Only the first of the two loads/stores must be aligned, as the other is known > to be +8. > You then must fill in the x86_tcg_ops.do_unal

Re: [PATCH 1/1] target/i386: Raise #GP on unaligned m128 accesses when required.

2022-08-29 Thread Richard Henderson
On 8/29/22 07:23, Ricky Zhou wrote: Many instructions which load/store 128-bit values are supposed to raise #GP when the memory operand isn't 16-byte aligned. This includes: - Instructions explicitly requiring memory alignment (Exceptions Type 1 in the "AVX and SSE Instruction Exception Spe

[PATCH 1/1] target/i386: Raise #GP on unaligned m128 accesses when required.

2022-08-29 Thread Ricky Zhou
Many instructions which load/store 128-bit values are supposed to raise #GP when the memory operand isn't 16-byte aligned. This includes: - Instructions explicitly requiring memory alignment (Exceptions Type 1 in the "AVX and SSE Instruction Exception Specification" section of the SDM) - Le