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 3 commits 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)

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 great to address this before merging, I'm actually leaning towards not allowing strings here at all, requiring the label attribute directly.

Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.15%. Comparing base (c6a58b2) to head (2cfc5a3).
Report is 39 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3760      +/-   ##
==========================================
- Coverage   91.30%   90.15%   -1.16%     
==========================================
  Files         467      460       -7     
  Lines       58053    58322     +269     
  Branches     5575     5692     +117     
==========================================
- Hits        53006    52580     -426     
- Misses       3617     4350     +733     
+ Partials     1430     1392      -38     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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