Re: choice of operation (-- or =-1)



pete wrote:

A long long time ago,
one of my instructors told me of a system where it was faster
to bitwise xor a register with itself
(resulting with a value of zero in that register),
than it was to assign a value of zero to that register,
but I have never seen a system like that.

<off-topic severity="marginal">

IBM S/360 was like that. As on most systems, there were
several ways to get a zero into a register, but the XR opcode
had the advantage of being a two-byte instruction rather than
a four- or six-byte instruction, and of requiring no memory
reference beyond the instruction fetch itself.

</off-topic>

--
Eric Sosman
esosman@xxxxxxxxxxxxxxxxxxxx
.



Relevant Pages

  • [OT] Re: choice of operation (-- or =-1)
    ... (resulting with a value of zero in that register), ... than it was to assign a value of zero to that register, ... If the instruction refers solely to registers, ... This is common to the point that seeing "mov reg, ...
    (comp.lang.c)
  • Re: void *malloc(size_t num_bytes);
    ... executing the VAX's normal subroutine-call instruction, ... (The startup code was thus at address 2. ... so the two zero bytes at location zero ... forgotten what the register setup was supposed to be, ...
    (comp.lang.c)
  • Re: How does this make you feel?
    ... >> XOR instruction that applies to a 1M range of VM; ... > register gives a memory address, and the second gives a byte-count (up ... in a CPU that has one execution pathway. ... instruction set and the specifics of its addressing modes; ...
    (comp.arch)
  • Re: Designing my own architecture to be simulated in software - need help with the ISA
    ... > memory address range is limited to 16 bits. ... > I'm reserving the HO byte of the word for the instruction type, ... The register operands are half-bytes in length, ... > sub - store the difference of two registers in a register ...
    (comp.arch)
  • Re: How does this make you feel?
    ... > instruction was added that allowed you to, for instance, extract a column ... >> + Maybe C and UNIX distorted CPU design, ... > supporting interrupts efficiently was a design goal for the transputer. ... behaviour of a conventionally conceieved register. ...
    (comp.arch)