This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -msse producing sse2 instructions
On Sunday 21 July 2002 11:44, Jan Hubicka wrote:
> > Hello there,
> >
> > Well, I run the same executable on an Athlon MP with no problem. When I
> > run on an Athlon 4 gdb tells me the program has crashed with an illegal
> > instruction and displays that instruction I sent earlier.
> >
> > However, as Tim Prince mentioned, it might be an alignment issue with
> > different versions of the Athlon being more fussy about alignment than
> > others and invalidly reporting the problem as an illegal instruction.
>
> This does not happen. The missaligned accesses are reported as
> segmentation violation and additionally the instruction is scalar and
> does not require any alignment. I would bet to the BIOS or Windows
> problem. It is possible to verify whether SSE is enabled by cpuid
> instruction that is available in Linux systems in /proc/cpuinfo but I am
> not sure whether there is some equivalent for W.
>
> Honza
Honza is correct; any problem with alignment would be distinct
from whether your CPU accepts sse instructions. Perhaps that is an older
version of Athlon.
The cpuid instructions work the same with gcc under Windows, and, with the
necessary syntax changes, with other compilers. Certain applications, such
as those built with the Intel compiler option /QaxK, do use cpuid to
determine whether sse instructions are available. Information obtained by
cpuid may be distinct from the information available in /proc/cpuinfo,
although some of the latter would express results of cpuid tests.
--
Tim Prince