SXTA.x

SXTA.x

Sign-Extension (AGU)

SXTA.x

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

 

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.

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).

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.

Status and Conditions Changed by Instruction

None.

Example 1

sxta.b r3,r1

Register/Memory Address

R3

R1

BeforeAfter

$0000 2086

$FFFF FF86

Example 2

sxta.w r3

Register/Memory Address

R3

Before

$03BC 8A56

After

$FFFF 8A56

A-402

SC140 DSP Core Reference Manual

Page 716
Image 716
Freescale Semiconductor SC140 specifications Sign-Extension AGU, Sxta.b r3,r1, Sxta.w r3