From: "Tom Harper" <[email protected]>
Sent: Saturday, April 16, 2022 12:34 AM
Subject: Re: Next instruction needed
Robin,
See embedded remarks.
See mine.
MVCL will do what you want.
It was designed to do the operation without overruns.
The lengths of the source and the destination areas are both
specified in the relevant registers, and the move terminates
when the destination area has been filled.
The true lengths of the data areas are given in registers,
and MVCL will even deal with zero lengths.
It's a dream instruction.
What's more, the 3 or 4 registers needed for MVCL can be loaded
by a single instruction.
The most common use of MVCL is to move some text to a destination
area, and to pad that area with a given character (commonly blank,
not zero), if required.
To set an area to zeros is not something that's done frequently.
I would say, almost never.
Your objection to MVCL needing 3 registers for your special case
(rarely needed) is specious; that 3 registers are not often available,
also specious; other instructions need 3 registers, such as MR, DR,
BXH, BXLE, and other instructions need 2 registers e,g, BCTR,
SLDA, SRDA, etc.
See below for interspersed replies.
Tom
On Apr 15, 2022, at 5:08 AM, Robin Vowels <[email protected]> wrote:
----- Original Message ----- From: "Tom Harper" <[email protected]>
To: <[email protected]>
Sent: Friday, April 15, 2022 3:06 AM
IMHO, the next instruction to add to z/Architecture would be an instruction to clear storage to
zeros.
Who needs it? I cannot recall ever seeing a program that ever did that.
Nor ever needed it.
Right now a number of methods are in widespread use,
Really?
none of which are clean and simple. I mean, it’s been almost sixty years.
MVCL takes three registers to set up beforehand;
So? Write yourself a macro.
Of course a macro can be written. But that’s not the point. Three registers will have to be loaded
and that takes time and the registers are not always easily available.
Three registers are always easily available.
Think about MR, DR, BXH, BXLE, LM, etc.
XC sets the condition code and is not variable length, and the overlapping MVC
is a kluge
But it does the job well.
Except that it can only handle fixed length without an execute instruction which is a poor
performer.
There is another way to do it.
Also needlessly sets the condition code which slows down the processor.
Rubbish.
and not variable length either.
Use Ex.
A poor performer.
An EX instruction is also a kluge.
All you need is the address and length to accomplish this, preferably in two
versions,
one with an immediate operand for the length
Really?! A few lines ago, you were decrying XC and MVC because they have a "fixed
length".
They are fixed length unless you use an execute instruction.
There are other ways.
and another which uses, for example, a register, perhaps register zero. A long displacement
would be a plus.
To avoid issues with interruptibility, the length would need to be limited to
256 bytes.
What? Back to a limit of 256? what's the point of that?
MVCL will do as long as you want.
Yes it will. But a common need is for shorter lengths.
I don’t think the length restriction would be an issue in most cases.
There's no point in having an instruction with a length restrictionof 256.
I’ve been doing this for a very long time and I will respectfully disagree with
you.
There are frequent cases to clear fields of 256 bytes or less.
I disagree.
The most frequent case is to move some text into a field and to blank fill the
remainder of the destination area, for which MVCL is an ideal instruction.
Such an instruction might look like this:
CLEAR FieldA
Or
LLGF R0,Varlen
CLEARR
A macro reference would require one require one line.
True, but not relevant.
I disagree. It's precisely relevant.
The purpose of this instruction is to have a simple instruction that performs a
frequently used
function that the processor can execute quickly.
I disagree that it is "a frequently used function". See above.
Similar instructions for compare logical and move would be nice as well.
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus