This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Restrict valid indices for cm.jalt to be in [32,255].
ClosedPublic

Authored by craig.topper on May 4 2023, 1:45 PM.

Diff Detail

Event Timeline

craig.topper created this revision.May 4 2023, 1:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2023, 1:45 PM
craig.topper requested review of this revision.May 4 2023, 1:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2023, 1:45 PM
jrtc27 accepted this revision.May 4 2023, 1:49 PM

Dumb question: how's the disassembler disambiguating here? By chance due to cm.jt coming first and matching only when the upper bits are 0 (i.e. fragilely)?

This revision is now accepted and ready to land.May 4 2023, 1:49 PM

Dumb question: how's the disassembler disambiguating here? By chance due to cm.jt coming first and matching only when the upper bits are 0 (i.e. fragilely)?

Yes, but I don't think its fragile. The disassembler generator prioritizes the more exact match for 12-10 being 0 from the cm.jt definition.

jrtc27 added a comment.May 4 2023, 2:17 PM

Dumb question: how's the disassembler disambiguating here? By chance due to cm.jt coming first and matching only when the upper bits are 0 (i.e. fragilely)?

Yes, but I don't think its fragile. The disassembler generator prioritizes the more exact match for 12-10 being 0 from the cm.jt definition.

Ok, if it's done that way rather than order I guess it's fine