Re: [PATCH 5/8] s390/purgatory: workaround llvm's IAS limitations

From: Heiko Carstens
Date: Thu May 12 2022 - 13:50:03 EST


On Wed, May 11, 2022 at 02:05:29PM +0200, Heiko Carstens wrote:
> llvm's integrated assembler cannot handle immediate values which are
> calculated with two local labels:
>
> arch/s390/purgatory/head.S:139:11: error: invalid operand for instruction
> aghi %r8,-(.base_crash-purgatory_start)
>
> Workaround this by partially rewriting the code.
>
> Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
> ---
> arch/s390/purgatory/head.S | 29 ++++++++++++++++++++++-------
> 1 file changed, 22 insertions(+), 7 deletions(-)
...
> - aghi %r10,stack-purgatory_start
> + larl %r0,purgatory_start
> + slgrk %r0,%r7,%r0
> + agr %r10,%r0

Same problem here: slgrk does not work for MARCH=z10. So new version
looks like: