Texas Instruments TMS320C67X/C67X+ DSP Car Speaker User Manual


 
SPTRUNC Convert Single-Precision Floating-Point Value to Integer With Truncation
3-230 Instruction Set SPRU733
Convert Single-Precision Floating-Point Value to Integer With Truncation
SPTRUNC
Syntax SPTRUNC (.unit) src2, dst
.unit = .L1 or .L2
Compatibility C67x and C67x+ CPU
Opcode
31 29 28 27 23 22 18 17 13 12 11 5 4 3 2 1 0
creg z dst src2 0 0 0 0 0 x 0 0 0 1 0 1 1 1 1 0 s p
3 1 5 5 1 1 1
Opcode map field used... For operand type... Unit
src2
dst
xsp
sint
.L1, .L2
Description The single-precision value in src2 is converted to an integer and placed in dst.
This instruction operates like SPINT except that the rounding modes in the
FADCR are ignored, and round toward zero (truncate) is always used.
Execution if (cond) int(src2) dst
else nop
Notes:
1) If src2 is NaN, the maximum signed integer (7FFF FFFFh or
8000 0000h) is placed in dst and the INVAL bit is set.
2) If src2 is signed infinity or if overflow occurs, the maximum signed integer
(7FFF FFFFh or 8000 0000h) is placed in dst and the INEX and OVER
bits are set. Overflow occurs if src2 is greater than 2
31
1 or less
than 2
31
.
3) If src2 is denormalized, 0000 0000h is placed in dst and INEX and DEN2
bits are set.
4) If rounding is performed, the INEX bit is set.