[PATCH] D110724: [MSP430] Add support for the `rpt` assembler directive

Jozef Lawrynowicz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 29 08:34:30 PDT 2021


jozefl created this revision.
jozefl added a reviewer: asl.
Herald added a subscriber: hiraditya.
jozefl requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The `rpt` directive is used to set the repetition count of MSP430X
extended instructions that have an extension word. This patch adds
support for using the `rpt` directive with RxxX shifts, so shift counts
of up to 16 can be performed using a single instruction.

The `rpt` directive must appear before the corresponding MSP430X
instruction, either on the same line, or the line before. For example:

  rpt #9 { rrux r12

and

  rpt #9
  rrux r12

are both supported.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D110724

Files:
  llvm/lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp
  llvm/lib/Target/MSP430/MCTargetDesc/MSP430InstPrinter.cpp
  llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCCodeEmitter.cpp
  llvm/lib/Target/MSP430/MSP430InstrFormats.td
  llvm/lib/Target/MSP430/MSP430InstrInfo.h
  llvm/lib/Target/MSP430/MSP430InstrInfoExtended.td
  llvm/test/MC/MSP430/shifts-430x-invalid.s
  llvm/test/MC/MSP430/shifts-430x.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110724.375904.patch
Type: text/x-patch
Size: 28757 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210929/e39bf229/attachment.bin>


More information about the llvm-commits mailing list