[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
_mm_add_ps SIGSEGV
From: |
Alan Woodland |
Subject: |
_mm_add_ps SIGSEGV |
Date: |
Mon, 05 Jun 2006 15:36:30 +0100 |
User-agent: |
Debian Thunderbird 1.0.2 (X11/20060423) |
Hi, I think this is the most relevant group to post this question to,
appologies if I'm wrong and it's OT here though.
I've been banging my head against the wall with the most basic of
problems trying to make my first code using SSE intrinsics compile today.
Using g++ (GCC) 3.3.5 (Debian 1:3.3.5-13) on a P4 with the following
relevant flags showing up in /proc/cpuinfo "sse sse2".
My first thought was that I had some how done something wrong with the
alignment - I'm using template specialization to facilitate this, so I
added the following asserts just before the offending code:
assert(__alignof__(__m128) == __alignof__(this->data[0]));
assert(__alignof__(__m128) == __alignof__(o.data[0]));
It's still giving me segfaults here though, so I've attached the output
of gdb here:
Program received signal SIGSEGV, Segmentation fault.
0x0804a661 in arflib::Array<float>::add (this=0x804f4ac, o=@0x804f4b4)
at arflib_sse2_functions.h:8
8 _mm_add_ps(this->data[i], o.data[i]);
(gdb) print o.data[i]
$1 = {435, 32, 235, 1}
(gdb) print this->data[i]
$2 = {435, 32, 235, 1}
(gdb) print this->data
$3 = (__m128 *) 0x8050978
(gdb) print o.data
$4 = (__m128 *) 0x80509b0
By the way this dump doesn't show it, but i is 0 here, so it exactly
corresponds to the assert statements previously.
Can anyone shed some light on my (presumably very daft) mistake here?
Thanks for any help,
Alan
- _mm_add_ps SIGSEGV,
Alan Woodland <=