Subject: struct ivec_dsp
To: None <port-vax@netbsd.org>
From: Matt Thomas <matt@3am-software.com>
List: port-vax
Date: 11/20/1999 22:48:16
One thing I've always disliked about BSD on the VAX
was that interrupt routines are called with a small integer.
On other more modern ports, interrupts are called with a 
void * context.

The problem is that ivec_dsp is 16 bytes and there's just
so much code you can fit in 16 bytes (event on a vax).

Currently the code looks like:

	pushr	$0x3f
	pushl	$1
	nop
	calls	$1, $*0x12345678
	popr	$0x3f
	rei

I'd like to change it to:

	pushr	$0x3f			; 2 bytes
	.word	0x9f17			; 2 bytes (jmp @l^)
	.long	cmnidsptch		; 4 bytes
	.long	rtn			; 4 bytes
	.long	arg			; 4 bytes

and then have this common code:

cmnidsptch:
	movl	-(sp),r0
	pushl	4(r0)
	calls	$1,*(r0)
	popr	$0x3f
	rei

While this is slightly longer than the current code, it eliminates
a lot of foo_cd.cd_dev[unit] lookups and dispatches to the real interrupt
routine.

Comments?

-- 
Matt Thomas               Internet:   matt@3am-software.com
3am Software Foundry      WWW URL:    http://www.3am-software.com/bio/matt/
Cupertino, CA             Disclaimer: I avow all knowledge of this message