Post Go back to editing

SHARC EXP Instruction

Category: Software
Product Number: ADSP-21479
Software Version: visualdsp 5.1.2

In "SHARC® Processor Programming Reference" Page 11-80 have a Instruction "Rn= EXP Rx",I am confused about the use of "EXP ". Can anyone give me some example about the exp instruction.

Like R5=0x02, Why R4=EXP R5  will be 0xFFFFFFE3.

Best Regards.

  • Hi ,

    Apologies for the delay.

    This Exp instruction extracts the exponent of the operand in register Rx. If the number of leading sign bits in Rx is n, the result in Rn is  –(n–1). For example,
    (1) R5 = EXP R3;

    >>> If R3 = 0xE4000000 then R5 = -2

    >>> If R3 = 0x00000101 then R5 = -22

    (2) R5 = EXP R3 : 2 ;

    >>> If R3 = 0x140056A3 and R2 = 0x87654321 then R5 = -2 (in hexadecimal, R5=0xFFFFFFFE)

    Anand Selvaraj.