This is an archive of the discontinued LLVM Phabricator instance.

Regression in 4.0-rc: SPARC: allow %f-registers for inline-assembly
ClosedPublic

Authored by pboettch on Jan 24 2017, 11:35 PM.

Details

Summary

This reverts the reverts done in svn 278511. It was
part of 3.9-release (where it worked for me)
and does not exist anymore in 4.0-rc.

Unfortunately there is no explanation given in the
commit as to why it was removed.

A accompanying change for clang will be provided.

Diff Detail

Repository
rL LLVM

Event Timeline

pboettch created this revision.Jan 24 2017, 11:35 PM
pboettch edited the summary of this revision. (Show Details)
pboettch updated this revision to Diff 85704.Jan 25 2017, 12:22 AM

Added test-code in inlineasm.ll

jyknight edited edge metadata.Jan 25 2017, 4:52 PM

Is it desirable for the supported register constraints to have the same meaning as in GCC, and this is not: GCC defines 'f' as the lower fp regs, and 'e' as all of the fp regs. (Those are only actually different for sparcv9, of course.)

Also, you'll need to the inlineasm docs in the LangRef to add the new constraint.

OK, I will update my changes in regards to your comment, but it'll take some time.

Have it been these missing things which made you reverting the %f changes for 4.0 made by Chris? For me this fixes a regression, because in 3.9 it worked. (but broke sparcv9?)

The more I think about it, the less I know how to implement it correctly. I'll try nevertheless.

Have it been these missing things which made you reverting the %f changes for 4.0 made by Chris? For me this fixes a regression, because in 3.9 it worked. (but broke sparcv9?)

The %f bit was an unrelated change that was committed along with a bunch of other unrelated stuff, and should not have been.

pboettch updated this revision to Diff 89512.EditedFeb 23 2017, 8:18 AM

I added a LangRef.rst regarding inline asm usage of %f for Sparc(V8).

For the code-part, I actually don't know what to do. I'm using a LEON which is a SparcV8 and it does not seem to have %e registers.

I'm willing to change things to get the part I can use and test integrated, but I'd need some more help.

This revision was automatically updated to reflect the committed changes.

I've fixed up the patch and applied it, thanks!