On Tue, Aug 26, 2008 at 01:53, Benjamin Huntsman
<[EMAIL PROTECTED]> wrote:
> Anyone around here still familiar with Alpha assembler (and the Alpha kernel
> in general) willing to point me in the right direction?
>
> Supposing one wanted to implement instruction emulation for the BWX
> extensions, etc, like Tru64 and OpenVMS do, so that you can run the same
> binaries on EV4 and EV5, where would be the best place to hook in? illegal0
> in /sys/src/9/alphapc/l.s or illegal in /sys/src/9/alphapc/trap.c?
>
> Furthermore, how would one obtain the faulting instruction? Best I can tell,
> it's the Ureg *ur passed to illegal in trap.c or 8(R30) from illegal0.
>
> Thanks in advance!
>
> -Ben
>
I think trap.c would be easier to work with or extend to other
instructions, l.s might give better performance. PALcode would be
probably the best option if it was properly patched during boot, but I
don't know where one might get apropriate SDK nowadays.
Anyway, If you want to check your code on an old Avanti-based EV45
Alpha, I am of service (unless I'll have to get rid of it when I move
to Scotland...)
Good luck with Alpha hacking, and remember about memory barriers...
("Program Counter is not reliable source of information about which
instruction caused the exception" - It's like a mantra in Alpha
manuals...)
--
Paweł Lasek