[PATCH v2] powerpc64[le]: Fix CFI and LR save address for asm syscalls [BZ #28532]

Andreas Schwab schwab@linux-m68k.org
Wed Nov 24 14:08:41 GMT 2021


On Nov 24 2021, Matheus Castanho via Libc-alpha wrote:

> diff --git a/sysdeps/powerpc/powerpc64/sysdep.h b/sysdeps/powerpc/powerpc64/sysdep.h
> index 589f7c8d18..c751bc76f9 100644
> --- a/sysdeps/powerpc/powerpc64/sysdep.h
> +++ b/sysdeps/powerpc/powerpc64/sysdep.h
> @@ -275,12 +275,14 @@ LT_LABELSUFFIX(name,_name_end): ; \
>  /* Allocate frame and save register */
>  #define NVOLREG_SAVE \
>      stdu r1,-SCV_FRAME_SIZE(r1); \
> +    cfi_adjust_cfa_offset(SCV_FRAME_SIZE); \
>      std r31,SCV_FRAME_NVOLREG_SAVE(r1); \
> -    cfi_adjust_cfa_offset(SCV_FRAME_SIZE);
> +    cfi_offset(r31,-(SCV_FRAME_SIZE-SCV_FRAME_NVOLREG_SAVE));

Perhaps use cfi_rel_offset instead.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


More information about the Libc-alpha mailing list