Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Nov 1997 17:59:20 +1030
From:      Mike Smith <mike@smith.net.au>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        freebsd-mobile@FreeBSD.ORG
Subject:   Re: Libretto 50 - US Version and PAO 
Message-ID:  <199711060729.RAA01727@word.smith.net.au>
In-Reply-To: Your message of "Thu, 06 Nov 1997 07:41:06 BST." <1977.878798466@critter.freebsd.dk> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 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?

mike





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711060729.RAA01727>