All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aleksandar Markovic <aleksandar.markovic@rt-rk.com>
To: qemu-devel@nongnu.org
Cc: aurelien@aurel32.net, richard.henderson@linaro.org,
	jancraig@amazon.com, amarkovic@wavecomp.com,
	smarkovic@wavecomp.com, pjovanovic@wavecomp.com
Subject: [Qemu-devel] [PATCH v7 20/20] target/mips: Amend MXU ASE overview note
Date: Wed, 24 Oct 2018 14:18:47 +0200	[thread overview]
Message-ID: <1540383527-7923-21-git-send-email-aleksandar.markovic@rt-rk.com> (raw)
In-Reply-To: <1540383527-7923-1-git-send-email-aleksandar.markovic@rt-rk.com>

From: Aleksandar Markovic <amarkovic@wavecomp.com>

Add prefix, suffix, operation descriptions, and other corrections
and amendments to the comment that describes MXU ASE.

Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
---
 target/mips/translate.c | 84 +++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 74 insertions(+), 10 deletions(-)

diff --git a/target/mips/translate.c b/target/mips/translate.c
index 3620ae5..9bd5f27 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -1410,25 +1410,89 @@ enum {
  * MXU unit contains 17 registers called X0-X16. X0 is always zero, and X16 is
  * the control register.
  *
- * The notation used in MXU assembler mnemonics:
+ * The notation used in MXU assembler mnemonics
+ * --------------------------------------------
+ *
+ *  Registers:
  *
  *   XRa, XRb, XRc, XRd - MXU registers
  *   Rb, Rc, Rd, Rs, Rt - general purpose MIPS registers
- *   s12                - a subfield of an instruction code
- *   strd2              - a subfield of an instruction code
- *   eptn2              - a subfield of an instruction code
- *   eptn3              - a subfield of an instruction code
- *   optn2              - a subfield of an instruction code
- *   optn3              - a subfield of an instruction code
- *   sft4               - a subfield of an instruction code
+ *
+ *  Subfields:
+ *
+ *   aptn1              - 1-bit accumulate add/subtract pattern
+ *   aptn2              - 2-bit accumulate add/subtract pattern
+ *   eptn2              - 2-bit execute add/subtract pattern
+ *   optn2              - 2-bit operand pattern
+ *   optn3              - 3-bit operand pattern
+ *   sft4               - 4-bit shift amount
+ *   strd2              - 2-bit stride amount
+ *
+ *  Prefixes:
+ *
+ *   <Operation parallel level><Operand size>
+ *     S                         32
+ *     D                         16
+ *     Q                          8
+ *
+ *  Suffixes:
+ *
+ *   E - Expand results
+ *   F - Fixed point multiplication
+ *   L - Low part result
+ *   R - Doing rounding
+ *   V - Variable instead of immediate
+ *   W - Combine above L and V
+ *
+ *  Operations:
+ *
+ *   ADD   - Add or subtract
+ *   ADDC  - Add with carry-in
+ *   ACC   - Accumulate
+ *   ASUM  - Sum together then accumulate (add or subtract)
+ *   ASUMC - Sum together then accumulate (add or subtract) with carry-in
+ *   AVG   - Average between 2 operands
+ *   ABD   - Absolute difference
+ *   ALN   - Align data
+ *   AND   - Logical bitwise 'and' operation
+ *   CPS   - Copy sign
+ *   EXTR  - Extract bits
+ *   I2M   - Move from GPR register to MXU register
+ *   LDD   - Load data from memory to XRF
+ *   LDI   - Load data from memory to XRF (and increase the address base)
+ *   LUI   - Load unsigned immediate
+ *   MUL   - Multiply
+ *   MULU  - Unsigned multiply
+ *   MADD  - 64-bit operand add 32x32 product
+ *   MSUB  - 64-bit operand subtract 32x32 product
+ *   MAC   - Multiply and accumulate (add or subtract)
+ *   MAD   - Multiply and add or subtract
+ *   MAX   - Maximum between 2 operands
+ *   MIN   - Minimum between 2 operands
+ *   M2I   - Move from MXU register to GPR register
+ *   MOVZ  - Move if zero
+ *   MOVN  - Move if non-zero
+ *   NOR   - Logical bitwise 'nor' operation
+ *   OR    - Logical bitwise 'or' operation
+ *   STD   - Store data from XRF to memory
+ *   SDI   - Store data from XRF to memory (and increase the address base)
+ *   SLT   - Set of less than comparison
+ *   SAD   - Sum of absolute differences
+ *   SLL   - Logical shift left
+ *   SLR   - Logical shift right
+ *   SAR   - Arithmetic shift right
+ *   SAT   - Saturation
+ *   SFL   - Shuffle
+ *   SCOP  - Calculate x’s scope (-1, means x<0; 0, means x==0; 1, means x>0)
+ *   XOR   - Logical bitwise 'exclusive or' operation
  *
  * Load/Store instructions           Multiplication instructions
  * -----------------------           ---------------------------
  *
  *  S32LDD XRa, Rb, s12               S32MADD XRa, XRd, Rs, Rt
  *  S32STD XRa, Rb, s12               S32MADDU XRa, XRd, Rs, Rt
- *  S32LDDV XRa, Rb, rc, strd2        S32SUB XRa, XRd, Rs, Rt
- *  S32STDV XRa, Rb, rc, strd2        S32SUBU XRa, XRd, Rs, Rt
+ *  S32LDDV XRa, Rb, rc, strd2        S32MSUB XRa, XRd, Rs, Rt
+ *  S32STDV XRa, Rb, rc, strd2        S32MSUBU XRa, XRd, Rs, Rt
  *  S32LDI XRa, Rb, s12               S32MUL XRa, XRd, Rs, Rt
  *  S32SDI XRa, Rb, s12               S32MULU XRa, XRd, Rs, Rt
  *  S32LDIV XRa, Rb, rc, strd2        D16MUL XRa, XRb, XRc, XRd, optn2
-- 
2.7.4

  parent reply	other threads:[~2018-10-24 12:22 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-24 12:18 [Qemu-devel] [PATCH v7 00/20] target/mips: Add limited support for Ingenic's MXU ASE Aleksandar Markovic
2018-10-24 12:18 ` [Qemu-devel] [PATCH v7 01/20] target/mips: Introduce MXU registers Aleksandar Markovic
2018-10-24 12:18 ` [Qemu-devel] [PATCH v7 02/20] target/mips: Define a bit for MXU in insn_flags Aleksandar Markovic
2018-10-28 18:05   ` Aleksandar Markovic
2018-10-24 12:18 ` [Qemu-devel] [PATCH v7 03/20] target/mips: Amend MXU instruction opcodes Aleksandar Markovic
2018-10-25  8:31   ` Stefan Markovic
2018-10-24 12:18 ` [Qemu-devel] [PATCH v7 04/20] target/mips: Add and integrate MXU decoding engine placeholder Aleksandar Markovic
2018-10-26  9:10   ` Stefan Markovic
2018-10-28 17:57     ` Aleksandar Markovic
2018-10-28 18:39       ` Aleksandar Markovic
2018-10-29 10:09         ` Stefan Markovic
2018-10-24 12:18 ` [Qemu-devel] [PATCH v7 05/20] target/mips: Add MXU decoding engine Aleksandar Markovic
2018-10-26  9:13   ` Stefan Markovic
2018-10-24 12:18 ` [Qemu-devel] [PATCH v7 06/20] target/mips: Add bit encoding for MXU accumulate add/sub 1-bit pattern 'aptn1' Aleksandar Markovic
2018-10-26  9:16   ` Stefan Markovic
2018-10-24 12:18 ` [Qemu-devel] [PATCH v7 07/20] target/mips: Add bit encoding for MXU accumulate add/sub 2-bit pattern 'aptn2' Aleksandar Markovic
2018-10-28 17:37   ` Aleksandar Markovic
2018-10-24 12:18 ` [Qemu-devel] [PATCH v7 08/20] target/mips: Add bit encoding for MXU execute add/sub pattern 'eptn2' Aleksandar Markovic
2018-10-26  9:17   ` Stefan Markovic
2018-10-24 12:18 ` [Qemu-devel] [PATCH v7 09/20] target/mips: Add bit encoding for MXU operand getting pattern 'optn2' Aleksandar Markovic
2018-10-28 17:36   ` Aleksandar Markovic
2018-10-24 12:18 ` [Qemu-devel] [PATCH v7 10/20] target/mips: Add bit encoding for MXU operand getting pattern 'optn3' Aleksandar Markovic
2018-10-28 17:35   ` Aleksandar Markovic
2018-10-24 12:18 ` [Qemu-devel] [PATCH v7 11/20] target/mips: Add emulation of non-MXU MULL within MXU decoding engine Aleksandar Markovic
2018-10-28 18:20   ` Aleksandar Markovic
2018-10-24 12:18 ` [Qemu-devel] [PATCH v7 12/20] target/mips: Add emulation of MXU instructions S32I2M and S32M2I Aleksandar Markovic
2018-10-28 18:19   ` Aleksandar Markovic
2018-10-24 12:18 ` [Qemu-devel] [PATCH v7 13/20] target/mips: Move MUL, S32M2I, S32I2M handling out of main MXU switch Aleksandar Markovic
2018-10-26  9:45   ` Stefan Markovic
2018-10-29 10:12     ` Stefan Markovic
2018-10-24 12:18 ` [Qemu-devel] [PATCH v7 14/20] target/mips: Add emulation of MXU instruction S8LDD Aleksandar Markovic
2018-10-25  8:08   ` Aleksandar Markovic
2018-10-24 12:18 ` [Qemu-devel] [PATCH v7 15/20] target/mips: Add emulation of MXU instruction D16MUL Aleksandar Markovic
2018-10-25  8:06   ` Aleksandar Markovic
2018-10-24 12:18 ` [Qemu-devel] [PATCH v7 16/20] target/mips: Add emulation of MXU instruction D16MAC Aleksandar Markovic
2018-10-25  8:07   ` Aleksandar Markovic
2018-10-24 12:18 ` [Qemu-devel] [PATCH v7 17/20] target/mips: Add emulation of MXU instructions Q8MUL and Q8MULSU Aleksandar Markovic
2018-10-25  8:09   ` Aleksandar Markovic
2018-10-24 12:18 ` [Qemu-devel] [PATCH v7 18/20] target/mips: Add emulation of MXU instructions S32LDD and S32LDDR Aleksandar Markovic
2018-10-25  8:08   ` Aleksandar Markovic
2018-10-24 12:18 ` [Qemu-devel] [PATCH v7 19/20] target/mips: Move MXU_EN check one level higher Aleksandar Markovic
2018-10-26  9:53   ` Stefan Markovic
2018-10-24 12:18 ` Aleksandar Markovic [this message]
2018-10-26  9:56   ` [Qemu-devel] [PATCH v7 20/20] target/mips: Amend MXU ASE overview note Stefan Markovic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1540383527-7923-21-git-send-email-aleksandar.markovic@rt-rk.com \
    --to=aleksandar.markovic@rt-rk.com \
    --cc=amarkovic@wavecomp.com \
    --cc=aurelien@aurel32.net \
    --cc=jancraig@amazon.com \
    --cc=pjovanovic@wavecomp.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=smarkovic@wavecomp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.