pragma Machine_Attribute (Bar, "zero_call_used_regs", "all");
-- Before returning, Bar scrubs all call-clobbered registers.
+ function Baz return Integer;
+ pragma Machine_Attribute (Bar, "zero_call_used_regs", "leafy");
+ -- Before returning, Bar scrubs call-clobbered registers, either
+ -- those it uses itself, if it can be identified as a leaf
+ -- function, or all of them otherwise.
+
For usage and more details on the command-line option, on the
``zero_call_used_regs`` attribute, and on their use with other
@copying
@quotation
-GNAT Reference Manual , Jul 04, 2023
+GNAT Reference Manual , Jul 10, 2023
AdaCore
function Bar return Integer;
pragma Machine_Attribute (Bar, "zero_call_used_regs", "all");
-- Before returning, Bar scrubs all call-clobbered registers.
+
+function Baz return Integer;
+pragma Machine_Attribute (Bar, "zero_call_used_regs", "leafy");
+-- Before returning, Bar scrubs call-clobbered registers, either
+-- those it uses itself, if it can be identified as a leaf
+-- function, or all of them otherwise.
@end example
For usage and more details on the command-line option, on the