This is an archive of the discontinued LLVM Phabricator instance.

[mips] Add CCValAssign::[ASZ]ExtUpper and CCPromoteToUpperBitsInType and handle struct's correctly on big-endian N32/N64 return values.
ClosedPublic

Authored by dsanders on Sep 10 2014, 3:12 AM.

Details

Summary

The N32/N64 ABI's require that structs passed in registers are laid out
such that spilling the register with 'sd' places the struct at the lowest
address. For little endian this is trivial but for big-endian it requires
that structs are shifted into the upper bits of the register.

We also require that structs passed in registers have the 'inreg'
attribute for big-endian N32/N64 to work correctly. This is because the
tablegen-erated calling convention implementation only has access to the
lowered form of struct arguments (one or more integers of up to 64-bits
each) and is unable to determine the original type.

Diff Detail

Event Timeline

dsanders updated this revision to Diff 13524.Sep 10 2014, 3:12 AM
dsanders retitled this revision from to [mips] Add CCValAssign::[ASZ]ExtUpper and CCPromoteToUpperBitsInType and handle struct's correctly on big-endian N32/N64 return values..
dsanders updated this object.
dsanders edited the test plan for this revision. (Show Details)
dsanders added a reviewer: vmedic.
dsanders added a subscriber: Unknown Object (MLST).
vmedic accepted this revision.Sep 25 2014, 2:55 AM
vmedic edited edge metadata.

LGTM

This revision is now accepted and ready to land.Sep 25 2014, 2:55 AM
dsanders closed this revision.Sep 25 2014, 5:24 AM