This is an archive of the discontinued LLVM Phabricator instance.

[MSP430] Add assembler and MC support for MSP430X shift instructions
Needs ReviewPublic

Authored by jozefl on Sep 29 2021, 8:22 AM.

Details

Reviewers
asl
Summary

There are two forms of MSP430X extended shift instructions:

  • "RxxM": RRAM, RRUM, RLAM, RRCM e.g. rram #3, r12
  • "RxxX": RRAX, RRUX, RLAX, RRCX e.g. rrax r12

RxxM shifts can only shift by up to 4 bit positions, but are cheaper
than RxxX shifts.

RxxX shifts do not specify the shift count in the instruction. The shift
count is set separately by setting the repetition count in the extension
word that precedes the instruction. This support will be added in a
separate patch.

Diff Detail

Event Timeline

jozefl created this revision.Sep 29 2021, 8:22 AM
jozefl requested review of this revision.Sep 29 2021, 8:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 29 2021, 8:22 AM
jozefl edited the summary of this revision. (Show Details)Sep 29 2021, 8:30 AM
asl added inline comments.Sep 29 2021, 8:49 AM
llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp
98

Do we need these changes here?

llvm/lib/Target/MSP430/MSP430ISelLowering.cpp
46

Ditto

llvm/lib/Target/MSP430/MSP430ISelLowering.h
74

Ditto

jozefl added inline comments.Sep 29 2021, 9:07 AM
llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp
98

Yes, we need access to Subtarget so that the HasMSP430X predicate in MSP430InstrInfoExtended.td can check Subtarget->hasMSP430X() before enabling all the MSP430X instructions.

jozefl updated this revision to Diff 379048.Oct 12 2021, 8:19 AM
jozefl marked 3 inline comments as done.

Rebase onto new base revision to fix pre-merge tests.

Ping.

Thanks,
Jozef

Ping.

Thanks,
Jozef

Ping.

Thanks,
Jozef