It’s some kind of a tradition: Every time I want to learn a new ISA, a try to port my compiler from the compiler engineering lecture, which I did in 2010, to this architecture. Originally it was designed to emit code for x86_64. That time, I played around with the Nintendo Wii a lot. Equipped with an ppc32 core and running gc-linux on it, I literally had to port my compiler to that plattform :-)

Later, I got an ARM device (HTC Desire Z) with a Debian in a chroot environment, but for some reason I was too lazy to do a serious port.

Recently I played around with the ARMv8 ISA. There is no real hardware available yet, but an emulator—the Linaro group has some instructions. I’m used to have a restrained environment, for example the Nintendo Wii has an old CPU (remember Apple G3 times?) and there’re 88MB RAM available: I even encountered delays when scrolling in vim! Doing a build (not to mention fire up a single test) was—compared to x86_64—horribly slow. But I learned to be economical with the resources, and it was fun at some point.

Sooo, the aarch64 emulator is even slower. Building ox was a nice experience too: via sshfs I pre-compiled with flex and yacc, since they failed on the emulator (although the image contains them). Building itself is really slow. Takes about a minute to build my quite simple compiler (it’s like some microseconds on x86_64). Fortunately, RAM is not a problem (4 GB), but file access is utterly slow. And don’t dare to access multiple files at the same time…

Funny side-note: dmesg exits with “Segmentation fault” on the emulator.

Next steps

  • set up cross-compiling and hack up a script that only executes necessary files on the emulator
  • study gcc -S outputs
  • read the ARMv8 ISA documentation carefully

I’m looking forward to real hardware ;-)



blog comments powered by Disqus

Author:

lewurm

Published

26 January 2013

Tags