This is an archive of the discontinued LLVM Phabricator instance.

[VE] Support branch instructions in MC layer
ClosedPublic

Authored by kaz7 on Jun 4 2020, 8:06 PM.

Details

Summary

Add regression tests of asmparser, mccodeemitter, and disassembler for
branch instructions. In order to support them, we enhance asmparser
by adding splitting mnemonic mechanism, e.g. "bgt.l.t" into "b", "gt",
and ".l.t", and parsing mechanism for AS style memory addressing.
We also implment encoding and decoding mechanism for branch instructions.

Depends on D81207.

Diff Detail

Event Timeline

kaz7 created this revision.Jun 4 2020, 8:06 PM
simoll added a comment.Jun 5 2020, 1:39 AM

Looks good save some nits.

llvm/lib/Target/VE/AsmParser/VEAsmParser.cpp
840

typo

llvm/lib/Target/VE/VE.h
51–67

The only real change here is the addition of UNKNOWN? I guess we should undo the unrelated indentation change for the other enum entries here.

257

Return after unreachable?

llvm/lib/Target/VE/VEInstrInfo.cpp
93

return after unreachable

kaz7 marked 3 inline comments as done.Jun 5 2020, 2:22 AM

Thank you for your time. Reply to comments.

llvm/lib/Target/VE/VE.h
51–67

Yes. I guess indentation was modified by clang-format, but I can re-check it.

257

Yes. This llvm_unreachable doesn't halt release mode llvm. I had a crash problem here once, so I added this return for the case.

llvm/lib/Target/VE/VEInstrInfo.cpp
93

Yes. Similar to above comment. Maybe it is safe to remove return this time, though.

kaz7 planned changes to this revision.Jun 5 2020, 2:28 AM
kaz7 marked an inline comment as done.
kaz7 added inline comments.
llvm/lib/Target/VE/VEInstrInfo.cpp
93

Well, it must be safe now (at the time to upstreaming). I'll remove them. Thanks!

kaz7 updated this revision to Diff 268769.Jun 5 2020, 6:27 AM
kaz7 marked an inline comment as done.

Updated following suggestions.
All of thos indentations are caused by clang-format.

simoll accepted this revision.Jun 5 2020, 6:42 AM
This revision is now accepted and ready to land.Jun 5 2020, 6:42 AM
This revision was automatically updated to reflect the committed changes.