SUBA

SUBA

Subtract (AGU)

Operation

Assembler Syntax

SUBA

Rx – #u5 → Rx

SUBA

#u5,Rx {0 u5 < 64}

Rx – rx → Rx

SUBA

rx,Rx

Description

This instruction subtracts an immediate or an AGU register from another AGU register. For R0-R7 destinations, this instruction is affected by the modifier mode selected in MCTL.

SUBA #u5,Rx

Subtracts an immediate unsigned 5-bit integer from an AGU register (Rx) and stores the result in the same register. If the stack pointer is the destination operand, then the immediate value must be a multiple of eight since the resulting 3 LSBs are forced to zero.

SUBA rx,Rx

Subtracts one AGU register (rx) from another (Rx) and stores the result in the destination AGU register (Rx). If the stack pointer is the destination operand, then the value in rx must be a multiple of eight since the resulting 3 LSBs are forced to zero.

Status and Conditions that Affect Instruction

Register Address

Bit Name

Description

SR[18]

EXP

Determines which stack pointer is used when the stack pointer is an

 

 

operand. Otherwise, the instruction is not affected by SR.

MCTL[31:0]

AM3–AM0

Address modification bits when updating R0–R7. Otherwise, the

 

 

instruction is not affected by MCTL.

Status and Conditions Changed by Instruction

None.

Example

suba r1,r0

Register/Memory Address

MCTL

R1

R0

Before

$0000 0000

$0000 0001

$0000 0010

After

$0000 000F

A-394

SC140 DSP Core Reference Manual

Page 708
Image 708
Freescale Semiconductor SC140 specifications Subtract AGU, Suba r1,r0, Suba #u5,Rx, Suba rx,Rx