3 ms·
Oh no sorry, I didn't mean it as a critique, haha! I just thought this was a funny deja vu. It was this little comment exchange in a post linking a free x86-64
by vanderZwan 3y ago
Oh no sorry, I didn't mean it as a critique, haha! I just thought this was a funny deja vu. It was this little comment exchange in a post linking a free x86-64 assembly book:
k: it probably teaches more than everything i know about amd64 assembly, except the most important thing, which is that arm assembly is much better
vdZ: I'm sure many architectures are nicer than amd64, but that's what the CPU in my laptop uses, as well as my Steam Deck. If I want to get into low-level hacking it's easiest to start with the hardware I have, no?
k: yup, no use looking for your keys in the rose garden if you know you dropped them in the sewer
https://news.ycombinator.com/item?id=38760386 https://news.ycombinator.com/item?id=38760386
- kragen 3y agohaha, yep! i guess it's worth mentioning with qemu-user that you can totally run arm code on amd64 hardware, though sometimes things work that shouldn't, so it's not an ideal testing environment. i did a demo of this last year in https://asciinema.org/a/622461 https://asciinema.org/a/622461
- vanderZwan 3y ago> though sometimes things work that shouldn't Lol, so basically "undocumented opcodes, emulator edition"?
- kragen 3y agoi think the particular thing i ran into was that supposedly actual arms require an instruction cache flush before executing newly jit-compiled instructions and qemu didn't, so not exactly opcodes
- vanderZwan 3y agoOh that actually sounds like a much more plausible gotcha to trip over as a newbie who starts on qemu and then tries the same code on real hardware.
- kragen 3y agooh also i think qemu was supporting unaligned fetches (trapping on them on intel would be very expensive and not useful for running working programs), so i didn't notice that data in my data segment had gotten misaligned until i got a bus error on an actual arm. i don't think i saw an actual failure from the cache flushing thing