From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Miguel A. Bolanos" Subject: Re: reducing Elks code size... Date: 22 Feb 2003 14:57:27 -0600 Sender: linux-8086-owner@vger.kernel.org Message-ID: <1045947448.2621.100.camel@nemesis> References: <200302212242.00571.a.martone@retepnet.it> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200302212242.00571.a.martone@retepnet.it> List-Id: Content-Type: text/plain; charset="us-ascii" To: a.martone@retepnet.it Cc: linux-8086@vger.kernel.org Greetings, On Fri, 2003-02-21 at 16:10, Alfonso wrote: > This file: > > elks/arch/i86/286pmode/irq.s > > may be reduced to save 564 bytes (!!) of code. This is not a massive > optimization process. It just saves space by pushing a value on the > stack and jumping to a generic routine instead of repeating the entire > sequence every time (like elks/arch/i86/kernel/irqtab.c), so that its > final code size is 0x00B6 bytes instead of 0x02EA bytes (I still > wonder why the irq.s file was written in that weird mode). The do_exc > routine in the file elks/arch/i86/kernel/main.c does not need changes: > the bp register is changed (to get again the saved exception/interrupt > value) but the stack (with all parameters) remains the same. > This looks fine, nice work really. Would you like to sent out a patch in stead of the code? :) regards Mike