[gcc(refs/users/aoliva/heads/testme)] Add leafy mode for zero-call-used-regs [ada doc]
Alexandre Oliva
aoliva@gcc.gnu.org
Fri Jun 23 20:56:48 GMT 2023
https://gcc.gnu.org/g:2b1d06875e6dea4bfd3b34352c2890032723b506
commit 2b1d06875e6dea4bfd3b34352c2890032723b506
Author: Alexandre Oliva <oliva@gnu.org>
Date: Fri Jun 16 03:24:27 2023 -0300
Add leafy mode for zero-call-used-regs [ada doc]
Document leafy mode.
for gcc/ada/ChangeLog
* doc/gnat_rm/security_hardening_features.rst (Register
Scrubbing): Document leafy mode.
Diff:
---
gcc/ada/doc/gnat_rm/security_hardening_features.rst | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/gcc/ada/doc/gnat_rm/security_hardening_features.rst b/gcc/ada/doc/gnat_rm/security_hardening_features.rst
index 283933cca50..80a73706294 100644
--- a/gcc/ada/doc/gnat_rm/security_hardening_features.rst
+++ b/gcc/ada/doc/gnat_rm/security_hardening_features.rst
@@ -34,6 +34,12 @@ subprograms.
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 only call-clobbered registers
+ -- that it uses itself, if it can be identified as a leaf
+ -- function, or all such registers otherwise.
+
For usage and more details on the command-line option, on the
``zero_call_used_regs`` attribute, and on their use with other
More information about the Gcc-cvs
mailing list