This is the mail archive of the
mailing list for the GCC project.
Re: floating point sse & sse2
- From: Tim Prince <tprince at computer dot org>
- To: "rkm at usol dot com" <rkm at usol dot com>,gcc at gcc dot gnu dot org
- Date: Fri, 1 Feb 2002 05:43:36 -0800
- Subject: Re: floating point sse & sse2
- References: <email@example.com>
- Reply-to: tprince at computer dot org
On Friday 01 February 2002 05:07, firstname.lastname@example.org wrote:
> I am new to this mailing list, sorry if my question has
> already been discussed here.
> I will soon have Redhat Linux 7.2 installed on a Pentium 4
> machine. I am trying to determine whether I can make use of the
> floating point streaming simd extensions (SSE,SSE2) with GCC
> or the AS assembler. I assume that if this is possible at all, I
> will probably have to write in-line assembly code with the SSE
> instructions, is that right? However I have downloaded the
> latest version of the binutils I could find on ftp sites (version 2.11.2),
> and I looked at the info files for the AS assembler -- the info
> file says that AS currently does not support floating point SIMD
> for intel processors. While I saw that the AS assembler can access
> the XMM registers, there are other registers required for SSE that
> are not mentioned in the info file (e.g. CR4). Is the info file
> out of date, or is it true that floating point SSE is not yet supported
> in AS (or GCC) for intel Pentium processors? If it is not yet supported,
> is this a project that is in the works for future versions?
> Even if SSE is supported in GCC or AS, I also have questions
> whether the Linux kernel can support SSE. I have read that
> the kernel must support context switching for floating point SSE
> to work properly. I don't understand the implications of this, but
> Redhat 7.2 uses kernel version 2.4.7-10 -- Would I have to use
> a different version of the kernel to support SSE?
> Thanks for any assistance,
I have not had any difficulties such as you mention with 'gcc -msse2
-march=pentium4' (gcc-3.1) running on rh 7.1 with recent binutils installed.
With my current SuSE 7.3 installation default binutils (which works fine with
gcc-3.1), it says:
tim@linux:~> as --version
GNU assembler 188.8.131.52.29
Copyright 2001 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
This assembler was configured for a target of `i486-suse-linux'.
The one feature of current Intel CPU's which is not supported in the stock rh
kernel is HyperThreading; you must either disable it in BIOS (to avoid
serious performance loss) or use kernel 2.4.17 (unless rh comes out with
another of their own kernels).
gcc-3.1 employs only the scalar SSE and SSE2 instructions. as should work
with the parallel instructions, if you observe the required data alignments.
Only Intel's icc compiler uses parallel SSE by auto-vectorization or by their
IPP extensions, as well as through gcc style asm() syntax.
Surely, you could find some interesting information more quickly at
http://gcc.gnu.org, and more by reading the mail list archives, which people
are unlikely to wish to repeat for you.