From: Szabolcs Nagy <nsz@port70.net>
To: "Gamble, Bradley" <bradley.gamble@ncipher.com>
Cc: "musl@lists.openwall.com" <musl@lists.openwall.com>
Subject: Re: [musl] Support for PowerPC64 devices lacking AltiVec extentions
Date: Fri, 7 Aug 2020 12:46:00 +0200 [thread overview]
Message-ID: <20200807104600.GB879655@port70.net> (raw)
In-Reply-To: <1596795338498.26196@ncipher.com>
* Gamble, Bradley <bradley.gamble@ncipher.com> [2020-08-07 10:15:38 +0000]:
> I was initially encountering exceptions with longjmp()/setjmp() due to the use of lvx/stvx instructions to store and restore vector registers. These vector registers are AltiVec-specific and are not required for devices that do not have the AltiVec extentions, so simply removing them was enough to allow musl to function properly on e5500 devices.
>
> I initially considered whether a compile-time check in the configure script was possible, however I believe this has to be a run-time check to query whether the processor supports AltiVec extentions and to conditionally store/restore the registers if it does. I see that Arm targets use __hwcap for platform-specific functionality, and in hwcap.h for PowerPC64 there is a "PPC_FEATURE_HAS_ALTIVEC" definition.
>
> Would this be the correct way to detect this platform-specific behavior?
__hwcap is the right check (e.g. used in the arm setjmp)
it works if the missing altivec does not affect the call abi
of standard c functions (otherwise fixing setjmp/longjmp alone
will not help: a separate build of libc is needed targetting
your system's call abi).
next prev parent reply other threads:[~2020-08-07 10:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-07 10:15 Gamble, Bradley
2020-08-07 10:46 ` Szabolcs Nagy [this message]
2020-08-07 15:22 ` Rich Felker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200807104600.GB879655@port70.net \
--to=nsz@port70.net \
--cc=bradley.gamble@ncipher.com \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).