pan/midgard: Break mir_spill_register into its function