Bug 513475 - Add SSE4.1 PMULLD instruction for x86 32 bit
Summary: Add SSE4.1 PMULLD instruction for x86 32 bit
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Alexandra Hajkova
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-17 12:19 UTC by Alexandra Hajkova
Modified: 2025-12-26 08:32 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
patch (3.45 KB, patch)
2025-12-17 12:22 UTC, Alexandra Hajkova
Details
patch (6.38 KB, patch)
2025-12-17 12:42 UTC, Alexandra Hajkova
Details
patch (7.40 KB, patch)
2025-12-17 13:17 UTC, Alexandra Hajkova
Details

Note You need to log in before you can comment on or make changes to this bug.
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.