[comp.arch] Am29000 Reg-Reg Move?

jim@felix.UUCP (Jim Gilbert) (12/31/87)

From my casual perusal of the Am29000 instruction set I notice no
convenient register-to-register move in one cycle.  I strongly suspect
I have overlooked something.

Upon reflection however, it may be that with 192 registers and three
operand addressing that the need for register to register moves does
not exist.

Would one of you folks from AMD comment on this?  I would be interested in
hearing from Tim Olson or Brian Case (now at Apple) regarding:

	Is there a single instruction, no preconditions, no side-effect,
	register to register move?  (I can contemplate EXTRACTing from
	destination to source, but that requires FC in ALU status word to
	be preset.)

	If not, did your discussions with compiler folks convince you
	that a register to register move was needless?  Is there prior
	research to this effect?

Thank you, in advance, for your time.

Jim Gilbert
FileNet Corporation
3565 Harbor Boulevard
Costa Mesa, CA 92626	

...{ihnp4,decvax,ucbvax}!{trwrb,hplabs}!felix!jim

tim@amdcad.AMD.COM (Tim Olson) (01/01/88)

In article <17473@felix.UUCP> jim@fritz.UUCP (Jim Gilbert) writes:
| 
| From my casual perusal of the Am29000 instruction set I notice no
| convenient register-to-register move in one cycle.  I strongly suspect
| I have overlooked something.
|
| Upon reflection however, it may be that with 192 registers and three
| operand addressing that the need for register to register moves does
| not exist.

Yes, a large number of registers and 3-address operations reduce the
need for register-to-register copies.  They tend to be used mainly when
a local variable (in a register) is passed as a parameter to a function
without being used in an expression, or when return results are moved
directly into a local register without further computation. 

The status register, which is affected by most arithmetic and logical
operations, is not used in normal operation (its main purpose is to aid
emulation of other processors).  Branch conditions are computed
explicitly into registers with compare instructions.  Therefore,

	add	dest, source, 0

or
	or	dest, source, 0

can be used as a register-to-register move.

| Is there a single instruction, no preconditions, no side-effect,
| register to register move? (I can contemplate EXTRACTing from
| destination to source, but that requires FC in ALU status word to
| be preset.)

If you really want no side-effects you can use any of the shift
instructions, for example:

	sll	dest, source, 0

as they do not update the status register.


	-- Tim Olson
	Advanced Micro Devices
	(tim@amdcad.amd.com)

crick@bnr-rsc.UUCP (Bill Crick) (01/09/88)

<Jim Gilbert asks how to do a reg-reg move on the 29000?

Try ORing the source with the 0 register into the desired destination. I 
 am assumming the 29000 has a hardwired 0 register?    Bill Crick



Computo, Ergo Sum! (V Pbzchgr, Gurersber, V Nz!)