From: Nathan Ingersoll <ningerso@ruralcenter•org>
To: linuxppc-dev@lists•linuxppc.org
Subject: Re: Runtime Altivec detection
Date: Sat, 8 Mar 2003 12:21:36 -0600 [thread overview]
Message-ID: <20030308182135.GA31349@ruralcenter.org> (raw)
In-Reply-To: <20030308030440.39fcdc90.billfink@mindspring.com>
On Sat, Mar 08, 2003 at 03:04:40AM -0500, Bill Fink wrote:
>
> There's also a practical consideration. For example, in the xine case,
> the test for Altivec support is done in the xine library package, whereas
> the main() program is in a separate package, namely the xine UI, of which
> there are actually several available UIs. Now if there was a getaux
> function similar to the getenv function, this would make matters a lot
> simpler.
>
> So while the current xine code may be somewhat ugly, it does work and
> is pretty easy to implement within a library.
One issue I saw with the xine code, is if it's in a library, you may want
to use sigaction to save the previous handler, since the app may set it's
own signal handler.
While somewhat ugly, it should be relatively OS independant, and it
could also be used in a callback type fashion for testing instruction
availability on a variety of platforms. The code I linked to in my
original post is an example of this. It could be called with
cpu_detect(mmx_test); on x86, cpu_detect(altivec_test); on ppc, or
cpu_detect(vis_test) on sparc, etc.
Thanks for all the ideas folks, looks like I'll have to consider the
different approaches, or use a combination.
--
------------------------------------------------------------------------
| Nathan Ingersoll \\ Computer Systems & Network Coordinator |
| ningerso@ruralcenter•org \\ http://www.ruralcenter.org |
| http://ningerso.atmos.org/ \\ Minnesota Center for Rural Health |
------------------------------------------------------------------------
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2003-03-08 18:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-08 2:02 Runtime Altivec detection Bill Fink
2003-03-08 2:11 ` Hollis Blanchard
2003-03-08 8:04 ` Bill Fink
2003-03-08 18:21 ` Nathan Ingersoll [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-03-09 4:01 Albert Cahalan
2003-03-07 16:47 Nathan Ingersoll
2003-03-07 17:24 ` Dan Malek
2003-03-07 17:35 ` Nathan Ingersoll
2003-03-07 17:37 ` Anton Blanchard
2003-03-07 17:41 ` Benjamin Herrenschmidt
2003-03-07 17:52 ` Nathan Ingersoll
2003-03-07 18:55 ` Magnus Damm
2003-03-07 18:06 ` Benjamin Herrenschmidt
2003-03-07 18:18 ` Hollis Blanchard
2003-03-07 18:54 ` Magnus Damm
2003-03-07 18:08 ` Nathan Ingersoll
2003-03-07 19:44 ` Magnus Damm
2003-03-07 19:23 ` Nathan Ingersoll
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=20030308182135.GA31349@ruralcenter.org \
--to=ningerso@ruralcenter$(echo .)org \
--cc=linuxppc-dev@lists$(echo .)linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox