EasyManua.ls Logo

Texas Instruments TMS320C28x - Page 263

Texas Instruments TMS320C28x
695 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
IMPYL P,XT,loc32
6-106
IMPYL P,XT,loc32 Signed 32 X 32-Bit Multiply (Lower Half)
SYNTAX OPTIONS OPCODE OBJMODE RPT CYC
IMPYL P,XT,loc32 0101 0110 0000 0101
0000 0000 LLLL LLLL
1 1
Operands P Product register
XT Multiplicand register
loc32 Addressing mode (see Chapter 5)
Description Multiply the signed 32-bit content of the XT register by the signed 32-bit
content of the location pointed to by the “loc32” addressing mode. The
product shift mode (PM) then determines which part of the lower 38 bits of
the 64-bit result gets stored in the P register as shown in the diagram below:
temp(37:0) = lower_38 bits(signed XT * signed [loc32]);
if( PM = +4 shift )
P(31:4) = temp(27:0), P(3:0) = 0;
if( PM = +1 shift )
P(31:1) = temp(30:0), P(0) = 0;
if( PM = 0 shift )
P(31:0) = temp(31:0);
if( PM = −1 shift )
P(31:0) = temp(32:1);
if( PM = −2 shift )
P(31:0) = temp(33:2);
if( PM = −3 shift )
P(31:0) = temp(34:3);
if( PM = −4 shift )
P(31:0) = temp(35:4);
if( PM = −5 shift )
P(31:0) = temp(36:5);
if( PM = −6 shift )
P(31:0) = temp(37:6);
Flags and
Modes
PM The value in the PM bits sets the shift mode that determines which portion
of the lower 38 bits of the 64-bit results are stored in the P register.
Repeat This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
Example ;
Calculate signed result: Y64 = M32*X32
MOVL XT,@M32 ; XT = M32
IMPYL P,XT,@X32 ; P = low 32 bits of (M32*X32)
QMPYL ACC,XT,@X32 ; ACC = high 32 bits of (M32*X32)
MOVL @Y64+0,P ; Store result into Y64
MOVL @Y64+2,ACC

Table of Contents

Related product manuals