Freescale Semiconductor SC140 specifications Asl d0,d1, Da 1→ Dn, ASL Da,Dn

Models: SC140

1 760
Download 760 pages 48.94 Kb
Page 362
Image 362

ASL

ASL

Arithmetic Shift Left

 

By One Bit (DALU)

Operation

Assembler Syntax

Da << 1→ Dn

ASL Da,Dn

ASL

Description

ASL Da,Dn

Shifts a source data register (Da) left one bit and stores the result in a destination data register (Dn). If the source and destination registers are the same, the original value is destroyed, leaving the shifted value in the register.

C

39

32 31

16 15

0

0

Note: The ASL instruction is mapped by the assembler to ADD Da,Db,Dn if Da is an even numbered data register and ADD Da,Da,Dn if Da is an odd numbered data register.

Status and Conditions that Affect Instruction

Register Address

Bit Name

Description

SR[2]

SM

If set, selects 32-bit arithmetic saturation mode.

SR[5:4]

S[1:0]

Scaling mode bits determine which bits in the result are used in the

 

 

Ln bit calculation.

Status and Conditions Changed by Instruction

Register Address

Bit Name

Description

SR[0]

C

Bit Da[39] is stored in the carry bit.

Ln

L

If not in arithmetic saturation mode (SR [SM] = 0), calculates and

 

 

updates the Ln bit in the destination register. If in arithmetic

 

 

saturation mode (SR [SM] = 1), clears the Ln bit in the destination

 

 

register.

EMR[2]

DOVF

Set if the result cannot be represented in 40 bits, or if the result

 

 

saturates to 32 bits in arithmetic saturation mode.

Example

asl d0,d1

Register/Memory Address

D0

L1:D1

Before

$ff f001 0001

After

$0:$ff e002 0002

A-48

SC140 DSP Core Reference Manual

Page 362
Image 362
Freescale Semiconductor SC140 specifications Asl d0,d1, Da 1→ Dn, ASL Da,Dn