Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SystemZ] Implement A, O and R inline assembly format flags #80685

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

iii-i
Copy link
Member

@iii-i iii-i commented Feb 5, 2024

Implement the following assembly format flags, which are already
supported by GCC:

'A': On z14 or higher: If operand is a mem print the alignment
     hint usable with vl/vst prefixed by a comma.
'O': print only the displacement of a memory reference or address.
'R': print only the base register of a memory reference or address.

Implement 'A' conservatively, since the memory operand alignment
information is not available for INLINEASM at the moment.

Copy link
Member

@uweigand uweigand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See inline comments - otherwise LGTM, thanks!

llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp Outdated Show resolved Hide resolved
case 'A':
// Unlike EmitMachineNode(), EmitSpecialNode(INLINEASM) does not call
// setMemRefs(), so MI->memoperands() is empty and the alignment
// information is not available.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. This is unfortunate, as it will lead to less efficient code being emitted without any indication to the user ...

I guess this is OK for now (probably still better than an error) - but can we look into actually fixing the underlying problem as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll look into this. Ideally this will be as simple as adding an extra call, but, of course, there may be some fallout that will have to be investigated.

Implement the following assembly format flags, which are already
supported by GCC:

    'A': On z14 or higher: If operand is a mem print the alignment
         hint usable with vl/vst prefixed by a comma.
    'O': print only the displacement of a memory reference or address.
    'R': print only the base register of a memory reference or address.

Implement 'A' conservatively, since the memory operand alignment
information is not available for INLINEASM at the moment.
@iii-i iii-i merged commit 9c75a98 into llvm:main Feb 7, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants