[PATCH 0/7] kvx: Miscellaneous changes since last August

Paul Iannetta piannetta@kalrayinc.com
Fri Feb 16 16:42:14 GMT 2024


Hi,

Here is the stack of patches on our end since last August.

The detection of powers of two did not lead to wrong code but could result in
using up too many ressources for a correctly-dimensioned bundle.

The lexer/parser had been a bit lenient and ignored trailings tokens we made it
stricter in preparation to moving the .@ modifier directly on the operand it
modifies rather than on the opcode.  This would theoretically allow more than .@
per instruction.  This won't happen since the ISA and the assembler for our
KV3-1 and KV3-2 won't evolve any further after this patch series but we could
use so in our upcoming KV4-1.

Warning: If you have code with the .@ modifier, you should carefully check
that you are before or after the patches "Improve lexing & parsing" and "gas:
move the splat modifier to the immediate".  Without those patches, "addd $r0 =
$r1, 1234.@" is wrongly assembled into addd $r0 = $r1, 1234" because the
trailing .@ is silently ignored.

We renamed mnemonics containing or/xor to ior/eor to disambiguate the meaning of
the instructions, especially so, or coprocessor has all its mnemonic prefixed by
an "x". And telling apart which kind of "or" it was, was getting tedious.

The .@ modification and or renaming are changes to the syntax only and the
encoding is left unchanged.

Conditional moves were missing and .@ variant and aliases $r14r15.{lo,hi} were
missing as well, hence they were added.

I tested it on i386, 32 and 64-bits variant with targets kvx-{cos,linux} and
--enable-targets=all.

Ok, for master?
Unless an explicit Ok, or any remarks I'll intend to merge those by the end of
next week.

Regards,
Paul

Paul Iannetta (7):
  kvx: gas: fix the detection of negative powers of 2
  kvx: Improve lexing & parsing
  kvx: gas: fix leak
  kvx: gas: move the splat modifier to the immediate
  kvx: gas: rename: or -> ior, xor -> eor
  kvx: enable magic immediates for integer multiply-accumulate and CMOVE*
  kvx: gas: missing aliases for $r14r15 in assembler.

 gas/config/kvx-parse.c                 |    55 +-
 gas/config/kvx-parse.h                 | 17603 ++++----
 gas/config/tc-kvx.c                    |     1 +
 gas/testsuite/gas/kvx/kv3-1-insns-32.d |   210 +-
 gas/testsuite/gas/kvx/kv3-1-insns-32.s |   210 +-
 gas/testsuite/gas/kvx/kv3-1-insns-64.d |   210 +-
 gas/testsuite/gas/kvx/kv3-1-insns-64.s |   210 +-
 gas/testsuite/gas/kvx/kv3-2-insns-32.d |   252 +-
 gas/testsuite/gas/kvx/kv3-2-insns-32.s |   252 +-
 gas/testsuite/gas/kvx/kv3-2-insns-64.d |   252 +-
 gas/testsuite/gas/kvx/kv3-2-insns-64.s |   252 +-
 gas/testsuite/gas/kvx/kv4-1-insns-32.d |  2028 +-
 gas/testsuite/gas/kvx/kv4-1-insns-32.s |  1800 +-
 gas/testsuite/gas/kvx/kv4-1-insns-64.d |  2028 +-
 gas/testsuite/gas/kvx/kv4-1-insns-64.s |  1800 +-
 gas/testsuite/gas/kvx/np2-detection.d  |    14 +
 gas/testsuite/gas/kvx/np2-detection.s  |     5 +
 include/opcode/kvx.h                   |  3828 +-
 opcodes/kvx-opc.c                      | 52807 ++++++++++++-----------
 19 files changed, 44777 insertions(+), 39040 deletions(-)
 create mode 100644 gas/testsuite/gas/kvx/np2-detection.d
 create mode 100644 gas/testsuite/gas/kvx/np2-detection.s

-- 
2.35.1.500.gb896f729e2







More information about the Binutils mailing list