From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26640 invoked by alias); 23 Sep 2011 08:11:11 -0000 Received: (qmail 26630 invoked by uid 22791); 23 Sep 2011 08:11:08 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Sep 2011 08:10:55 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id p8N8AlZV017438; Fri, 23 Sep 2011 10:10:47 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id p8N8Ajst014183; Fri, 23 Sep 2011 10:10:45 +0200 (CEST) Date: Fri, 23 Sep 2011 08:31:00 -0000 Message-Id: <201109230810.p8N8Ajst014183@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: joseph@codesourcery.com CC: gdb-patches@sourceware.org In-reply-to: (joseph@codesourcery.com) Subject: Re: x86 _Decimal128 return value alignment References: Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-09/txt/msg00423.txt.bz2 > Date: Thu, 22 Sep 2011 22:48:57 +0000 (UTC) > From: "Joseph S. Myers" > > 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 > > * i386-tdep.c (i386_frame_align): New. > (i386_gdbarch_init): Use i386_frame_align.