This is an archive of the discontinued LLVM Phabricator instance.

[Xtensa 5/10] Add Xtensa MCTargetDescr initial functionality.
ClosedPublic

Authored by andreisfr on Jul 16 2019, 3:22 PM.

Diff Detail

Event Timeline

andreisfr created this revision.Jul 16 2019, 3:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 16 2019, 3:22 PM
andreisfr updated this revision to Diff 212685.Jul 31 2019, 3:53 PM

Register names are capitalized.

andreisfr updated this revision to Diff 242212.Feb 3 2020, 3:16 PM

Patch is updated according to latest upstream version. Updated licenses, added CFI encoding for Xtensa target

andreisfr updated this revision to Diff 328697.EditedMar 5 2021, 4:45 PM

Patch is updated according to LLVM upstream version and latest Xtensa backend version.

craig.topper added inline comments.
llvm/lib/Target/Xtensa/MCTargetDesc/XtensaAsmBackend.cpp
91

This should maybe be a report_fatal_error? llvm_unreachable will be optimized out of release builds so if this is something a user can trigger the fatal error would be better.

llvm/lib/Target/Xtensa/MCTargetDesc/XtensaMCCodeEmitter.cpp
16

I think this typically comes after the includes

87

maybe fatal_error?

andreisfr updated this revision to Diff 335953.Apr 7 2021, 4:50 PM

Correct instruction descriptions, format descriptions and instruction operands according to common style for *.td files. The llvm_unreachable is substituted to report_fatal_error.

andreisfr added inline comments.Apr 7 2021, 4:52 PM
llvm/lib/Target/Xtensa/MCTargetDesc/XtensaAsmBackend.cpp
91

I substituted llvm_unreachable to report_fatal_error everywhere, in other patches also

llvm/lib/Target/Xtensa/MCTargetDesc/XtensaMCCodeEmitter.cpp
16

Corrected

87

Corrected

Patch is updated according to LLVM upstream version.

bero added a subscriber: bero.Apr 14 2022, 2:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 14 2022, 2:00 PM
andreisfr updated this revision to Diff 425065.Apr 25 2022, 5:15 PM

Patch is updated according to LLVM upstream version

saugustine requested changes to this revision.Aug 19 2022, 4:32 PM
saugustine added a subscriber: saugustine.

As this is primarily boilerplate, mostly looks good. Just one minor fix.

llvm/lib/Target/Xtensa/MCTargetDesc/XtensaAsmBackend.cpp
106

I would use the nop.n encoding here (0xF03D). Then on density machines, the only situation with an invalid instruction is the single-byte case. Although bonus points for a little bit of math to make every case but the single-byte case work--that would be best.

This revision now requires changes to proceed.Aug 19 2022, 4:32 PM
andreisfr updated this revision to Diff 455442.Aug 24 2022, 5:58 PM

Minor changes, corrected NOP data in XtensaMCAsmBackend::writeNopData function

andreisfr marked an inline comment as done.Aug 24 2022, 6:18 PM
andreisfr added inline comments.
llvm/lib/Target/Xtensa/MCTargetDesc/XtensaAsmBackend.cpp
106

Corrected

saugustine accepted this revision.Aug 29 2022, 6:11 PM
This revision is now accepted and ready to land.Aug 29 2022, 6:11 PM
phosek added a subscriber: phosek.Sep 1 2022, 11:43 AM
andreisfr updated this revision to Diff 461113.Sep 18 2022, 6:19 PM
andreisfr marked an inline comment as done.

Updated according to latest changes in upstream source code

Hi everyone. Since this has been accepted for some time now, we're planning to commit this on Monday (December 16th). Please let us know if there is anything else we should address.

andreisfr updated this revision to Diff 484119.Dec 19 2022, 3:40 PM

Updated according to latest changes in upstream source code

barannikov88 accepted this revision.Dec 20 2022, 2:16 AM
andreisfr updated this revision to Diff 485250.Dec 25 2022, 4:30 PM

Added fixes according to comments

This revision was landed with ongoing or failed builds.Dec 26 2022, 4:39 AM
This revision was automatically updated to reflect the committed changes.