-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add TCI Support #2050
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
base: dev
Are you sure you want to change the base?
Add TCI Support #2050
Conversation
Note:
and iOS. |
not sure what you meant by "as a framework", but in my test sample I just compiled and linked everything as a static library |
This is still work-in-progress and I need to fix the tests failure before really adding flags, samples, docs etc. @Naville Could you rebase this against dev branch? For more context, TCI is an interpreter backend, i.e. doesn't do any JIT and thus is suitable for running on systems without writable & executable pages, specifically iOS. More context is included in #1695 |
done |
Note: Once you're done, lmk so I could upstream patches I've provided for downstream package manager: vcpkg |
The tci code that handles Line 518 in 7f77dce
I tweaked the build system to make this branch compile in emscripten. It compiles and runs, but it crashes on a basic example (function signature mismatch) because it passed too many arguments to a helper function. The unicorn.js solution is to use an adapter generator: Upstream qemu uses a different solution based on libffi. I assume we don't want to introduce another dependency. |
Good catch!
This was copy-pasted from a previous release from qemu with VERY minimum modifications, I assume the upstream knows they broke something in subsequent releases
I figure the most viable option here is to left this as-is and update the tcg copy with the baseline used by unicorn?
|
I get a segfault doing a memory write in RISC-V:
Why is |
This patch to symbols.sh fixes it:
Once it's run the headers will be redefined so each arch will call it's own tci runner. |
@petabyt I no longer work on this anymore, feel free to take over my existing work |
@wtdcode Let me know if you need help fixing this PR, I have a branch partially working for my project here: staging...petabyt:unicorn:tci-emscripten Fixed some other issues too. |
Cool, will have a look. |
Title.
Per discussion with @wtdcode