
The Illumos Syscall Handler - bcantrill
http://zinascii.com/2016/the-illumos-syscall-handler.html
======
amluto
That's a lot of mess to use movq and movl to populate the on-stack register
image. Using pushq would save a lot of code and significantly reduce register
shuffling.

~~~
cwp
Illumos (Solaris) has been around for a while. It was probably written in the
32-bit era.

~~~
rkeene2
It's been a long time since Solaris worked well on a 32-bit CPU. UltraSPARC
replaced SPARC in the 90s, and Solaris on x86 was not a very common thing
then. It wasn't until Solaris 10/OpenSolaris (around 2005) that the x86 port
was really viable, and then 64-bit CPUs were really recommended (especially
after ZFS came out in Update 1)

~~~
cwp
Even so, the syscall handler would have been written early in the development
of the x86 port, well before it was "viable" for customers. Relying on quad-
word instructions in hand-written assembly for such a crucial part of the OS
would have meant no 32-bit support at all. That's probably not a good product
decision even today, but at the time, it would have been crazy.

~~~
ryao
If there is going to be a debate over how mov performs versus push/pop,
someone should just go ahead and change it. The time talking about it would be
better spent on other things.

------
cm3
Slightly off-topic, but what do I have to do to boot Illumos on QEMU? There's
always some kernel fault and it doesn't start to boot.

~~~
melloc
You might want to try booting without graphics and accessing it via a serial
port, to see if that makes a difference. See this e-mail thread for a
discussion:

[https://www.mail-archive.com/smartos-
discuss@lists.smartos.o...](https://www.mail-archive.com/smartos-
discuss@lists.smartos.org/msg00788.html)

