From owner-freebsd-mobile Thu Nov 6 04:43:27 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id EAA11147 for mobile-outgoing; Thu, 6 Nov 1997 04:43:27 -0800 (PST) (envelope-from owner-freebsd-mobile) Received: from critter.freebsd.dk (critter.freebsd.dk [195.8.129.26]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id EAA11142 for ; Thu, 6 Nov 1997 04:43:24 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost.cybercity.dk [127.0.0.1]) by critter.freebsd.dk (8.8.7/8.8.7) with ESMTP id NAA00480; Thu, 6 Nov 1997 13:41:32 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Mike Smith cc: freebsd-mobile@FreeBSD.ORG Subject: Re: Libretto 50 - US Version and PAO In-reply-to: Your message of "Thu, 06 Nov 1997 17:59:20 +1030." <199711060729.RAA01727@word.smith.net.au> Date: Thu, 06 Nov 1997 13:41:32 +0100 Message-ID: <478.878820092@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-mobile@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk In message <199711060729.RAA01727@word.smith.net.au>, Mike Smith writes: >> In message <199711060121.LAA00464@word.smith.net.au>, Mike Smith writes: >> >> >One thing I was wondering; does >> > >> >pnp_func(u_int16_t a, u_int16_b) >> > >> >construct the stack properly, or will we still get int-sized objects on >> >the stack? >> >> You still get 32bit stuff on the stack. C promotes them. > >As Shakespeare would have said, "Puck". > >Alright, let's try something even more ugly. > >/* > * pnpcall(int dseg, int coffs, int cseg, > * int retoffs, int retseg, u_int_16 stack[PNP_MAXSTACK]) > * pass (retoffs) and (retseg) in as junk. > */ >ENTRY(pnpcall) > movl %cs,%di > movl %di,(5*4)(%esp) > movl pnpret,(4*4)(%esp) > popl %di > movl %di,%ds > lret >pnpret: /* fossick return value etc. */ > >About all I can see here is that we don't save any registers across >the call, which might be Bad. > >Comments? Uhm, the "popl %di" comes from the wrong stack, right ? -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop."