This is an archive of the discontinued LLVM Phabricator instance.

[mips] Fix va_arg() for pointer types on big-endian N32.
ClosedPublic

Authored by dsanders on Dec 30 2014, 11:30 AM.

Details

Summary

The Mips ABI's treat pointers in the same way as integers. They are
sign-extended to 32-bit for O32, and 64-bit for N32/N64. This doesn't matter
for O32 and N64 where pointers are already the correct width but it does matter
for big-endian N32, where pointers are 32-bit and need promoting.

The caller side is already passing pointers correctly. This patch corrects the
callee.

Diff Detail

Event Timeline

dsanders updated this revision to Diff 17726.Dec 30 2014, 11:30 AM
dsanders retitled this revision from to [mips] Fix va_arg() for pointer types on big-endian N32..
dsanders updated this object.
dsanders edited the test plan for this revision. (Show Details)
dsanders added reviewers: atanasyan, vmedic.
dsanders added a subscriber: Unknown Object (MLST).
atanasyan accepted this revision.Jan 9 2015, 7:59 AM
atanasyan edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jan 9 2015, 7:59 AM
dsanders closed this revision.Jan 13 2015, 2:48 AM

Committed to trunk in r225782. I'll give the buildbots some time to settle and let the 3.5.1 release finish before merging to release_35. The trunk generates slightly different (but equivalent) IR so I had to update the tests accordingly.