Page MenuHomePhabricator

[RISCV] Support z and i operand modifiers
ClosedPublic

Authored by jrtc27 on Feb 5 2019, 2:58 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

jrtc27 created this revision.Feb 5 2019, 2:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 5 2019, 2:58 PM
asb added a comment.Jun 18 2019, 9:46 PM

Is there documentation on the operand modifiers supported by RISC-V binutils anywhere? I'm struggling to find anything...

In D57792#1549669, @asb wrote:

Is there documentation on the operand modifiers supported by RISC-V binutils anywhere? I'm struggling to find anything...

This is GCC not binutils, and I can't find them documented anywhere other than the source itself: https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/config/riscv/riscv.c?view=markup&revision=271293#l3181

asb accepted this revision.EditedJun 18 2019, 10:24 PM
In D57792#1549669, @asb wrote:

Is there documentation on the operand modifiers supported by RISC-V binutils anywhere? I'm struggling to find anything...

This is GCC not binutils, and I can't find them documented anywhere other than the source itself: https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/config/riscv/riscv.c?view=markup&revision=271293#l3181

Sorry, I meant GCC.

Thanks, this patch looks good to me. Tiny nit: LLVM coding guidelines prefer full sentences for comments, so the comments added to RISCVAsmPrinter.cpp should end in a full stop.

EDIT: You'll want to add nounwind attributes to the functions in your test too.

This revision is now accepted and ready to land.Jun 18 2019, 10:24 PM
In D57792#1549678, @asb wrote:
In D57792#1549669, @asb wrote:

Is there documentation on the operand modifiers supported by RISC-V binutils anywhere? I'm struggling to find anything...

This is GCC not binutils, and I can't find them documented anywhere other than the source itself: https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/config/riscv/riscv.c?view=markup&revision=271293#l3181

Sorry, I meant GCC.

Thanks, this patch looks good to me. Tiny nit: LLVM coding guidelines prefer full sentences for comments, so the comments added to RISCVAsmPrinter.cpp should end in a full stop.

Blame the Mips backend for leading me astray for this function...

EDIT: You'll want to add nounwind attributes to the functions in your test too.

Yes, just went to check that between your initial commenting and edit.

jrtc27 updated this revision to Diff 207328.Jul 1 2019, 8:26 AM

Added nounwind to tests. Added full stops to comments.

jrtc27 updated this revision to Diff 207789.Jul 3 2019, 7:28 AM

Rebased

This revision was automatically updated to reflect the committed changes.