4.3.5.5 How Do I Prevent the Compiler From Saving or Restoring Any Registers?

If you do not want register values saved or restored after an interrupt or Reset, you can use the naked attribute. This attribute should be used with care though, because you generally want to save these values. For details, see the following section of this user’s guide:

Function Attributes