Sxta.x, Sign-extension (agu), Description – Freescale Semiconductor StarCore SC140 User Manual

Page 716: Example 1, Example 2, Operation assembler syntax

Advertising
background image

A-402

SC140 DSP Core Reference Manual

SXTA.x

SXTA.x

Sign-Extension (AGU)

SXTA.x

Description

These operations sign-extend an AGU register (address or offset register, program counter, or stack
pointer). The sign bit (bit 7 in a byte or bit 15 in a word) is copied to the upper bits in a 32-bit AGU
register.

Status and Conditions that Affect Instruction

Status and Conditions Changed by Instruction

None.

Example 1

sxta.b r3,r1

Example 2

sxta.w r3

Operation

Assembler Syntax

rx[7:0]

→ Rx[7:0]; rx[7] → Rx[31:8]

SXTA.B rx,Rx

Rx[15]

→ Rx[31:16]

SXTA.W Rx

SXTA.B rx,Rx

Sign-extends a byte from a source AGU register (rx[7:0]) into a destination AGU register (Rx).

SXTA.W Rx

Sign-extends a word from a source AGU register (Rx[15:0]) into a destination AGU register (Rx).

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.

Register/Memory Address

Before

After

R3

$0000 2086

R1

$FFFF FF86

Register/Memory Address

Before

After

R3

$03BC 8A56

$FFFF 8A56

Advertising