From owner-freebsd-sparc Sun Jan 12 13:14:14 2003 Delivered-To: freebsd-sparc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3CBE637B401 for ; Sun, 12 Jan 2003 13:14:13 -0800 (PST) Received: from wall.polstra.com (wall-gw.polstra.com [206.213.73.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D12143F5B for ; Sun, 12 Jan 2003 13:14:12 -0800 (PST) (envelope-from jdp@polstra.com) Received: from strings.polstra.com (strings.polstra.com [206.213.73.20]) by wall.polstra.com (8.12.3/8.12.3) with ESMTP id h0CLEBu4087347; Sun, 12 Jan 2003 13:14:11 -0800 (PST) (envelope-from jdp@polstra.com) Message-ID: X-Mailer: XFMail 1.5.1 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20030112155525.K212@locore.ca> Date: Sun, 12 Jan 2003 13:14:11 -0800 (PST) Organization: Polstra & Co., Inc. From: John Polstra To: Jake Burkholder Subject: Re: Question about odd stack pointer values on sparc64 Cc: sparc@FreeBSD.ORG Sender: owner-freebsd-sparc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Jake Burkholder wrote: > Apparently, On Sun, Jan 12, 2003 at 12:44:44PM -0800, > John Polstra said words to the effect of; > >> In GDB I notice that the stack pointer and frame pointer are often >> (always?) odd numbers, e.g.: [...] > Its because the stack is offset by -2047, to get the real stack pointer > add 2047. Ohhhhh! No _wonder_ M3 hasn't been working right ... > As for reasons why this was done, apparently it allows a larger region > of stack to be addressed with 13 bit immediate offsets, also 32 bit sparc > code doesn't use a stack bias so it can be distinguished by testing the > alignment of the unmodified stack pointer. Makes sense. Thanks for the info! John To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-sparc" in the body of the message