From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Junker Subject: Re: Compilers Date: Sat, 29 May 2004 13:42:44 +0200 Sender: linux-8086-owner@vger.kernel.org Message-ID: <40B87734.6050109@gmx.de> References: <200405281142.38116.dg@cowlark.com> <20040528144700.GH21172@duckman.distro.conectiva> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20040528144700.GH21172@duckman.distro.conectiva> List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: linux-8086@vger.kernel.org Eduardo Pereira Habkost schrieb: > > _fnord: > push %bp > mov %sp,%bp > > movw 2(%bp),%dx should be "movw 4(%bp),%dx" > movw $0x0,%ax > cmpw $0x0,%dx > je .L15 > .L13: > addw %dx,%ax > addw $0xffffffff,%dx should be: addw $0xffff,%dx $0xffffffff is a 32 bit constant > cmpw $0x0,%dx > jne .L13 > .L15: > > leave "leave" is only available on 186+ > ret > > Some things that can be noted: There is not 'dec' instruction, yet. It > can be added. It is using 'leave' for function exit. IIRC, it is a > 80186 instruction, so it is better have an option to use is better have > an option for the user choosing to use it or not. You're right. > One bug appeared: it is using 2(%bp) for getting the function > parameter. It doesn't look correct. :) Again, you're right. It's not correct > A -fno-frame-pointer option would be nice, too. I guess that most people > wouldn't want them on ELKS, and it will make code smaller and use less > stack space. This can (sometimes) produce smaller code. Regards, Mark Junker