From owner-freebsd-hackers Tue Dec 10 7:51:10 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D461737B404 for ; Tue, 10 Dec 2002 07:51:09 -0800 (PST) Received: from msgbas2x.cos.agilent.com (msgbas2x.cos.agilent.com [192.25.240.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 129C543ED1 for ; Tue, 10 Dec 2002 07:51:09 -0800 (PST) (envelope-from ctuffli@rose.agilent.com) Received: from relcos1.cos.agilent.com (relcos1.cos.agilent.com [130.29.152.239]) by msgbas2x.cos.agilent.com (Postfix) with ESMTP id 1105D18FB for ; Tue, 10 Dec 2002 08:51:03 -0700 (MST) Received: from rtl.rose.agilent.com (rtl.rose.agilent.com [130.30.179.189]) by relcos1.cos.agilent.com (Postfix) with ESMTP id 16D8C365 for ; Tue, 10 Dec 2002 08:51:01 -0700 (MST) Received: from mail.rose.agilent.com (mailsrv@bellhop [130.30.179.19]) by rtl.rose.agilent.com (8.9.3 (PHNE_18979)/8.9.3 SMKit7.1.0) with ESMTP id HAA17827 for ; Tue, 10 Dec 2002 07:50:59 -0800 (PST) Received: from thegrail (anu.rose.agilent.com [156.140.225.186]) by mail.rose.agilent.com (Netscape Messaging Server 3.6) with ESMTP id AAA20A0 for ; Tue, 10 Dec 2002 07:50:56 -0800 Received: by thegrail (Postfix, from userid 1001) id B80058464B; Tue, 10 Dec 2002 07:46:36 -0800 (PST) Date: Tue, 10 Dec 2002 07:46:36 -0800 From: Chuck Tuffli To: freebsd-hackers@freebsd.org Subject: registers not saved Message-ID: <20021210154635.GC605@thegrail.rose.agilent.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i 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 I've been chasing down some weird panics in my CAM driver and have noticed that functions don't seem to save all register values before they modify them. For example, function A uses register ecx to hold the value of a pointer. Part way through, function A calls function B which uses ecx as a loop index. The bad part is function B never saves/restores the value of ecx and function A starts dereferencing garbage. An informal sampling of my driver seems to indicate that ebx gets pushed/poped at entry/exit but ecx and edx don't. Does any of this sound familiar? Thanks! -- Chuck Tuffli Agilent Technologies, Storage and Networking To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message