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

internal/opcodesextra: add PCALIGN pseudo-op #420

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

mmcloughlin
Copy link
Owner

Add the PCALIGN psuedo-op which will be officially documented from Go 1.22.

https://tip.golang.org/doc/asm#special-instructions

Closes #419
See golang/go#64283

Forms: []inst.Form{
{
Operands: []inst.Operand{
{Type: "imm8"},

Choose a reason for hiding this comment

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

I think the operand was in range 8 to 1024.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Turns out it's power of 2 in the range 8 to 2048.

https://github.com/golang/go/blob/fa72f3e034fdabc5922ac019281f53ea0a8328cf/src/cmd/internal/obj/x86/asm6.go#L2048

I'll need to add a custom operand type for this.

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.

PCALIGN seems to be missing
2 participants