From owner-freebsd-hackers Thu Apr 25 10:14:53 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by hub.freebsd.org (Postfix) with ESMTP id CD2A737B419 for ; Thu, 25 Apr 2002 10:14:45 -0700 (PDT) Received: (qmail 596 invoked from network); 25 Apr 2002 17:14:44 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail12.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 25 Apr 2002 17:14:44 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.11.6/8.11.6) with ESMTP id g3PHEiv11043; Thu, 25 Apr 2002 13:14:44 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <15560.14613.989930.797068@grasshopper.cs.duke.edu> Date: Thu, 25 Apr 2002 13:13:53 -0400 (EDT) From: John Baldwin To: Andrew Gallatin Subject: Re: pushal & ebp Cc: freebsd-hackers@FreeBSD.ORG, Kenneth Culver Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 25-Apr-2002 Andrew Gallatin wrote: > > Kenneth Culver writes: > > > I just looked at the NetBSD code & like linux, they use a macro which > > > individually pushes the registers onto the stack rather than using > > > pushal (which I assume is the same as what intel calls PUSHAD in their > > > x86 instruction set ref. manual). > > > > > > NetBSD stopped using pushal in 1994 in rev 1.85 of their > > > arch/i386/i386/locore.s in a commit helpfully documented > > > "Don't use pusha and popa." > > > > > > Does anybody know why the other OSes push the registers individually, > > > rather than using pushal? Could our using pushal be causing Kenneth's > > > ebp to get lost, or is this just a red herring? > > > > > > Thanks, > > > > > > Drew > > > > > > > > > > > according to the intel docs, pushad (or what I'm assuming is pushal in our > > case) pushes eax, ecx, edx, ebx then pushes some temporary value (the > > original esp I think) then pushes ebp, esi, and edi: > > > > this is from the documentation for pushad > > > > IF OperandSize = 32 (* PUSHAD instruction *) > > THEN > > Temp (ESP); > > Push(EAX); > > Push(ECX); > > Push(EDX); > > Push(EBX); > > Push(Temp); > > Push(EBP); > > Push(ESI); > > Push(EDI); > > > > so could this be the problem? > > > > Ken > > I don't think so. The temp its pushing is the stack pointer. If you > look at the layout of the trap frame, then you'll see tf_isp comes > between tf_ebp & tf_ebx. I assume tf_isp is the stack pointer, so > that should be OK.. Right. > Drew -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message