Date: Sun, 26 Sep 2004 13:41:07 +0800 From: David Xu <davidxu@freebsd.org> To: freebsd-current@freebsd.org Subject: Interesting code in exec_setregs Message-ID: <41565673.7050504@freebsd.org>
next in thread | raw e-mail | index | archive | help
I found following code in sys/i386/i386/machdep.c: function exec_setregs: bzero((char *)regs, sizeof(struct trapframe)); regs->tf_eip = entry; regs->tf_esp = stack; regs->tf_eflags = PSL_USER | (regs->tf_eflags & PSL_T); the regs is cleared to zero, why do we bother to test it again ? regs->tf_eflags & PSL_T is useless code. AMD64 also has this, I also found it in releng_4, why ? David Xu
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41565673.7050504>