Date: Thu, 01 Feb 1996 02:30:47 -0800 From: David Greenman <davidg@Root.COM> To: KATO Takenori <kato@eclogite.eps.nagoya-u.ac.jp> Cc: current@FreeBSD.org Subject: Re: TSS broken Message-ID: <199602011030.CAA01387@Root.COM> In-Reply-To: Your message of "Mon, 01 Jan 1996 11:50:18 %2B0900." <199601010250.LAA00929@marble.eps.nagoya-u.ac.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
>In recent change of sys/i386/i386/swtch.s, the code > movl %esp,PCB_ESP(%ecx) >is changed into > leal 4(%esp),%eax > movl %eax,PCB_ESP(%ecx) >(in savectx). > >After this operation, the member tss_esp points not user stack >pointer, but the address of TSS. > >This may causes panic when swapper is activated. I just read the above again a few times and I think I see now the misunderstanding. The "leal" instruction moves the _address_ of its argument. In this case, %esp+4. It is similar to: movl %esp,%eax addl $4,%eax movl %eax,PCB_ESP(%ecx) The only difference being that leal is faster and also doesn't affect the condition codes like the addl does (although in this case it doesn't matter since we're not using them). -DG David Greenman Core Team/Principal Architect, The FreeBSD Project
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602011030.CAA01387>