public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Carlotti <andrew.carlotti@arm.com>
To: Saurabh Jha <saujha01@e130340.arm.com>
Cc: binutils@sourceware.org, richard.earnshaw@arm.com
Subject: Re: [PATCH v6 1/4] gas, aarch64: Add AdvSIMD lut extension
Date: Thu, 23 May 2024 17:08:39 +0100	[thread overview]
Message-ID: <29919e65-81cb-bb3c-84f0-9a3f6c1d5108@e124511.cambridge.arm.com> (raw)
In-Reply-To: <20240523135020.2492458-1-saujha01@e130340.arm.com>

On Thu, May 23, 2024 at 02:50:16PM +0100, Saurabh Jha wrote:
> 
> Introduces instructions for the Advanced SIMD lut extension for AArch64. They are documented in the following links:
> * luti2: https://developer.arm.com/documentation/ddi0602/2024-03/SIMD-FP-Instructions/LUTI2--Lookup-table-read-with-2-bit-indices-?lang=en
> * luti4: https://developer.arm.com/documentation/ddi0602/2024-03/SIMD-FP-Instructions/LUTI4--Lookup-table-read-with-4-bit-indices-?lang=en
> 
> These instructions needed definition of some new operands. We will first
> discuss operands for the third operand of the instructions and then
> discuss a vector register list operand needed for the second operand.
> 
> The third operands are vectors with bit indices and without type
> qualifiers. They are called Em_INDEX1_14, Em_INDEX2_13, and Em_INDEX3_12
> and they have 1 bit, 2 bit, and 3 bit indices respectively. For these
> new operands, we defined new parsing case branch and a new instruction
> class. The lsb and width of these operands are the same as many existing
> but the convention is to give different names to fields that serve
> different purpose so we introduced new fields in aarch64-opc.c and
> aarch64-opc.h for these new operands.
> 
> For the second operand of these instructions, we introduced a new
> operand called LVn_LUT. This represents a vector register list with
> stride 1. We defined new inserter and extractor for this new operand and
> it is encoded in FLD_Rn. We are enforcing the number of registers in the
> reglist using opcode flag rather than operand flag as this is what other
> SIMD vector register list operands are doing. The disassembly also uses
> opcode flag to print the correct number of registers.
> ---
> Hi,
> 
> Regression tested for aarch64-none-elf and found no regressions.
> 
> Ok for binutils-master? I don't have commit access so can someone please commit on my behalf?
> 
> Regards,
> Saurabh
...
> diff --git a/opcodes/aarch64-asm.c b/opcodes/aarch64-asm.c
> index 5a55ca2f86d..338ed54165d 100644
> --- a/opcodes/aarch64-asm.c
> +++ b/opcodes/aarch64-asm.c
> @@ -168,6 +168,27 @@ aarch64_ins_reglane (const aarch64_operand *self, const aarch64_opnd_info *info,
>        assert (reglane_index < 4);
>        insert_field (FLD_SM3_imm2, code, reglane_index, 0);
>      }
> +  else if (inst->opcode->iclass == lut)
> +    {
> +      unsigned reglane_index = info->reglane.index;
> +      switch (info->type)
> +	{
> +	case AARCH64_OPND_Em_INDEX1_14:
> +	  assert (reglane_index < 2);
> +	  insert_field (FLD_imm1_14, code, reglane_index, 0);
> +	  break;
> +	case AARCH64_OPND_Em_INDEX2_13:
> +	  assert (reglane_index < 4);
> +	  insert_field (FLD_imm2_13, code, reglane_index, 0);
> +	  break;
> +	case AARCH64_OPND_Em_INDEX3_12:
> +	  assert (reglane_index < 8);
> +	  insert_field (FLD_imm3_12, code, reglane_index, 0);
> +	  break;
> +	default:
> +	  return false;
> +	}
> +    }
>    else
>      {
>        /* index for e.g. SQDMLAL <Va><d>, <Vb><n>, <Vm>.<Ts>[<index>]

This hunk should be dropped now that these operands use the simple_index inserter/extractor.


      parent reply	other threads:[~2024-05-23 16:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-23 13:50 Saurabh Jha
2024-05-23 13:50 ` [PATCH v6 2/4] gas, aarch64: Add AdvSIMD lut extension generated files Saurabh Jha
2024-05-23 13:50 ` [PATCH v6 3/4] gas, aarch64: Add SVE2 lut extension Saurabh Jha
2024-05-23 16:34   ` Andrew Carlotti
2024-05-28 14:57     ` Saurabh Jha
2024-05-23 13:50 ` [PATCH v6 4/4] gas, aarch64: Add SVE2 lut extension generated files Saurabh Jha
2024-05-23 15:15 ` [PATCH v6 1/4] gas, aarch64: Add AdvSIMD lut extension Richard Earnshaw (lists)
2024-05-28 14:59   ` Saurabh Jha
2024-05-23 16:08 ` Andrew Carlotti [this message]

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=29919e65-81cb-bb3c-84f0-9a3f6c1d5108@e124511.cambridge.arm.com \
    --to=andrew.carlotti@arm.com \
    --cc=binutils@sourceware.org \
    --cc=richard.earnshaw@arm.com \
    --cc=saujha01@e130340.arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).