This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Predictably disassemble system registers with the same encoding
ClosedPublic

Authored by chill on Feb 5 2020, 10:14 AM.

Details

Summary

The registers TRCEXTINSELR and TRCEXTINSELR0 are distinct registers, defined by
separate extension specifications (ETM and ETE, respectively), yet they use the
same encoding in MSR/MRS.

When performing a system register lookup by encoding, we would essentially
return a random one, depending on the number, relative position in the TableGen
file, whether the TableGen records for system registers are named or not, and,
if they are named, depending on record (not register!) name as well.

This patch works around the issue by explictly checking for the
TRCEXTINSELR/TRCEXTINSELR0 encoding and always returning TRCEXTINSELR.

Diff Detail

Event Timeline

chill created this revision.Feb 5 2020, 10:14 AM
This revision is now accepted and ready to land.Feb 6 2020, 2:59 AM
This revision was automatically updated to reflect the committed changes.