[PATCH] D64810: [ARM] Add <saturate> operand to SQRSHRL and UQRSHLL

Mikhail Maltsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 16 10:53:14 PDT 2019


miyuki created this revision.
miyuki added reviewers: ostannard, simon_tatham, t.p.northover, samparker, dmgreen, SjoerdMeijer.
Herald added subscribers: hiraditya, kristof.beyls, javed.absar.
Herald added a project: LLVM.

According to the new Armv8-M specification
https://static.docs.arm.com/ddi0553/bh/DDI0553B_h_armv8m_arm.pdf the
instructions SQRSHRL and UQRSHLL now have an additional immediate
operand <saturate>. The new assembly syntax is:

SQRSHRL<c> RdaLo, RdaHi, #<saturate>, Rm
UQRSHLL<c> RdaLo, RdaHi, #<saturate>, Rm

where <saturate> can be either 64 (the existing behavior) or 48, in
that case the result is saturated to 48 bits.

The new operand is encoded as follows:

  #64 Encoded as sat = 0
  #48 Encoded as sat = 1

sat is bit 7 of the instruction bit pattern.

This patch adds a new assembler operand class MveSaturateOperand which
implements parsing and encoding. Decoding is implemented in
DecodeMVEOverlappingLongShift.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D64810

Files:
  llvm/lib/Target/ARM/ARMInstrFormats.td
  llvm/lib/Target/ARM/ARMInstrMVE.td
  llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
  llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
  llvm/lib/Target/ARM/MCTargetDesc/ARMInstPrinter.cpp
  llvm/lib/Target/ARM/MCTargetDesc/ARMInstPrinter.h
  llvm/test/MC/ARM/mve-scalar-shift.s
  llvm/test/MC/Disassembler/ARM/mve-scalar-shift.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64810.210132.patch
Type: text/x-patch
Size: 8889 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190716/6e573e67/attachment.bin>


More information about the llvm-commits mailing list