-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Winch aarch64 dynamic heap #9252
Winch aarch64 dynamic heap #9252
Conversation
Subscribe to Label Action
This issue or pull request has been labeled: "winch"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Left some comments which we should address/clarify.
fn cmov(&mut self, src: Reg, dst: Reg, cc: IntCmpKind, size: OperandSize) { | ||
self.asm.jmp_if_resolved(Cond::from(cc).invert(), 12); | ||
self.asm.mov_rr(src, dst, size) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd be better to handle this instruction via csel
. Any particular reason you decided to go this route?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I didn't think about it
todo!() | ||
fn checked_uadd(&mut self, dst: Reg, lhs: Reg, rhs: RegImm, size: OperandSize, trap: TrapCode) { | ||
self.add(dst, lhs, rhs, size); | ||
self.asm.trapif(Cond::Vs, trap); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe here we'd want to use Cond::Hs
? The Cond::Vs
is for signed overflow. (Ref: https://developer.arm.com/documentation/dui0801/l/Condition-Codes/Carry-flag)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
@vulc41n it looks like an update to the filetests is needed? |
7eab647
to
1385776
Compare
@vulc41n filetests were correct, it needed a rebase. I took the liberty to do the rebase so that we can go ahead and land this PR. |
Hey 👋
This PR implements everything needed to run winch for aarch64 with dynamic heap. It implements the following macro instructions :
trap
,trapif
,cmov
andchecked_add
.