This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Accept .w suffixes for some memory instructions
ClosedPublic

Authored by JiruiWu on Jan 31 2023, 6:39 AM.

Details

Summary

Some memory instructions in the following sections of Armv7-M ARM allow
the .w mnemonic suffix, even though the preferred disassembly is without
the suffix.

A7.7.46 LDRB (immediate) T3
A7.7.55 LDRH (immediate) T3
A7.7.59 LDRSB (immediate) T2
A7.7.63 LDRSH (immediate) T2
A7.7.163 STRB (immediate) T3
A7.7.170 STRH (immediate) T3

This patch accepts the .w suffixes for theses instructions.
Pseudo-instructions and custom parsing logic are used instead of simple
aliases. More discussions are in these relevant patches:
https://reviews.llvm.org/D68916
https://reviews.llvm.org/D96632

Diff Detail

Event Timeline

JiruiWu created this revision.Jan 31 2023, 6:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 31 2023, 6:39 AM
JiruiWu requested review of this revision.Jan 31 2023, 6:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 31 2023, 6:39 AM

There are a number of closely related instructions which have the same problem, would it make sense to do them at the same time?

  • LDRSB
  • LDRH
  • LDRSH
  • STRH
JiruiWu updated this revision to Diff 499830.Feb 23 2023, 6:26 AM

Addressed review comments. Added code for LDRSB, LDRH, LDRSH and STRH.

This revision is now accepted and ready to land.Feb 24 2023, 12:57 AM
JiruiWu updated this revision to Diff 500114.Feb 24 2023, 1:51 AM
JiruiWu retitled this revision from [ARM] Accept .w suffixes for ldrb/strb (immediate) T3 to [ARM] Accept .w suffixes for some memory instructions.
JiruiWu edited the summary of this revision. (Show Details)

Updated commit messages.

This revision was landed with ongoing or failed builds.Feb 24 2023, 1:59 AM
This revision was automatically updated to reflect the committed changes.