Arguably generating code for a real CPU requires so much knowledge about that specific hardware that it's not really any longer about compilers. Therefore most compiler courses target a simpler RISC CPU because it's easier to teach the algorithms behind it.