This is an archive of the discontinued LLVM Phabricator instance.

[AVR] Fix register numbers for in getGCCAddlRegNames()
AbandonedPublic

Authored by dylanmckay on Jan 4 2017, 9:49 PM.

Details

Reviewers
saaadhu
Summary

These do not match up with the register numbers defined in LLVM's
AVRRegisterInfo.td

Adding Senthil as a reviewer as he originally implemented this.

Event Timeline

dylanmckay updated this revision to Diff 83192.Jan 4 2017, 9:49 PM
dylanmckay retitled this revision from to [AVR] Fix register numbers for in getGCCAddlRegNames().
dylanmckay updated this object.
dylanmckay added a reviewer: saaadhu.
dylanmckay added a subscriber: cfe-commits.
saaadhu edited edge metadata.Jan 4 2017, 11:05 PM

If you've added X, Y, Z and SP to GCCRegNames, you don't need AddlRegNames array at all,

The reason I had them in AddlRegNames was to tell Clang that they alias regs in GCCRegNames. I followed X86TargetInfo's example - it has "ax" in GCCRegNames, and "al", "ah", "eax" and "rax" in AddlRegNames. I figured Clang could potentially use the fact that they alias when analyzing inline asm to detect unintended clobbers.

dylanmckay abandoned this revision.Feb 3 2017, 5:30 PM