RFC rewrite MMX/SSE*/AVX/AVX2 vector instruction translation
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 RFC Latest74 of 75 patches 5 repliesIn review
- v3 RFC46 patches 12 repliesSuperseded
- v2 RFC39 patches 19 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 RFC | 22 patches | 17 replies | Superseded |
Changes in v4 from the cover letter
- introduce disas_insn_prefix ([2])
- rename ck_cpuid to check_cpuid ([3])
- clarify this series deals with vector instructions only ([4])
- add a list of instructions per each vector ISA extension ([5])
- change return type of check_cpuid and insnop_init to bool ([6])
74 of 75 patches are in this archive. The cover letter announces 75.
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/75 | target/i386: Push rex_r into DisasContexttarget/ | +44 | 0 replies | |
| 2/75 | target/i386: Push rex_w into DisasContexttarget/ | +11 | 1 reply | |
| 3/75 | target/i386: use dflag from DisasContexttarget/ | +90 | 0 replies | |
| 4/75 | target/i386: use prefix from DisasContexttarget/ | +55 | 0 replies | |
| 5/75 | target/i386: introduce disas_insn_prefixtarget/ | +34 | 0 replies | |
| 6/75 | target/i386: Simplify gen_exception argumentstarget/ | +44 | 0 replies | |
| 7/75 | target/i386: use pc_start from DisasContexttarget/ | +65 | 0 replies | |
| 8/75 | target/i386: make variable b1 consttarget/ | +6 | 0 replies | |
| 9/75 | target/i386: make variable is_xmm consttarget/ | +6 | 0 replies | |
| 10/75 | target/i386: add vector register file alignment constraintstarget/ | +3 | 0 replies | |
| 11/75 | target/i386: introduce gen_sse_ngtarget/ | +45 | 0 replies | |
| 12/75 | target/i386: introduce CASES_* macros in gen_sse_ngtarget/ | +54 | 0 replies | |
| 13/75 | target/i386: decode the 0F38/0F3A prefix in gen_sse_ngtarget/ | +16 | 0 replies | |
| 14/75 | target/i386: introduce aliases for some tcg_gvec operationstarget/ | +39 | 0 replies | |
| 15/75 | target/i386: introduce function check_cpuidtarget/ | +62 | 0 replies | |
| 16/75 | target/i386: disable AVX/AVX2 cpuid bitcheckstarget/ | +6 | 0 replies | |
| 17/75 | target/i386: introduce instruction operand infrastructuretarget/ | +28 | 0 replies | |
| 18/75 | target/i386: introduce generic operand aliastarget/ | +20 | 0 replies | |
| 19/75 | target/i386: introduce generic either-or operandtarget/ | +44 | 0 replies | |
| 20/75 | target/i386: introduce generic load-store operandtarget/ | +57 | 0 replies | |
| 21/75 | target/i386: introduce tcg register operandstarget/ | +44 | 0 replies | |
| 22/75 | target/i386: introduce modrm operandtarget/ | +20 | 0 replies | |
| 23/75 | target/i386: introduce operands for decoding modrm fieldstarget/ | +62 | 0 replies | |
| 24/75 | target/i386: introduce operand for direct-only r/m fieldtarget/ | +37 | 0 replies | |
| 25/75 | target/i386: introduce Ib (immediate) operandtarget/ | +18 | 0 replies | |
| 26/75 | target/i386: introduce M* (memptr) operandstarget/ | +36 | 0 replies | |
| 27/75 | target/i386: introduce G*, R*, E* (general register) operandstarget/ | +88 | 0 replies | |
| 28/75 | target/i386: introduce P*, N*, Q* (MMX) operandstarget/ | +80 | 0 replies | |
| 29/75 | target/i386: introduce H*, L*, V*, U*, W* (SSE/AVX) operandstarget/ | +220 | 0 replies | |
| 30/75 | target/i386: alias H* operands with the V* operandstarget/ | +4 | 0 replies | |
| 31/75 | target/i386: introduce code generatorstarget/ | +46 | 1 reply | |
| 32/75 | target/i386: introduce helper-based code generator macrostarget/ | +160 | 0 replies | |
| 33/75 | target/i386: introduce gvec-based code generator macrostarget/ | +25 | 0 replies | |
| 34/75 | target/i386: introduce sse-opcode.inc.htarget/ | +75 | 0 replies | |
| 35/75 | target/i386: introduce instruction translator macrostarget/ | +272 | 0 replies | |
| 36/75 | target/i386: introduce MMX translatorstarget/ | +11 | 0 replies | |
| 37/75 | target/i386: introduce MMX code generatorstarget/ | +100 | 0 replies | |
| 38/75 | target/i386: introduce MMX vector instructions to sse-opcode.inc.htarget/ | +136 | 0 replies | |
| 39/75 | target/i386: introduce SSE translatorstarget/ | +34 | 0 replies | |
| 40/75 | target/i386: introduce SSE code generatorstarget/ | +309 | 0 replies | |
| 41/75 | target/i386: introduce SSE vector instructions to sse-opcode.inc.htarget/ | +161 | 0 replies | |
| 42/75 | target/i386: introduce SSE2 translatorstarget/ | +31 | 0 replies | |
| 43/75 | target/i386: introduce SSE2 code generatorstarget/ | +425 | 0 replies | |
| 44/75 | target/i386: introduce SSE2 vector instructions to sse-opcode.inc.htarget/ | +325 | 0 replies | |
| 45/75 | target/i386: introduce SSE3 translatorstarget/ | +1 | 0 replies | |
| 46/75 | target/i386: introduce SSE3 code generatorstarget/ | +61 | 0 replies | |
| 47/75 | target/i386: introduce SSE3 vector instructions to sse-opcode.inc.htarget/ | +23 | 0 replies | |
| 48/75 | target/i386: introduce SSSE3 translatorstarget/ | +1 | 0 replies | |
| 49/75 | target/i386: introduce SSSE3 code generatorstarget/ | +33 | 0 replies | |
| 50/75 | target/i386: introduce SSSE3 vector instructions to sse-opcode.inc.htarget/ | +67 | 0 replies | |
| 51/75 | target/i386: introduce SSE4.1 translatorstarget/ | +12 | 0 replies | |
| 52/75 | target/i386: introduce SSE4.1 code generatorstarget/ | +101 | 0 replies | |
| 53/75 | target/i386: introduce SSE4.1 vector instructions to sse-opcode.inc.htarget/ | +101 | 0 replies | |
| 54/75 | target/i386: introduce SSE4.2 code generatorstarget/ | +6 | 0 replies | |
| 55/75 | target/i386: introduce SSE4.2 vector instructions to sse-opcode.inc.htarget/ | +13 | 0 replies | |
| 57/75 | target/i386: introduce AES and PCLMULQDQ code generatorstarget/ | +15 | 0 replies | |
| 58/75 | target/i386: introduce AES and PCLMULQDQ vector instructions to sse-opcode.inc.htarget/ | +34 | 1 reply | |
| 59/75 | target/i386: introduce AVX translatorstarget/ | +48 | 0 replies | |
| 60/75 | target/i386: introduce AVX code generatorstarget/ | +954 | 0 replies | |
| 61/75 | target/i386: introduce AVX vector instructions to sse-opcode.inc.htarget/ | +779 | 0 replies | |
| 62/75 | target/i386: introduce AVX2 translatorstarget/ | +16 | 0 replies | |
| 63/75 | target/i386: introduce AVX2 code generatorstarget/ | +395 | 0 replies | |
| 64/75 | target/i386: introduce AVX2 vector instructions to sse-opcode.inc.htarget/ | +359 | 1 reply | |
| 65/75 | target/i386: remove obsoleted helperstarget/ target/ target/ | +0 | 0 replies | |
| 66/75 | target/i386: cleanup leftovers in ops_sse_header.htarget/ | +6 | 0 replies | |
| 67/75 | target/i386: introduce aliases for helper-based tcg_gen_gvec_* functionstarget/ | +30 | 0 replies | |
| 68/75 | target/i386: convert ps((l, r)l(w, d, q), ra(w, d)) to helpers to gvec styletarget/ target/ target/ | +306 | 0 replies | |
| 69/75 | target/i386: convert pmullw/pmulhw/pmulhuw helpers to gvec styletarget/ target/ target/ | +51 | 0 replies | |
| 70/75 | target/i386: convert pavgb/pavgw helpers to gvec styletarget/ target/ target/ | +43 | 0 replies | |
| 71/75 | target/i386: convert pmuludq/pmaddwd helpers to gvec styletarget/ target/ target/ | +27 | 0 replies | |
| 72/75 | target/i386: convert psadbw helper to gvec styletarget/ target/ target/ | +32 | 0 replies | |
| 73/75 | target/i386: remove obsoleted helper_mov(l, q)_mm_T0target/ target/ target/ | +0 | 0 replies | |
| 74/75 | target/i386: convert pshuf(w, lw, hw, d), shuf(pd, ps) helpers to gvec styletarget/ target/ target/ | +119 | 0 replies | |
| 75/75 | target/i386: convert pmovmskb/movmskps/movmskpd helpers to gvec styletarget/ target/ target/ | +65 | 1 reply |
Reviews trailers per patch
4 of 74 patches have a Reviewed-by or Acked-by.
| Patch | Richard Henderson |
|---|---|
| 1/75 | |
| 2/75 | |
| 3/75 | |
| 4/75 | |
| 5/75 | |
| 6/75 | |
| 7/75 | R-b |
| 8/75 | R-b |
| 9/75 | R-b |
| 10/75 | R-b |
| 11/75 | |
| 12/75 | |
| 13/75 | |
| 14/75 | |
| 15/75 | |
| 16/75 | |
| 17/75 | |
| 18/75 | |
| 19/75 | |
| 20/75 | |
| 21/75 | |
| 22/75 | |
| 23/75 | |
| 24/75 | |
| 25/75 | |
| 26/75 | |
| 27/75 | |
| 28/75 | |
| 29/75 | |
| 30/75 | |
| 31/75 | |
| 32/75 | |
| 33/75 | |
| 34/75 | |
| 35/75 | |
| 36/75 | |
| 37/75 | |
| 38/75 | |
| 39/75 | |
| 40/75 | |
| 41/75 | |
| 42/75 | |
| 43/75 | |
| 44/75 | |
| 45/75 | |
| 46/75 | |
| 47/75 | |
| 48/75 | |
| 49/75 | |
| 50/75 | |
| 51/75 | |
| 52/75 | |
| 53/75 | |
| 54/75 | |
| 55/75 | |
| 57/75 | |
| 58/75 | |
| 59/75 | |
| 60/75 | |
| 61/75 | |
| 62/75 | |
| 63/75 | |
| 64/75 | |
| 65/75 | |
| 66/75 | |
| 67/75 | |
| 68/75 | |
| 69/75 | |
| 70/75 | |
| 71/75 | |
| 72/75 | |
| 73/75 | |
| 74/75 | |
| 75/75 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [RFC PATCH v4 00/75] rewrite MMX/SSE*/AVX/AVX2 vector instruction translation
Here comes the next version of my patch series, this time v4; the previous version can be found at [1].
This version can decode all vector instructions up to AVX2. However, note that this does not mean all of these instructions are implemented
correctly: to achieve that, the old ad-hoc style helpers will need to be rewritten into the style used by gvec helpers (initial effort towards that goal can be seen in patches 65-75). There is also a number of instructions which have not been previously implemented at all, for which the helpers need to be written from scratch.
Cheers,
-Jan
Changes from v3:
- introduce disas_insn_prefix ([2])
- rename ck_cpuid to check_cpuid ([3])
- clarify this series deals with vector instructions only ([4])
- add a list of instructions per each vector ISA extension ([5])
- change return type of check_cpuid and insnop_init to bool ([6])
References:
1. https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg02616.html
2. https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg02686.html
3. https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg04120.html
4. https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg04119.html
5. https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg02689.html
6. https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg02701.html
Jan Bobek (72):
target/i386: use dflag from DisasContext
target/i386: use prefix from DisasContext
target/i386: introduce disas_insn_prefix
target/i386: use pc_start from DisasContext
target/i386: make variable b1 const
target/i386: make variable is_xmm const
target/i386: add vector register file alignment constraints target/i386: introduce gen_sse_ng
target/i386: introduce CASES_* macros in gen_sse_ng target/i386: decode the 0F38/0F3A prefix in gen_sse_ng target/i386: introduce aliases for some tcg_gvec operations target/i386: introduce function check_cpuid
target/i386: disable AVX/AVX2 cpuid bitchecks
target/i386: introduce instruction operand infrastructure target/i386: introduce generic operand alias
target/i386: introduce generic either-or operand target/i386: introduce generic load-store operand target/i386: introduce tcg register operands
target/i386: introduce modrm operand
target/i386: introduce operands for decoding modrm fields target/i386: introduce operand for direct-only r/m field target/i386: introduce Ib (immediate) operand
target/i386: introduce M* (memptr) operands
target/i386: introduce G*, R*, E* (general register) operands target/i386: introduce P*, N*, Q* (MMX) operands target/i386: introduce H*, L*, V*, U*, W* (SSE/AVX) operands target/i386: alias H* operands with the V* operands target/i386: introduce code generators
target/i386: introduce helper-based code generator macros target/i386: introduce gvec-based code generator macros target/i386: introduce sse-opcode.inc.h
target/i386: introduce instruction translator macros target/i386: introduce MMX translators
target/i386: introduce MMX code generators
target/i386: introduce MMX vector instructions to sse-opcode.inc.h target/i386: introduce SSE translators
target/i386: introduce SSE code generators
target/i386: introduce SSE vector instructions to sse-opcode.inc.h target/i386: introduce SSE2 translators
target/i386: introduce SSE2 code generators
target/i386: introduce SSE2 vector instructions to sse-opcode.inc.h target/i386: introduce SSE3 translators
target/i386: introduce SSE3 code generators
target/i386: introduce SSE3 vector instructions to sse-opcode.inc.h target/i386: introduce SSSE3 translators
target/i386: introduce SSSE3 code generators
target/i386: introduce SSSE3 vector instructions to sse-opcode.inc.h target/i386: introduce SSE4.1 translators
target/i386: introduce SSE4.1 code generators
target/i386: introduce SSE4.1 vector instructions to sse-opcode.inc.h target/i386: introduce SSE4.2 code generators
target/i386: introduce SSE4.2 vector instructions to sse-opcode.inc.h target/i386: introduce AES and PCLMULQDQ translators target/i386: introduce AES and PCLMULQDQ code generators target/i386: introduce AES and PCLMULQDQ vector instructions to
sse-opcode.inc.h
target/i386: introduce AVX translators
target/i386: introduce AVX code generators
target/i386: introduce AVX vector instructions to sse-opcode.inc.h target/i386: introduce AVX2 translators
target/i386: introduce AVX2 code generators
target/i386: introduce AVX2 vector instructions to sse-opcode.inc.h target/i386: remove obsoleted helpers
target/i386: cleanup leftovers in ops_sse_header.h target/i386: introduce aliases for helper-based tcg_gen_gvec_*
functions
target/i386: convert ps((l,r)l(w,d,q),ra(w,d)) to helpers to gvec
style
target/i386: convert pmullw/pmulhw/pmulhuw helpers to gvec style target/i386: convert pavgb/pavgw helpers to gvec style target/i386: convert pmuludq/pmaddwd helpers to gvec style target/i386: convert psadbw helper to gvec style target/i386: remove obsoleted helper_mov(l,q)_mm_T0 target/i386: convert pshuf(w,lw,hw,d),shuf(pd,ps) helpers to gvec
style
target/i386: convert pmovmskb/movmskps/movmskpd helpers to gvec style
Richard Henderson (3):
target/i386: Push rex_r into DisasContext
target/i386: Push rex_w into DisasContext
target/i386: Simplify gen_exception arguments
target/i386/cpu.h | 6 +- target/i386/ops_sse.h | 812 +++--- target/i386/ops_sse_header.h | 131 +- target/i386/sse-opcode.inc.h | 2069 +++++++++++++++ target/i386/translate.c | 4777 ++++++++++++++++++++++++++++++---- 5 files changed, 6842 insertions(+), 953 deletions(-) create mode 100644 target/i386/sse-opcode.inc.h
Signature · 1 line
2.20.1