[PATCH 4/5] libsframe: rename flip_fre_stack_offsets to flip_fre_datawords

Jens Remus jremus@linux.ibm.com
Thu Jan 22 10:41:09 GMT 2026


On 1/20/2026 11:28 AM, Indu Bhagat wrote:
> Also adjust function level comment for flip_fre_datawords.
> 
> libsframe/
> 	* sframe.c (flip_fre_stack_offsets): Rename to
> 	flip_fre_datawords.
> ---
>  libsframe/sframe.c | 19 ++++++++++---------
>  1 file changed, 10 insertions(+), 9 deletions(-)
> 
> diff --git a/libsframe/sframe.c b/libsframe/sframe.c
> index 38baa2277c1..9240a65b47f 100644
> --- a/libsframe/sframe.c
> +++ b/libsframe/sframe.c
> @@ -402,20 +402,20 @@ flip_fre_start_address (void *addr, uint32_t fre_type)
>  }
>  
>  static void
> -flip_fre_stack_offsets (char *offsets, uint8_t offset_size, uint8_t offset_cnt)
> +flip_fre_datawords (char *datawords, uint8_t dataword_size, uint8_t dataword_cnt)
>  {
>    int j;
>  
> -  if (offset_size == SFRAME_FRE_OFFSET_2B)
> +  if (dataword_size == SFRAME_FRE_DATAWORD_2B)
>      {
> -      uint16_t *ust = (uint16_t *)offsets;
> -      for (j = offset_cnt; j > 0; ust++, j--)
> +      uint16_t *ust = (uint16_t *)datawords;
> +      for (j = dataword_cnt; j > 0; ust++, j--)

Unrelated: What does "ust" refer to?  "unsigned type"?

>  	swap_thing (*ust);
>      }
> -  else if (offset_size == SFRAME_FRE_OFFSET_4B)
> +  else if (dataword_size == SFRAME_FRE_OFFSET_4B)
>      {
> -      uint32_t *uit = (uint32_t *)offsets;
> -      for (j = offset_cnt; j > 0; uit++, j--)
> +      uint32_t *uit = (uint32_t *)datawords;
> +      for (j = dataword_cnt; j > 0; uit++, j--)

Unrelated: What does "uit" refer to?  "unsigned integer type"?

>  	swap_thing (*uit);
>      }
>  }
> @@ -658,6 +658,7 @@ sframe_decode_fde_attr_v3 (const char *buf, size_t buf_size,
>  
>    return 0;
>  }
> +
>  static int
>  flip_fre (char *fp, uint32_t fre_type, size_t *fre_size)
>  {
> @@ -680,10 +681,10 @@ flip_fre (char *fp, uint32_t fre_type, size_t *fre_size)
>    offset_size = sframe_fre_get_offset_size (fre_info);
>    offset_cnt = sframe_fre_get_offset_count (fre_info);
>  
> -  /* Advance the buffer pointer to where the stack offsets are.  */
> +  /* Advance the buffer pointer to where the data words are.  */
>    fre_info_size = sizeof (uint8_t);
>    fp += fre_info_size;
> -  flip_fre_stack_offsets (fp, offset_size, offset_cnt);
> +  flip_fre_datawords (fp, offset_size, offset_cnt);
>  
>    *fre_size
>      = addr_size + fre_info_size + sframe_fre_offset_bytes_size (fre_info);

Regards,
Jens
-- 
Jens Remus
Linux on Z Development (D3303)
jremus@de.ibm.com / jremus@linux.ibm.com

IBM Deutschland Research & Development GmbH; Vorsitzender des Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der Gesellschaft: Ehningen; Registergericht: Amtsgericht Stuttgart, HRB 243294
IBM Data Privacy Statement: https://www.ibm.com/privacy/



More information about the Binutils mailing list