HackerTrans
TopNewTrendsCommentsPastAskShowJobs

epilys

no profile record

Submissions

Long branches in compilers, assemblers, and linkers

maskray.me
5 points·by epilys·6 เดือนที่ผ่านมา·0 comments

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

pitsidianak.is
2 points·by epilys·11 เดือนที่ผ่านมา·0 comments

comments

epilys
·เดือนที่แล้ว·discuss
Hi Rain, have you considered fuzzing? and if not, why?

(Thanks for cargo-nextest btw!)
epilys
·2 เดือนที่ผ่านมา·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
·7 เดือนที่ผ่านมา·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
·10 เดือนที่ผ่านมา·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
·11 เดือนที่ผ่านมา·discuss
Very little free time unfortunately... Haven't spent many hours on this project.
epilys
·11 เดือนที่ผ่านมา·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
·11 เดือนที่ผ่านมา·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
·11 เดือนที่ผ่านมา·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
·11 เดือนที่ผ่านมา·discuss
The only book I have that came with a barf bag. More books should do this.