]> gcc.gnu.org Git - gcc.git/commitdiff
ada: Add leafy mode for zero-call-used-regs
authorAlexandre Oliva <oliva@adacore.com>
Wed, 28 Jun 2023 04:36:53 +0000 (01:36 -0300)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 10 Jul 2023 12:41:38 +0000 (14:41 +0200)
Document leafy mode.

gcc/ada/

* doc/gnat_rm/security_hardening_features.rst (Register
Scrubbing): Document leafy mode.
* gnat_rm.texi: Regenerate.

gcc/ada/doc/gnat_rm/security_hardening_features.rst
gcc/ada/gnat_rm.texi

index ad165cd6849354fe3f771fab84228fef11fcddff..14328598c33f43e60e71f5525ae540c717a3944a 100644 (file)
@@ -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 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
index b28e6ebfffa1c42c018c74292517d24f63fb7b4c..817ba0b91088dc9dcb964ff30a3d31d7638ced1e 100644 (file)
@@ -19,7 +19,7 @@
 
 @copying
 @quotation
-GNAT Reference Manual , Jul 04, 2023
+GNAT Reference Manual , Jul 10, 2023
 
 AdaCore
 
@@ -29191,6 +29191,12 @@ pragma Machine_Attribute (Foo, "zero_call_used_regs", "used");
 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
This page took 0.089714 seconds and 5 git commands to generate.