This is an archive of the discontinued LLVM Phabricator instance.

[SPARC] Cleanup handling of the Y/ASR registers.
ClosedPublic

Authored by jyknight on Jun 11 2015, 2:00 PM.

Details

Summary
  • Implement copying ASR to/from GPR regs.
  • Mark ASRs as non-allocatable, so it won't try to arbitrarily use them inappropriately.
  • Instead of inserting explicit WRASR/RDASR nodes in the MUL/DIV routines, just do normal register copies.
  • Also...mark div as using Y, not just writing it.

Added a test case with some code which previously died with an
assertion failure (with -O0), or produced wrong code (otherwise).

(Third time's the charm?)

Diff Detail

Event Timeline

jyknight updated this revision to Diff 27542.Jun 11 2015, 2:00 PM
jyknight retitled this revision from to [SPARC] Cleanup handling of the Y/ASR registers..
jyknight updated this object.
jyknight edited the test plan for this revision. (Show Details)
jyknight added a reviewer: echristo.
jyknight added a subscriber: Unknown Object (MLST).

Ping.

...And sorry for the long-lines...apparently I forgot to clang-format this before sending for review, oops! I'll fix that.

jyknight updated this revision to Diff 29097.Jul 6 2015, 9:25 AM

Fixed formatting.

echristo accepted this revision.Jul 7 2015, 11:24 AM
echristo edited edge metadata.

LGTM.

-eric

This revision is now accepted and ready to land.Jul 7 2015, 11:24 AM
This revision was automatically updated to reflect the committed changes.