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

Add opcodes for fast interpreter #182

Merged
merged 1 commit into from
Aug 26, 2024
Merged

Conversation

khagankhan
Copy link
Contributor

Add thread-related opcodes onto fast interpreter.

@@ -4,3 +4,22 @@ test/regress/ext:gc/array_new_fixed.bin.wast
test/regress/ext:gc/br_on_non2.bin.wast
test/regress/ext:gc/br_on_non.bin.wast
test/regress/ext:gc/ref_eq.bin.wast
test/regress/ext:threads/atomic_load_i32.bin.wast
Copy link
Owner

Choose a reason for hiding this comment

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

Do these tests only fail on the single-pass compiler now? If so, the failures file should be at least platform-specific, since these should all pass on the V3 interpreter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, it passes on V3 interpreter. I was planning to remove all of these when making a final PR to V3 interpreter.

Copy link
Owner

Choose a reason for hiding this comment

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

Ok, sgtm.

bindHandler(Opcode.I64_ATOMIC_RMW16_CMPXCHG_U);
genAtomicCompareAndExchange(asm.cmpxchgw_m_r);
}
def genAtomicOp<T>(op: (X86_64Addr, X86_64Gpr) -> T,
Copy link
Owner

Choose a reason for hiding this comment

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

This method is getting a little big. In particular, it takes a bool that switches off a lot of the functionality. I think it makes sense to split it into two methods at least, and factor out some of the commonality to shared functions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure thing! I didn’t like it either tbh. But since it was done in a single function I kept like that to get feedback

Copy link
Owner

Choose a reason for hiding this comment

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

Ok, I am going to merge this and we can fix it in a followup.

Copy link
Contributor Author

@khagankhan khagankhan Aug 26, 2024

Choose a reason for hiding this comment

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

Hey! Thanks! I am going to make PR s about JIT and Virgil interpreters. I will write separate functions when making a PR about wait and notify o7

@titzer titzer merged commit 8d0edb6 into titzer:master Aug 26, 2024
8 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.

2 participants