I was posed the question by a classmate asking since an OS is an extended or virtual machine, does the compiler need to know the number of registers, or instructions of the processor when it generates assembly code of a C program.
I've spent a while scouring the internet and here is what I think...
It doesn't need to know the number of registers because being a virtual machine it has unlimited resources in memory per say.
However, it does need to know the instructions of the processor to know when it is able to perform specific functions at specific times.
I was wondering if someone could clarify this for me because I'm not very confident in my answers.