This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Support operand modifier 'x' in inline asm
ClosedPublic

Authored by syzaara on Sep 18 2018, 12:21 PM.

Details

Summary

gcc uses operand modifier 'x' in inline asm for VSX registers. Without this modifier, instructions which use VSX numbering for their operands are printed as VMX registers. This patch adds support for the operand modifier 'x'.

Diff Detail

Repository
rL LLVM

Event Timeline

syzaara created this revision.Sep 18 2018, 12:21 PM
jsji added a subscriber: jsji.Sep 20 2018, 12:29 PM

Is this also supported and defined in Intel syntax? Do we need to check AsmVariant here?

jsji added inline comments.Sep 20 2018, 1:00 PM
llvm/test/CodeGen/PowerPC/inlineasm-vsx-reg.ll
1 ↗(On Diff #166016)

Add -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names ?

8 ↗(On Diff #166016)

The testcase here tests path of isVRRegister and VSL register, is it possible that we include another testcase to go through isVFRegister register path?

nemanjai accepted this revision.Sep 21 2018, 1:06 PM

LGTM after Jinsong's comments are addressed.
+1 for the test case comments.

I don't think we need to worry about Intel syntax for this modifier since we don't for any of the other modifiers. In fact, I don't think we have any support for Intel syntax on PPC.

This revision is now accepted and ready to land.Sep 21 2018, 1:06 PM
syzaara updated this revision to Diff 166665.Sep 24 2018, 6:50 AM
This revision was automatically updated to reflect the committed changes.