replace registers with mem in icache