This is an archive of the discontinued LLVM Phabricator instance.

Fix justify error for small structures bigger than 32 bits in fixed arguments for MIPS64 big endian
ClosedPublic

Authored by abeserminji on Mar 9 2015, 9:48 AM.

Details

Summary

There was a problem when passing small structures as fixed arguments. The structures that are bigger than 32 bits, but smaller than 64 bits were not left justified properly on MIPS64 big endian. This is fixed by shifting the value to make it left justified when appropriate.

Diff Detail

Repository
rL LLVM

Event Timeline

abeserminji updated this revision to Diff 21494.Mar 9 2015, 9:48 AM
abeserminji retitled this revision from to Fix justify error for small structures bigger than 32 bits in fixed arguments for MIPS64 big endian.
abeserminji updated this object.
abeserminji edited the test plan for this revision. (Show Details)
abeserminji added reviewers: dsanders, petarj.
abeserminji set the repository for this revision to rL LLVM.
abeserminji added a subscriber: Unknown Object (MLST).
dsanders edited edge metadata.Mar 9 2015, 10:27 AM

Thanks. Just a couple things on the test case. At the moment, you're fixing both N32 and N64 but you only test N64. Similarly, we should also test that little endian does the right thing in both cases.

test/CodeGen/Mips/cconv/arguments-small-structures-bigger-than-32bits.ll
1

Nit: There's normally only one dash on -march=...

1

Could you add RUN lines for the little endian N64 case as well as the big/little-endian N32 cases?

abeserminji edited edge metadata.

Added new tests for N32 EL/EB and N64 EL

dsanders accepted this revision.Mar 11 2015, 3:57 AM
dsanders edited edge metadata.

LGTM

This revision is now accepted and ready to land.Mar 11 2015, 3:57 AM
This revision was automatically updated to reflect the committed changes.