This is an archive of the discontinued LLVM Phabricator instance.

[SPARC][IAS] Add support for the full set of CAS instructions
ClosedPublic

Authored by koakuma on Aug 6 2023, 7:16 AM.

Details

Summary

This completes the support for the CAS instructions.
Besides the base CASA and CASXA forms, on v9 the aliases CAS, CASX, CASL, and CASXL are also available.

Depends on D157233

Diff Detail

Event Timeline

koakuma created this revision.Aug 6 2023, 7:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 6 2023, 7:16 AM
koakuma requested review of this revision.Aug 6 2023, 7:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 6 2023, 7:16 AM

Missing disassembler tests.

llvm/lib/Target/Sparc/SparcInstrInfo.td
55
59

HasCASA?

koakuma updated this revision to Diff 548215.Aug 8 2023, 7:27 AM

Apply suggestions & fix disassembly issues.

barannikov88 added inline comments.Aug 8 2023, 10:21 AM
llvm/lib/Target/Sparc/SparcInstrInfo.td
59

This should also derive from AssemblerPredicate so it can be used in assembly parser.

llvm/test/MC/Sparc/sparcv9-atomic-instructions.s
1

There should be RUN and CHECK lines for V8 and probably V8 leon.

koakuma updated this revision to Diff 549697.Aug 13 2023, 6:11 AM

Apply suggestions, centralize CAS tests & add three-way V8/V9/LEON tests.

This revision is now accepted and ready to land.Aug 15 2023, 6:05 AM
koakuma updated this revision to Diff 555548.Sep 1 2023, 7:48 PM

Refer to ASR3 directly rather than using its "ASI" alias in instruction definitions (to prevent further changes in D157231 from breaking compilation).

This revision was landed with ongoing or failed builds.Sep 5 2023, 1:52 AM
This revision was automatically updated to reflect the committed changes.