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

Question: JIT in THUMB mode #1

Open
treeswift opened this issue Nov 29, 2021 · 3 comments
Open

Question: JIT in THUMB mode #1

treeswift opened this issue Nov 29, 2021 · 3 comments
Labels
question Further information is requested

Comments

@treeswift
Copy link

Hi!
The Readme on the front page says we shouldn't be afraid of opening issues if we have questions.
It also says "Windows RT only has THUMB ARM mode, meaning it cannot run things such as JIT".

What is the particular issue with JIT in Thumb mode? Does it disallow mapping memory in w+x mode (as well as flipping page status from writable to executable)? Or the V8 JIT can only produce full-width 32-bit code and a Thumb-generating JIT needs to be written from scratch? What's the best source to read about the problems that arise?

I have a few Surface RT devices and will likely have some time to tinker with the toolchain during the Christmas break.
Please forgive my ignorance; most system programming I ever did was on Linux, and most of it wasn't CPU arch specific.

@pahaze
Copy link
Member

pahaze commented Nov 29, 2021

The JIT for QtWebKit (or WebKit/etc) is specific to ARM32 only sadly (as far as I know), excluding THUMB mode. I'm assuming it's because THUMB is a mix of 16-bit and 32-bit instructions? I'm not very sure, but seeing things like PPSSPP run JIT on RT8.1 vs RT10 shows that JIT only works on RT10 and it was said to be because RT8.1 is THUMB vs RT10, which is full on ARM32. For all I know, it could be possible to do a THUMB JIT, but would likely require a rewrite. Learning ARM ASM isn't any fun though TBH 😂

If I find that it is possible for a THUMB JIT, I'll update the README. Haven't had much time to really edit any of the GitHub, hence why it's last commit is from June 😂. School isn't any fun, that's the most I can say about time. I've even gotten GTK3 working since then, but it was a bit of a messy fix. I'll have to push it later on when I get a new drive given my one I was compiling on gave out just 2 days ago. I'll leave this open until it's figured out, though, that way if another person wants to ask/know, it's here.

@pahaze
Copy link
Member

pahaze commented Nov 29, 2021

Oh yeah, I forgot to mention
There are unstable builds of Otter Browser for WoA32 made by me too, if you want to check those out. They're not the greatest, but hey, progress is slowly being made. If you wanna check the forum, it's here, or if you want to just download it, it's there too. I plan to get this open-sourced as soon as possible, but the build steps are VERY messy at the moment.

@treeswift
Copy link
Author

Oh IC. Thank you! Great to hear it's merely a software problem with a (possible) software solution. I think I can look into that. My first assembly language was DEC/PDP-11, so ARM ASM conventions almost feel familiar. I did some ARM code reverse engineering, stack decoding etc. (had to go through a pile of remote crash dumps captured on old Android phones).
Will update you of any progress made (or lack thereof).

@pahaze pahaze added the question Further information is requested label Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants