Excalibur electronic A-MNL-NIOSPROG-01.1 DJ Equipment User Manual


 
70 Altera Corporation
32-Bit Instruction Set
MSTEP
Multiply-Step
Operation:
If (R0[31] = = 1)
then R0 (R0 << 1)+ RA
else R0 (R0<< 1)
Assembler Syntax: MSTEP %rA
Example: MSTEP %g1 ; accumulate partial-product
Description: Implements a single step of an unsigned multiply. The multiplier in %r0 and
multiplicand in RA. Result is accumulated into %r0. RA is not affected.
The following code fragment implements a 16-bit × 16-bit into 32-bit multiply. On
entry, %r0 and %r1 contain the multiplier and multiplicand, respectively. The
result is left in %r0.
SWAP %r0 ; Move multiplier into place
MSTEP %r1
MSTEP %r1
MSTEP %r1
A total of 16 MSTEPs
MSTEP %r1
; 32-bit product left in %r0
Condition Codes: Flags: Unaffected
Instruction Format: Rw
Instruction Fields: A = Register index of operand RA
1514131211109876543210
01111110100 A
NVZC
−−−−