unicorn-engine / unicorn

Unicorn CPU emulator framework (ARM, AArch64, M68K, Mips, Sparc, PowerPC, RiscV, S390x, TriCore, X86)
http://www.unicorn-engine.org
GNU General Public License v2.0
7.66k stars 1.35k forks source link

Add TCI Support #2050

Open Naville opened 2 weeks ago

Naville commented 2 weeks ago

Title.

Per discussion with @wtdcode

Naville commented 2 weeks ago

Note: This was tested with -DUNICORN_INTERPRETER=ON -DBUILD_SHARED_LIBS=OFF -DUNICORN_ARCH=arm on:

Darwin Kernel Version 24.0.0: Tue Sep 24 23:39:07 PDT 2024; root:xnu-11215.1.12~1/RELEASE_ARM64_T6000 arm64

and iOS. Only one arch is selected due to the linkage issue we discussed privately in email, that I still don't know why and how to fix

aquynh commented 2 weeks ago

Can you add a doc on how to use this as a framework?

On Mon, Nov 4, 2024, 10:26 Zhang @.***> wrote:

Title.

Per discussion with @wtdcode https://github.com/wtdcode

You can view, comment on, or merge this pull request online at:

https://github.com/unicorn-engine/unicorn/pull/2050 Commit Summary

File Changes

(9 files https://github.com/unicorn-engine/unicorn/pull/2050/files)

Patch Links:

— Reply to this email directly, view it on GitHub https://github.com/unicorn-engine/unicorn/pull/2050, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNQNYFRSOG3ZQWXVATDXZTZ63LPHAVCNFSM6AAAAABRDK2NS6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGYZTCNRYGA3DGOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Naville commented 2 weeks ago

Can you add a doc on how to use this as a framework?

not sure what you meant by "as a framework", but in my test sample I just compiled and linked everything as a static library

wtdcode commented 2 weeks ago

Can you add a doc on how to use this as a framework?

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

Naville commented 2 weeks ago

Can you add a doc on how to use this as a framework?

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

Naville commented 2 weeks ago

Note: Once you're done, lmk so I could upstream patches I've provided for downstream package manager: vcpkg