Skip to content

target/i386: support x86_64-v3 for user mode applications

Paolo Bonzini qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4target/i386: decode-new: avoid out-of-bounds access to xmm_regs[-1]target/i386/tcg/emit.c.inc+1 -12 replies
2/4target/i386: introduce function to set rounding mode from FPCW or MXCSR bitstarget/i386/ops_sse.h target/i386/tcg/fpu_helper.c+25 -952 replies
3/4target/i386: implement F16C instructionstarget/i386/cpu.c target/i386/cpu.h target/i386/ops_sse.h +6 more+89 -61 reply
4/4target/i386: implement FMA instructionstarget/i386/cpu.c target/i386/ops_sse.h target/i386/ops_sse_header.h +4 more+177 -32 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchPhilippe Mathieu-DaudéRichard Henderson
1/4R-b R-b
2/4R-b R-b
3/4R-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] target/i386: support x86_64-v3 for user mode applications

The v3 ISA for x86_64 includes F16C and FMA instructions in addition to AVX2 that was just committed for QEMU 7.2. This small series implements these two features and terminates my excursion into x86 TCG. :)

Patch 1 is a bugfix for the new decoder (sob).

Patch 2 introduces a common function to convert an x86 2-bit rounding mode (as specified in FSTCW, STMXCSR and VROUND instructions). Since the same operand is used by the F16C instruction VCVTPS2PH, it is time to reduce the code duplication instead of adding more.

Patches 3 and 4 is the actual implementation, which includes all of helpers, decoding, TCG op emission and tests. Output from QEMU matches that from native x86.

Paolo Bonzini (4):
target/i386: decode-new: avoid out-of-bounds access to xmm_regs[-1] target/i386: introduce function to set rounding mode from FPCW or
MXCSR bits
target/i386: implement F16C instructions
target/i386: implement FMA instructions

 target/i386/cpu.c                |   8 +-
 target/i386/cpu.h                |   3 +
 target/i386/ops_sse.h            | 152 +++++++++++++++++++------------
 target/i386/ops_sse_header.h     |  34 +++++++
 target/i386/tcg/decode-new.c.inc |  46 ++++++++++
 target/i386/tcg/decode-new.h     |   3 +
 target/i386/tcg/emit.c.inc       |  60 +++++++++++-
 target/i386/tcg/fpu_helper.c     |  60 +++++-------
 tests/tcg/i386/test-avx.c        |  17 ++++
 tests/tcg/i386/test-avx.py       |   8 +-
 10 files changed, 289 insertions(+), 102 deletions(-)
Signature · 1 line
2.37.3