In this code actually it has coded to save the register values in the function. Is it compulsory to do this always by the function?

In this code actually it has coded to save the register values in the function. Is it compulsory to do this always by the function?
