Subject: Re: struct ivec_dsp
To: Matt Thomas <matt@3am-software.com>
From: Anders Magnusson <ragge@ludd.luth.se>
List: port-vax
Date: 11/21/1999 12:22:35
>
> 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.
>
This would be a great change! I don't think that one extra added insn
will hurt anyone :-)
But a small look at the code shows that you have some typos there, I think.
The:
.word 0x9f17
should probably be
.word 0x9f16 (jsb @l^)
and the
movl -(sp),r0
should be
movl (sp)+,r0
I like this very much. Great idea!
-- Ragge