Bug 513475

Summary: Add SSE4.1 PMULLD instruction for x86 32 bit
Product: [Developer tools] valgrind Reporter: Alexandra Hajkova <ahajkova>
Component: generalAssignee: Alexandra Hajkova <ahajkova>
Status: RESOLVED FIXED    
Severity: normal CC: mark
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: patch
patch
patch

Description Alexandra Hajkova 2025-12-17 12:19:21 UTC
PMULLD is implemented fro amd64 but is missing for x86 32 bit.
Comment 1 Alexandra Hajkova 2025-12-17 12:22:24 UTC
Created attachment 187731 [details]
patch

Support pmulld (packed multiply 32-bit doubleword integers) instruction
in guest_x86_toIR.c and host_x86_isel.c. Add test function to
sse4-common.h and update none/tests/x86/sse4-x86.c to test the
instruction.
Comment 2 Alexandra Hajkova 2025-12-17 12:42:22 UTC
Created attachment 187733 [details]
patch
Comment 3 Mark Wielaard 2025-12-17 13:09:49 UTC
So this looks good.  Then only real difference with the amd64 implementation is that in case of an address there is a gen_SIGNAL_if_not_16_aligned. For the test you have to remove the test_PMULLD from sse4-64.c since it now is in sse4-common.h.
Comment 4 Alexandra Hajkova 2025-12-17 13:17:31 UTC
Created attachment 187734 [details]
patch
Comment 5 Mark Wielaard 2025-12-17 13:56:46 UTC
(In reply to Alexandra Hajkova from comment #4)
> Created attachment 187734 [details]
> patch

Looks good to me. Has NEWS entry added and ./none/tests/x86/sse4-x86 work the same with/without valgrind.
Please push.