This is an archive of the discontinued LLVM Phabricator instance.

Add saving and restoring of r30 to the prologue and epilogue, respectively
ClosedPublic

Authored by jhibbits on Jan 7 2015, 10:21 PM.

Details

Summary

The PIC additions didn't update the prologue and epilogue code to save and restore r30 (PIC base register). This does that.

Diff Detail

Repository
rL LLVM

Event Timeline

jhibbits updated this revision to Diff 17884.Jan 7 2015, 10:21 PM
jhibbits retitled this revision from to Add saving and restoring of r30 to the prologue and epilogue, respectively.
jhibbits updated this object.
jhibbits edited the test plan for this revision. (Show Details)
jhibbits added a reviewer: hfinkel.
jhibbits set the repository for this revision to rL LLVM.
jhibbits added a subscriber: Unknown Object (MLST).
hfinkel accepted this revision.Jan 7 2015, 10:28 PM
hfinkel edited edge metadata.

LGTM.

lib/Target/PowerPC/PPCFrameLowering.cpp
647 ↗(On Diff #17884)

This line is too long.

1013 ↗(On Diff #17884)

Same here.

This revision is now accepted and ready to land.Jan 7 2015, 10:28 PM
hfinkel added inline comments.Jan 7 2015, 10:32 PM
test/CodeGen/PowerPC/ppc32-pic.ll
18 ↗(On Diff #17884)

Also, you should probably make this line

; SMALL-BSS-DAG:         lwz {{[0-9]+}}, 0([[VREG]])
; SMALL-BSS-DAG:         lwz 30, -8(1)

because post-ra scheduling could legally interchange them.

jhibbits updated this revision to Diff 17896.Jan 8 2015, 7:06 AM
jhibbits edited edge metadata.

Address Hal's comments

This revision was automatically updated to reflect the committed changes.