HackerTrans
TopNewTrendsCommentsPastAskShowJobs

epilys

no profile record

Submissions

Long branches in compilers, assemblers, and linkers

maskray.me
5 points·by epilys·il y a 6 mois·0 comments

Show HN: Emulating aarch64 in software using JIT compilation and Rust

pitsidianak.is
2 points·by epilys·il y a 11 mois·0 comments

comments

epilys
·le mois dernier·discuss
Hi Rain, have you considered fuzzing? and if not, why?

(Thanks for cargo-nextest btw!)
epilys
·il y a 2 mois·discuss
> However, I haven’t found any such cards for Greek characters, so I think mine are the first in Greek.

Huh? A simple web search shows many, many, many results.
epilys
·il y a 7 mois·discuss
(2021).

Keep in mind that TCG API and internals have no stable guarantees, so if you cross-reference with current QEMU code you are bound to find differences.
epilys
·il y a 10 mois·discuss
Seconding the other comments that recommend architecture manuals and guides.

For Aarch64, Arm's official guide is pretty good https://developer.arm.com/documentation/102142/latest/
epilys
·il y a 11 mois·discuss
Very little free time unfortunately... Haven't spent many hours on this project.
epilys
·il y a 11 mois·discuss
Writing a JIT and a disassembler are completely separate topics than emulating a system, don't you agree? :D (The article only talks about structuring a system emulator.)

The disassembler is my next step, since it's the easiest to tackle. Swapping binja for a custom solution on the existing code would be relatively straightforward.

The JIT is a completely different beast, it's essentially the IR -> codegen steps of a compiler (meaning without parsing, syntax/lexical analysis, object generation). Seeing as I wanted to target both x86_64 and aarch64 hosts, using an existing solution would get me started faster before I eventually write my own.

My plan is to split the JIT backends and keep cranelift for x86_64 support, but have my own aarch64 JIT also.

You have to pick your battles and assign priorities, you cannot re-invent everything at once.

(Author here)
epilys
·il y a 11 mois·discuss
Yes! I also started with using vm_memory traits in the beginning but delayed it till I refactor my memory subsystem. When we get that in upstream QEMU it might be possible to share this implementation as well as future devices.
epilys
·il y a 11 mois·discuss
Yes, it's possible and supported. QEMU can emulate an aarch64 system, and Google provides aarch64 Android builds for virtual machines specifically, called "Cuttlefish". Search for keywords "Android Cuttlefish QEMU" for instructions.
epilys
·il y a 11 mois·discuss
The only book I have that came with a barf bag. More books should do this.