This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: target/9290: incorrect alignment when using SSE on ia32


The following reply was made to PR target/9290; it has been noted by GNATS.

From: Tim Prince <timothyprince@sbcglobal.net>
To: mark@cal005304.student.utwente.nl, gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: target/9290: incorrect alignment when using SSE on ia32
Date: Mon, 13 Jan 2003 04:33:43 -0800

 On Monday 13 January 2003 03:42, mark@cal005304.student.utwente.nl wrote:
 > >Number:         9290
 > >Category:       target
 > >Synopsis:       incorrect alignment when using SSE on ia32
 
 > I have been testing the __builtin_ia32_ sse functions on the gcc-3.3
 > compiler. For the most part the results look promising, except the
 > alignment is incorrect. See the attached example, I've tried everything I
 > could think of to get the alignment working. Line "1f" in the disassembly
 > causes a segfault.
 >
 > compiled with:
 > gcc -march=pentium3 -msse -O3 -c sse_bug.cpp -mpreferred-stack-boundary=4
 >
 > gcc-version:
 > Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs
 > Configured with: ../gcc-20030106/configure
 > Thread model: posix
 > gcc version 3.3 20030106 (prerelease)
 >
 > ------ Source code --------------------------------------------------------
 > typedef int __m128 __attribute__ ((__mode__(__V4SF__)));
 >
 > class sse_t {
 >         __m128 d __attribute__((aligned(16)));
 > public:
 >         sse_t();
 >         sse_t operator=(sse_t const &o) { d=o.d; }
 > };
 >
 > class Contour {
 >         sse_t test;
 > public:
 >         Contour();
 > };
 >
 > Contour::Contour()
 > {
 >         sse_t z __attribute__ ((aligned(16)));
 >
 >         test=z;
 > }
 >
 Don't data objects need to be allocated within a method which is called from 
 one which is built with -mpreferred-stack-alignment=4, in order for gcc to 
 apply alignment?  
 
 -- 
 Tim Prince


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]