From owner-freebsd-hackers Thu Apr 25 7:22:28 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id 7E49037B42C; Thu, 25 Apr 2002 07:22:15 -0700 (PDT) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id KAA26894; Thu, 25 Apr 2002 10:22:04 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.6/8.9.1) id g3PELYj94848; Thu, 25 Apr 2002 10:21:34 -0400 (EDT) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15560.4334.821343.177003@grasshopper.cs.duke.edu> Date: Thu, 25 Apr 2002 10:21:34 -0400 (EDT) To: Kenneth Culver Cc: Peter Wemm , John Baldwin , freebsd-hackers@FreeBSD.ORG Subject: pushal & ebp In-Reply-To: <20020424215718.F40543-100000@alpha.yumyumyum.org> References: <20020424210936.S40254-100000@alpha.yumyumyum.org> <20020424215718.F40543-100000@alpha.yumyumyum.org> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid 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 Kenneth Culver writes: > So, as far as I can tell, this version of glibc is doing the Right Thing, > and the ebp register is getting messed up somewhere along the line in > either the assembly code that handles the 0x80 trap in FreeBSD, or in > syscall2 (I think it's probably the asm that handles the 0x80 trap)... > > Can anyone confirm this? 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message