There is ROUNDPS, ROUNDSS, ROUNDPD, ROUNDSD SSE4.1 support on amd64, but not x86. Note there is partial x86 ROUNDSS (only) support in VEX/priv/guest_x86_toIR.c
Created attachment 191989 [details] Complete x86 ROUNDSS, ROUNDSD support and add testcases x86 already supported SSE 4.1 ROUNDSS and ROUNDSD instructions like amd64. But was missing two small fixes. commit 20277ab2a575ffb50eb4efd58b6a554ffc2927e1 (vex svn r2074) Handle non-immediate-rounding-mode versions of ROUND{P,S}{S,D}. commit 779b619c76900dd8d1aa16bb0c693918006019ee (vex svn r2211) Ignore the precision flag in the ROUND{SS,SD,PS,PD} rounding mode. Add these and adapt the ROUNDSS and ROUNDSD testcases so they work on both amd64 and x86. Move get_mxcsr, set_mxcsr, get_sse_roundingmode and set_sse_roundingmode from sse4-64.c to sse4-common.h (and add x86 variants). Move ROUNDSD and ROUNDSS test function and make them use XMMREG_DST instead of xmm11 (which isn't available on x86). Add testcase output for test_ROUNDSD_w_immediate_rounding(), test_ROUNDSS_w_immediate_rounding(), test_ROUNDSD_w_mxcsr_rounding() and test_ROUNDSS_w_mxcsr_rounding() to sse4-x86.stdout.exp.
(In reply to Mark Wielaard from comment #1) > Created attachment 191989 [details] > Complete x86 ROUNDSS, ROUNDSD support and add testcases > > x86 already supported SSE 4.1 ROUNDSS and ROUNDSD instructions like > amd64. But was missing two small fixes. > > commit 20277ab2a575ffb50eb4efd58b6a554ffc2927e1 (vex svn r2074) > Handle non-immediate-rounding-mode versions of ROUND{P,S}{S,D}. > > commit 779b619c76900dd8d1aa16bb0c693918006019ee (vex svn r2211) > Ignore the precision flag in the ROUND{SS,SD,PS,PD} rounding mode. > > Add these and adapt the ROUNDSS and ROUNDSD testcases so they work on > both amd64 and x86. Move get_mxcsr, set_mxcsr, get_sse_roundingmode > and set_sse_roundingmode from sse4-64.c to sse4-common.h (and add x86 > variants). Move ROUNDSD and ROUNDSS test function and make them use > XMMREG_DST instead of xmm11 (which isn't available on x86). > > Add testcase output for test_ROUNDSD_w_immediate_rounding(), > test_ROUNDSS_w_immediate_rounding(), test_ROUNDSD_w_mxcsr_rounding() > and test_ROUNDSS_w_mxcsr_rounding() to sse4-x86.stdout.exp. Looks perfect to me ;).
(In reply to Alexandra Hajkova from comment #2) > Looks perfect to me ;). Thanks, pushed as commit 2b76d5e545261f77a2302d106d3cd11a700b0055 Next up ROUNDPS and ROUNDPD.