Retscond – Texas Instruments TMS320C3x User Manual

Page 658

Advertising
background image

RETScond

Return From Subroutine Conditionally

13-200

Syntax

RETS

cond

Operation

If

cond is true:

*SP– –

PC.

Else, continue.

Operands

None

Opcode

31

24 23

16

8 7

0

15

0 1 1 1 1

0

0

1

0

cond

0

0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

Description

A conditional return is performed. If the condition is true, the top of the stack
is popped to the PC.

The ’C3x provides 20 condition codes that you can use with this instruction
(see Table 13–12 on page 13-30 for a list of condition mnemonics, condition
codes, and flags). Condition flags are set on a previous instruction only when
the destination register is one of the extended-precision registers (R7–R0) or
when one of the compare instructions (CMPF, CMPF3, CMPI, CMPI3, TSTB,
or TSTB3) is executed.

Cycles

4

Status Bits

LUF

Unaffected

LV

Unaffected

UF

Unaffected

N Unaffected
Z

Unaffected

V

Unaffected

C

Unaffected

OVM

Operation is not affected by OVM bit value.

Mode Bit

Advertising