This is an archive of the discontinued LLVM Phabricator instance.

[XRay][AArch64] Implemented a test for the compile-time sleds emitted, and fixed a bug in the jump instruction
ClosedPublic

Authored by rSerge on Nov 17 2016, 10:11 AM.

Details

Summary

This patch adds a test for the assembly code emitted with XRay instrumentation. It also fixes a bug where the operand of a jump instruction must be not the number of bytes to jump over, but rather the number of 4-byte instructions.

Diff Detail

Repository
rL LLVM

Event Timeline

rSerge updated this revision to Diff 78381.Nov 17 2016, 10:11 AM
rSerge retitled this revision from to [XRay][AArch64] Implemented a test for the compile-time sleds emitted, and fixed a bug in the jump instruction.
rSerge updated this object.
rSerge added reviewers: dberris, rengolin.
rSerge added subscribers: iid_iunknown, llvm-commits.
dberris requested changes to this revision.Nov 17 2016, 4:14 PM
dberris edited edge metadata.
dberris added inline comments.
lib/Target/AArch64/AArch64AsmPrinter.cpp
228 ↗(On Diff #78381)

Why not just write out the actual number of instructions? i.e. why not just: .addImm(8) ?

test/CodeGen/AArch64/xray-attribute-instrumentation.ll
26 ↗(On Diff #78381)

You might want to make sure that the xray_instr_map section is written out and that you're seeing the references to the correct labels?

This revision now requires changes to proceed.Nov 17 2016, 4:14 PM
rSerge added inline comments.Nov 18 2016, 9:02 AM
lib/Target/AArch64/AArch64AsmPrinter.cpp
228 ↗(On Diff #78381)

Ok, changing. I just thought that it's more convenient to think in bytes and show that that number is shifted by 2.

test/CodeGen/AArch64/xray-attribute-instrumentation.ll
26 ↗(On Diff #78381)

Changing.

rSerge updated this revision to Diff 78540.Nov 18 2016, 9:05 AM
rSerge edited edge metadata.

Implemented the requests in code review comments.

dberris accepted this revision.Nov 18 2016, 4:17 PM
dberris edited edge metadata.
This revision is now accepted and ready to land.Nov 18 2016, 4:17 PM
rengolin accepted this revision.Nov 19 2016, 6:03 AM
rengolin edited edge metadata.
This revision was automatically updated to reflect the committed changes.