Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.rc > #300831

Bug#943425: Debian #943425: klibc: [s390x] setjmp/longjmp do not save/restore all registers in use

From Thorsten Glaser <tg@mirbsd.de>
Newsgroups linux.debian.bugs.rc
Subject Bug#943425: Debian #943425: klibc: [s390x] setjmp/longjmp do not save/restore all registers in use
Date 2021-05-05 19:50 +0200
Message-ID <CbtON-20C-3@gated-at.bofh.it> (permalink)
References (4 earlier) <CbfVv-21l-1@gated-at.bofh.it> <yUOWe-6BM-7@gated-at.bofh.it> <CbmWZ-6of-3@gated-at.bofh.it> <yUOWe-6BM-7@gated-at.bofh.it> <CbmWZ-6of-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Andreas,

>>> Jessica Clarke brought out docs saying f8‥f15 must be saved, the
>>> other FPU registers not:
>
>I can confirm this. It is f8-f15 for the z/Architecture (64 bit).

thanks!

>It is f1, f3, f5, f7 for the ESA
>architecture (32 bit) which is still supported by Glibc and GCC.

Is this what we know as s390 in Debian? (klibc saves f4 and f6 there
currently. If so, this also needs to change.)

>>> … GCC chooses to allocate an FPU register for a pointer value.
>
>GCC will put integer values into vector registers for
>auto-vectorization or for spilling. We also use call-clobbered FPRs as
>save slots for GPRs in leaf-functions if can get rid of allocating a
>stack frame that way.

Ah, interesting. Thanks!

>The vector registers are call-clobbered - exactly for the reason of
>setjmp / longjmp. Only f8-f15 need to be saved.

Right.

>You can find the latest version of our ABI here:
>https://github.com/IBM/s390x-abi/releases/download/v1.5/lzsabi_s390x.pdf
>
>However, it is still lacking the vector ABI extension. I wrote a
>document for that which we use internally and we are working on
>integrating it into the publicly available version.

OK, thanks for the information!

>>> @klibc list: as indicated earlier, I can provide a patch if needed
>>> (though it should be obvious).

hpa, maks, bwh: any of you taking these two or should I send patches
and possibly NMU klibc in Debian?

Thanks,
//mirabilos
-- 
<ch> you introduced a merge commit        │<mika> % g rebase -i HEAD^^
<mika> sorry, no idea and rebasing just fscked │<mika> Segmentation
<ch> should have cloned into a clean repo      │  fault (core dumped)
<ch> if I rebase that now, it's really ugh     │<mika:#grml> wuahhhhhh

Back to linux.debian.bugs.rc | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#943425: Debian #943425: [s390x] setjmp/longjmp do not save/restore all registers in use (was Use of $v10 register (was Re: klibc: [s390x] SIGSEGV in mksh testcase funsub-2)) Thorsten Glaser <tg@mirbsd.de> - 2021-05-04 01:40 +0200
  Bug#943425: Debian #943425: klibc: [s390x] setjmp/longjmp do not save/restore all registers in use Thorsten Glaser <tg@mirbsd.de> - 2021-05-05 19:50 +0200
    Bug#943425: [klibc] Debian #943425: klibc: [s390x] setjmp/longjmp do not save/restore all registers in use Ben Hutchings <ben@decadent.org.uk> - 2021-05-05 20:30 +0200
      Bug#943425: [klibc] Debian #943425: klibc: [s390x] setjmp/longjmp do not save/restore all registers in use Ben Hutchings <ben@decadent.org.uk> - 2021-05-05 21:50 +0200
        Bug#943425: [klibc] #943425 [s390x] setjmp/longjmp do not save/restore all registers in use Thorsten Glaser <tg@mirbsd.de> - 2021-05-22 02:10 +0200

csiph-web