This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ] Add some missing instruction classes and instructions
ClosedPublic

Authored by zhanjunl on Aug 4 2016, 2:45 PM.

Details

Summary

Add instruction formats E, RSI, SSd, SSE, and SSF.

Added BRXH, BRXLE, PR, MVCK, STRAG, and ECTG instructions to test out
those formats.

Diff Detail

Event Timeline

zhanjunl retitled this revision from to [SystemZ] Add some missing instruction classes and instructions..
zhanjunl updated this object.
zhanjunl added a reviewer: uweigand.
zhanjunl added a subscriber: llvm-commits.
uweigand accepted this revision.Aug 5 2016, 3:59 AM
uweigand edited edge metadata.

Looks basically good to me. Some of the instructions don't have the appropriate flags set -- see inline comments. This is important even for instructions not used for codegen, since those flags can be queried via the disassembler interface (e.g. LLDB uses this to detect branches). Patch OK with those changes.

lib/Target/SystemZ/SystemZInstrInfo.td
341

These should have the isBranch and isTerminator flags set. Maybe we should have a BranchBinaryRSI helper similar to BranchUnaryRI ...

1687

PR actually changes a lot of registers and has other side effects. It probably doesn't matter too much since this instruction isn't usable on Linux anyway, but at least we should have the hasSideEffects flag.

1691

Should have the mayLoad and mayStore flags.

1695

Should have the mayStore flag.

1700

Should have the mayLoad flag.

This revision is now accepted and ready to land.Aug 5 2016, 3:59 AM
zhanjunl edited edge metadata.

Thanks for the review Ulrich, I'll try to remember to set the right flags next time.

zhanjunl marked an inline comment as done.

Uploaded wrong diff...

zhanjunl marked 4 inline comments as done.Aug 5 2016, 7:28 AM

LGTM, thanks.

zhanjunl retitled this revision from [SystemZ] Add some missing instruction classes and instructions. to [SystemZ] Add some missing instruction classes and instructions.
zhanjunl updated this object.

Added a comment to describe BranchBinary.

This revision was automatically updated to reflect the committed changes.