Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: POLYx addressing-mode questions



On 2020-08-08 21:21, Mouse wrote:
;>>> Which models of VAX have POLY instructions?
Assuming the list in appendix B of the VARM I have is (a) accurate
and (b) comprehensive, every VAX includes POLY support for every
floating-point type it supports.
I always learn stuff from port-vax@ :)

:-)

Perhaps I was thinking that the POLY instructions were some of the
ones that only certain CPUs have and were covered by NO_INSN_EMULATE,

I thought so too.

but if all VAX CPUs with floating point support POLY, then I'm happy
to run any tests you like on my VLC.

I'm fairly sure the VLC was not listed in the appendix I cited; it
probably postdates that document.  It would not surprise me if the
POLYx instructions _were_ emulated.  However, for this question, that
doesn't matter, as long as you have emulation.  Operand evaluation,
including the difference between .ab and .af/.ad/etc, occurs before the
emulation trap is taken.  I checked emulate.S on 5.2 and the most
recent version on cvsweb.netbsd.org and both appear to lack emulation
code for any of the POLYx instructions, so if they're emulated and
you're on NetBSD, you won't get very far.

The test would basically amount to something like this (NetBSD assembly
syntax):

tbl:
	.float	0
	.float	0
	.float	1
	.float	0
	.float	0
	.float	4

	...
	movab	tbl,r6
	movl	$4,r7
	clrl	r8
	polyf	r8, $1, (r6)[r7]
	...inspect r0 as an F-float - is it 1 (.ab) or 4 (.af)?

I'm not sure this was coded exactly correct, but I agree with the idea. And it ought to be 1. Because the last argument is not a pointer to a F-float, but to a table. The table might contain F-floats, but the argument is still a pointer to the table as such.
So, for me, .ab makes total sense.

  Johnny

--
Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt%softjar.se@localhost             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol


Home | Main Index | Thread Index | Old Index