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

[WIP]: Initialise arm_cf and begin beq implementation #3760

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

Conversation

emmau678
Copy link
Contributor

Add arm_cf dialect and implement beq instruction

@emmau678 emmau678 added the dialects Changes on the dialects label Jan 17, 2025
@emmau678 emmau678 self-assigned this Jan 17, 2025
@emmau678
Copy link
Contributor Author

I've been stuck on this error for a while now so just pushing this as WIP in case anyone could help speed things up: KeyError: 'testlabel'. Advice would be much appreciated if anyone can see where I've gone wrong.


// CHECK-NEXT: arm_cf.beq %x1, %x2, ^testlabel
// CHECK-ASM: arm_cf.beq x1, x2, ^testlabel
arm_cf.beq %x1, %x2, ^testlabel : (!arm.reg<x1>, !arm.reg<x2>)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the issue is you've that you've referred to a block that doesn't exist

Copy link
Member

Choose a reason for hiding this comment

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

This is a good opportunity to fix the error message in a separate PR!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

PR for fixing error message: #3762

def assembly_line_args(self):
then_label = self.then_block.first_op
assert isinstance(then_label, arm.ops.LabelOp)
return (self.s1, self.s2, then_label.label.data)
Copy link
Member

Choose a reason for hiding this comment

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

It would be good to allow both str and StringAttr here

Suggested change
return (self.s1, self.s2, then_label.label.data)
return (self.s1, self.s2, then_label.label)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dialects Changes on the dialects
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants