MAXM

MAXM Transfer Maximum Absolute Value (DALU) MAXM

Operation

Assembler Syntax

If⏐Dg⏐ > ⏐Dh⏐, then Dg → Dh

MAXM Dg,Dh

If Dg == –Dh, then ⏐Dg⏐→ Dh

 

Description

 

MAXM Dg,Dh

 

Compares the absolute values of a data register pair (Dg and Dh). If the absolute value of the first register (Dg) is greater than the absolute value of the second (Dh), the value of the first register is written to the second (Dh). Otherwise, the second register is unchanged. In case Dg and Dh have equal magnitudes but opposite signs, the destination register Dh is written with the positive value.

Status and Conditions that Affect Instruction

None.

Status and Conditions Changed by Instruction

Register Address

Bit Name

Description

Ln

L

Clears the Ln bit in the destination register.

Example

maxm d2,d6

Register/Memory Address

D2

L6:D6

$FFDD = –35, $0022 = +34

Before

$FF FFFF FFDD

$0:$00 0000 0022

After

$0:$FF FFFF FFDD

Instruction Formats and Opcodes

Instruction

Words

Cycles

Type

MAXM Dg,Dh

1

1

1

Note: ** indicates serial grouping encoding.

Opcode

158 70

0 * 1 0 1 1 G G 0 1 1 1 1 1 1 0

SC140 DSP Core Reference Manual

A-251

Page 565
Image 565
Freescale Semiconductor SC140 Maxm Transfer Maximum Absolute Value Dalu Maxm Operation, Maxm d2,d6, Maxm Dg,Dh