This is an archive of the discontinued LLVM Phabricator instance.

[XCore][Test] inline asm memory constraint not supported.
Changes PlannedPublic

Authored by nigelp-xmos on Mar 23 2021, 2:08 AM.

Details

Summary

XCore inline assembly only supports indirect memory constraints, for globals addressed relative to DP (data pointer) or CP (constant pointer) registers. It does not handle non-indirect memory constraints, or non-global memory operands.

Diff Detail

Event Timeline

nigelp-xmos requested review of this revision.Mar 23 2021, 2:08 AM
nigelp-xmos created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2021, 2:08 AM
nigelp-xmos edited the summary of this revision. (Show Details)Apr 19 2021, 12:40 PM

Invite inline assembly code owner to review.

You should error rather than xfail if you can.

Thanks!

-eric

@echristo Thanks for the comment, Eric. I'm happy to do what is expected. Do you mean that it's a bug not to accept these cases, and we should fix it rather than XFAIL? So the build should not be green from XFAIL but only from a fix in this case?

nigelp-xmos planned changes to this revision.EditedApr 28 2021, 1:01 AM

I'm looking at extending XCore inline asm, or at least understanding why it's a problem to handle these cases, to provide more context for any XFAIL.

Currently the only memory operands that XCore inline asm supports are indirect (*m) and they have to be globals. It doesn’t handle locals as operands, or plain “m”. (It doesn’t handle FrameIndex.) So in that sense these tests are expected to fail. As an alternative to XFAIL, I’ve started looking at handling these other cases, or at least finding out what is difficult about them. I suspect there is some difficulty, otherwise the original developer would have done it, but I can’t say what it is yet.