[binutils-gdb] gas: sframe: improve code comments around SFRAME_FRE_BASE_REG_INVAL
Indu Bhagat
ibhagat@sourceware.org
Mon Nov 3 07:42:09 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2445d240d18f89191d8b1fd4f30cb9fcd4c480c3
commit 2445d240d18f89191d8b1fd4f30cb9fcd4c480c3
Author: Indu Bhagat <indu.bhagat@oracle.com>
Date: Sun Nov 2 23:41:04 2025 -0800
gas: sframe: improve code comments around SFRAME_FRE_BASE_REG_INVAL
Rename it to SFRAME_FRE_REG_INVALID.
gas/
* gen-sframe.c (sframe_row_entry_new): Adjust code comments a
bit.
* gen-sframe.h (SFRAME_FRE_BASE_REG_INVAL): Rename from..
(SFRAME_FRE_REG_INVALID): ..to this.
Diff:
---
gas/gen-sframe.c | 6 +++---
gas/gen-sframe.h | 3 ++-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/gas/gen-sframe.c b/gas/gen-sframe.c
index b1aa8072410..3ac1cf4338c 100644
--- a/gas/gen-sframe.c
+++ b/gas/gen-sframe.c
@@ -504,9 +504,9 @@ static struct sframe_row_entry*
sframe_row_entry_new (void)
{
struct sframe_row_entry *fre = XCNEW (struct sframe_row_entry);
- /* Reset cfa_base_reg to -1. A value of 0 will imply some valid register
- for the supported arches. */
- fre->cfa_base_reg = SFRAME_FRE_BASE_REG_INVAL;
+ /* Reset cfa_base_reg to SFRAME_FRE_REG_INVALID. A value of 0 may imply a
+ valid register for a supported arch. */
+ fre->cfa_base_reg = SFRAME_FRE_REG_INVALID;
fre->merge_candidate = true;
/* Reset the mangled RA status bit to zero by default. We will
initialize it in sframe_row_entry_initialize () with the sticky
diff --git a/gas/gen-sframe.h b/gas/gen-sframe.h
index cf9f5987bf5..d5cad324da6 100644
--- a/gas/gen-sframe.h
+++ b/gas/gen-sframe.h
@@ -34,7 +34,8 @@
#define SFRAME_FRE_ELEM_LOC_REG 0
#define SFRAME_FRE_ELEM_LOC_STACK 1
-#define SFRAME_FRE_BASE_REG_INVAL ((unsigned int)-1)
+/* An invalid register number. */
+#define SFRAME_FRE_REG_INVALID ((unsigned int)-1)
/* SFrame Frame Row Entry (FRE).
More information about the Binutils-cvs
mailing list