Port-vax archive

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

Re: New Vax - future directions :-)



On 2021-07-06 11:28, Anders Magnusson wrote:

If you have two 64-bit values which you multiply, there is a fair chance the result will not fit into 64 bits, and a carry won't be enough to handle the overflow. :-) Then what? Just give up. Leave it all to be done in software? Or add some instruction that can assist you?
Yes, do it in software.  You don't have any modern language that want to deal with the upper part anyway.

Ok. Fair enough. That wasn't a very meaningful example or question. (Well, it's meaningful sometimes to assembler programmers, but hardly for any higher level language.) But for the VAX32, having support allowing for efficient multiplication of 64-bit values is something I see value in. I sortof see the same for a VAX64 to efficiently deal with 128 bit multiplications as well. But as this does not extend to larger values, maybe it's questionable how much value it do have in the end.
A side note: There is a very interesting part of the instruction set that I think should be investigated more - the packed decimal instructions. Those will in fact implement arbitrary precision in hardware, which could be really nice to have when doing things like crypto calculations etc...

That's an interesting view. I've always looked at the packed decimal stuff as mostly targeted at Cobol and financial applications.

You need to remember, though, that packed decimal strings have at most 31 digits. So not entirely arbitrary. (Hmm, not entirely sure if it is 31 digits, or 31 bytes...)

  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