From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: X-Archive-Original-Message-ID: <199610171003.KAA00502@linux.reo.dec.com> Date: Thu, 17 Oct 1996 11:00:53 +0100 (MET) From: Ingo Molnar Subject: Re: Linux-2.1.4 In-Reply-To: On Thu, 17 Oct 1996, Linus Torvalds wrote: [cool description about the new exception logic] > And eventually, when the exception code has matured, I can actually remove > the "sanity check" code, and then the exception count tests are not needed > any more, so the above shrinks down to just > > movl $1f,%edx /* tell the exception code where to abort */ > movl xxxx,%eax /* get the value */ > xorl %edx,%edx /* no error if we got here */ > 1: could it be optimized even one step further? We could do the following: movl xxxx,%eax /* get the value */ the exception handler could maintain a cross-table that identifies EIPs and abort points. It would do something like this: jmp UGLY_AS_HELL_BUT_FAST_AS_LIGHTNING_CROSSJUMP_TABLE[exception_eip] This the complexity of deciding what to do is pushed one step further into the exception handler routines. And we would need even more ugly macroes that set up this table ... but it looks reasonable for the first sight. [ actually, we possibly dont even need such a table, the exception code could just do a very simple (and fast) deassembly of the exception EIP, and could decide where to jump ] [ and who cares about exception handling complexity ... bad guys should pay their price for a -EFAULT ] > It's the RISC philosophy: make the basic operations simple, and do them > extremely quickly. Complex operations might be slower, but complex operations > are relatively rare. lets push it to the extreme ... -- mingo -- To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null