This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: x86 _Decimal128 return value alignment


> Date: Thu, 22 Sep 2011 22:48:57 +0000 (UTC)
> From: "Joseph S. Myers" <joseph@codesourcery.com>
> 
> On 32-bit x86, _Decimal128 function return values are stored in a
> location whose address is passed as a hidden parameter.  This location
> must be 16-byte aligned.  Although GDB knows about 16-byte alignment
> for parameters, it fails to achieve this for this stack slot,
> resulting in problems if, for example, the function called from GDB
> with a _Decimal128 return value uses an SSE store instruction to
> store the return value.
> 
> This patch fixes this with an appropriate frame_align function, since
> that's the setting used to control alignment of return value slots.
> Tested on i686-pc-linux-gnu.  OK to commit?

Interesting how the ultimate unaligned architecture is slowly turning
into a "strict alignment" architecture.

Anyway, there is no harm in this besides wasting a few bytes on
systems without _Decimal128 support, so sure, go ahead.

> 2011-09-22  Joseph Myers  <joseph@codesourcery.com>
> 
> 	* i386-tdep.c (i386_frame_align): New.
> 	(i386_gdbarch_init): Use i386_frame_align.


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