This is an archive of the discontinued LLVM Phabricator instance.

[Sparc] Add .uahalf and .uaword directives
ClosedPublic

Authored by dcederman on May 24 2018, 5:31 AM.

Details

Summary

Adding these makes it easier to assemble the output from GCC which generates a lot of .uahalf and .uaword directives.

GAS treats .uahalf and .half the same unless the --enforce-aligned-data flag is used. I could not find a similar flag for LLVM so it seems that .half does not have any alignment requirement and is treated the same as .uahalf should be. If that would change later on then the tests in sparc-directives.s would fail due to bad alignment.

Diff Detail

Repository
rL LLVM

Event Timeline

dcederman created this revision.May 24 2018, 5:31 AM
jyknight accepted this revision.May 24 2018, 8:58 AM

Oddly, the oracle reference manual says that only .half has an alignment requirement (in that it _fails_ if the current position is odd). The docs for .word explicitly say it doesn't have an alignment requirement. *boggle*. Seems useless to actually implement such a requirement, just adding aliases seems fine.

This revision is now accepted and ready to land.May 24 2018, 8:58 AM
This revision was automatically updated to reflect the committed changes.