Every arch handles this the same way, so move it to the common code. This will also make unifying the sim_cpu structure easier.
Every arch handles this the same way, so move it to the common code. This will also make unifying the sim_cpu structure easier.