This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, GCC/ARM] Fix comment for cmse_nonsecure_call_clear_caller_saved


Hi,

Saving, clearing and restoring of *callee-saved* registers when doing a
cmse_nonsecure_call is done in the __gnu_cmse_nonsecure_call libcall.
Yet, comments for cmse_nonsecure_call_clear_caller_saved claim that
it is this function that does these actions.

This commit fixes the comment to point to the __gnu_cmse_nonsecure_call
libcall instead.

ChangeLog entry is as follows:

*** gcc/ChangeLog ***

2017-05-12  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Refer
	readers to __gnu_cmse_nonsecure_call libcall for saving, clearing and
	restoring of callee-saved registers.

Given that this is just a comment fix, is this ok for trunk and
gcc-7-branch after a one day delay?

Best regards,

Thomas
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 3ae999cb723a234332bd1ca2e80b09df240c67f0..a888e706004d4bd17be2dfc41237bbea691dccb0 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -16909,9 +16909,10 @@ compute_not_to_clear_mask (tree arg_type, rtx arg_rtx, int regno,
   return not_to_clear_mask;
 }
 
-/* Saves callee saved registers, clears callee saved registers and caller saved
-   registers not used to pass arguments before a cmse_nonsecure_call.  And
-   restores the callee saved registers after.  */
+/* Clears caller saved registers not used to pass arguments before a
+   cmse_nonsecure_call.  Saving, clearing and restoring of callee saved
+   registers is done in __gnu_cmse_nonsecure_call libcall.
+   See libgcc/config/arm/cmse_nonsecure_call.S.  */
 
 static void
 cmse_nonsecure_call_clear_caller_saved (void)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]