Re: What does the FreeBSD/i386 ABI say about stack alignment?

2011-02-07 Thread Warner Losh
On 01/14/2011 09:42, Warner Losh wrote: On 01/14/2011 01:28, Kostik Belousov wrote: On Thu, Jan 13, 2011 at 04:34:22PM -0700, Warner Losh wrote: On 01/13/2011 13:28, Kostik Belousov wrote: On Thu, Jan 13, 2011 at 12:19:00PM -0500, Ryan Stone wrote: I've been trying to get an application compil

Re: What does the FreeBSD/i386 ABI say about stack alignment?

2011-01-23 Thread Anonymous
Alexander Best writes: >> otaku% ./mplayer ~/filme/wiedhow.mkv >> MPlayer SVN-r32787-4.6.0 (C) 2000-2011 MPlayer Team >> 161 audio & 350 video codecs >> >> Playing /home/arundel/filme/wiedhow.mkv. >> zsh: illegal hardware instruction (core dumped) ./mplayer >> ~/filme/wiedhow.mkv >> otaku% echo

Re: What does the FreeBSD/i386 ABI say about stack alignment?

2011-01-23 Thread Alexander Best
On Sun Jan 23 11, Anonymous wrote: > Alexander Best writes: > > >> otaku% ./mplayer ~/filme/wiedhow.mkv > >> MPlayer SVN-r32787-4.6.0 (C) 2000-2011 MPlayer Team > >> 161 audio & 350 video codecs > >> > >> Playing /home/arundel/filme/wiedhow.mkv. > >> zsh: illegal hardware instruction (core dumped

Re: What does the FreeBSD/i386 ABI say about stack alignment?

2011-01-23 Thread Alexander Best
On Thu Jan 13 11, Alexander Best wrote: > On Thu Jan 13 11, Ryan Stone wrote: > > I've been trying to get an application compiled with gcc 4.5.1 running > > on FreeBSD 8.1, but it's been crashing during startup with a SIGBUS. > > It turns out that the problem is that gcc is issuing SSE > > instruct

Re: What does the FreeBSD/i386 ABI say about stack alignment?

2011-01-14 Thread Warner Losh
On 01/14/2011 01:28, Kostik Belousov wrote: On Thu, Jan 13, 2011 at 04:34:22PM -0700, Warner Losh wrote: On 01/13/2011 13:28, Kostik Belousov wrote: On Thu, Jan 13, 2011 at 12:19:00PM -0500, Ryan Stone wrote: I've been trying to get an application compiled with gcc 4.5.1 running on FreeBSD 8.1

Re: What does the FreeBSD/i386 ABI say about stack alignment?

2011-01-14 Thread Ryan Stone
On Fri, Jan 14, 2011 at 7:52 AM, Peter Blok wrote: > Hi Ryan, > > Well I think gcc should not generate movdqa if it cannot guarantee the area > it is working on is aligned. If the stack is not aligned, it should generate > – probably less efficient – code that works. Well that's the trouble, in L

Re: What does the FreeBSD/i386 ABI say about stack alignment?

2011-01-14 Thread Peter Blok
Hi Ryan, Well I think gcc should not generate movdqa if it cannot guarantee the area it is working on is aligned. If the stack is not aligned, it should generate ­ probably less efficient ­ code that works. What is this area, if it is not a local variable allocated somewhere? Is it some sort of s

Re: What does the FreeBSD/i386 ABI say about stack alignment?

2011-01-14 Thread Ryan Stone
On Fri, Jan 14, 2011 at 3:52 AM, Peter Blok wrote: > Hi, > > I¹m probably missing something but if you require a stack variable to be > aligned why not use a type attribute like __attribute__ ((aligned (8))) > > Peter In my case I had no stack variable that required alignment. gcc issued some mo

Re: What does the FreeBSD/i386 ABI say about stack alignment?

2011-01-14 Thread Kostik Belousov
On Thu, Jan 13, 2011 at 04:34:22PM -0700, Warner Losh wrote: > On 01/13/2011 13:28, Kostik Belousov wrote: > >On Thu, Jan 13, 2011 at 12:19:00PM -0500, Ryan Stone wrote: > >>I've been trying to get an application compiled with gcc 4.5.1 running > >>on FreeBSD 8.1, but it's been crashing during star

Re: What does the FreeBSD/i386 ABI say about stack alignment?

2011-01-14 Thread Peter Blok
Hi, I¹m probably missing something but if you require a stack variable to be aligned why not use a type attribute like __attribute__ ((aligned (8))) Peter On 1/14/11 00:34 AM, "Warner Losh" wrote: > On 01/13/2011 13:28, Kostik Belousov wrote: >> > On Thu, Jan 13, 2011 at 12:19:00PM -0500, Ry

Re: What does the FreeBSD/i386 ABI say about stack alignment?

2011-01-13 Thread Joerg Sonnenberger
On Fri, Jan 14, 2011 at 12:00:52AM +0200, Kostik Belousov wrote: > On Thu, Jan 13, 2011 at 10:57:15PM +0100, Joerg Sonnenberger wrote: > > On Thu, Jan 13, 2011 at 12:19:00PM -0500, Ryan Stone wrote: > > > I've been trying to get an application compiled with gcc 4.5.1 running > > > on FreeBSD 8.1, b

Re: What does the FreeBSD/i386 ABI say about stack alignment?

2011-01-13 Thread Warner Losh
On 01/13/2011 13:28, Kostik Belousov wrote: On Thu, Jan 13, 2011 at 12:19:00PM -0500, Ryan Stone wrote: I've been trying to get an application compiled with gcc 4.5.1 running on FreeBSD 8.1, but it's been crashing during startup with a SIGBUS. It turns out that the problem is that gcc is issuing

Re: What does the FreeBSD/i386 ABI say about stack alignment?

2011-01-13 Thread Ryan Stone
On Thu, Jan 13, 2011 at 3:28 PM, Kostik Belousov wrote: > > Please give this a try. > Your patch resolved the issue for me. Thanks for the quick reply. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hacke

Re: What does the FreeBSD/i386 ABI say about stack alignment?

2011-01-13 Thread Kostik Belousov
On Thu, Jan 13, 2011 at 10:57:15PM +0100, Joerg Sonnenberger wrote: > On Thu, Jan 13, 2011 at 12:19:00PM -0500, Ryan Stone wrote: > > I've been trying to get an application compiled with gcc 4.5.1 running > > on FreeBSD 8.1, but it's been crashing during startup with a SIGBUS. > > It turns out that

Re: What does the FreeBSD/i386 ABI say about stack alignment?

2011-01-13 Thread Joerg Sonnenberger
On Thu, Jan 13, 2011 at 12:19:00PM -0500, Ryan Stone wrote: > I've been trying to get an application compiled with gcc 4.5.1 running > on FreeBSD 8.1, but it's been crashing during startup with a SIGBUS. > It turns out that the problem is that gcc is issuing SSE > instructions(in my case, a movdqa)

Re: What does the FreeBSD/i386 ABI say about stack alignment?

2011-01-13 Thread Kostik Belousov
On Thu, Jan 13, 2011 at 12:19:00PM -0500, Ryan Stone wrote: > I've been trying to get an application compiled with gcc 4.5.1 running > on FreeBSD 8.1, but it's been crashing during startup with a SIGBUS. > It turns out that the problem is that gcc is issuing SSE > instructions(in my case, a movdqa)

Re: What does the FreeBSD/i386 ABI say about stack alignment?

2011-01-13 Thread Alexander Best
On Thu Jan 13 11, Ryan Stone wrote: > I've been trying to get an application compiled with gcc 4.5.1 running > on FreeBSD 8.1, but it's been crashing during startup with a SIGBUS. > It turns out that the problem is that gcc is issuing SSE > instructions(in my case, a movdqa) that assume that the st

What does the FreeBSD/i386 ABI say about stack alignment?

2011-01-13 Thread Ryan Stone
I've been trying to get an application compiled with gcc 4.5.1 running on FreeBSD 8.1, but it's been crashing during startup with a SIGBUS. It turns out that the problem is that gcc is issuing SSE instructions(in my case, a movdqa) that assume that the stack will be aligned to a 16-byte boundary.