www.ti.com
Instructions
F32TOI16 RaH, RbH
Convert 32-bit Floating-Point Value to 16-bit Integer
Operands
RaH
floating-point destination register (R0H to R7H)
RbH
floating-point source register (R0H to R7H)
Opcode
LSW: 1110 0110
1000 1100
MSW: 0000 0000
00bb baaa
Description
Convert a 32-bit floating point value in RbH to a 16-bit integer and truncate. The result
will be stored in RaH.
RaH(15:0)
= F32TOI16(RbH)
RaH(31:16) = sign extension of RaH(15)
Flags
This instruction does not affect any flags:
Flag
TF
ZI
NI
ZF
NF
LUF
LVF
Modified
No
No
No
No
No
No
No
Pipeline
This is a 2 pipeline cycle (2p) instruction. That is:
F32TOI16
RaH, RbH
; 2 pipeline cycles (2p)
NOP
; 1 cycle delay or non-conflicting instruction
; <-- F32TOI16 completes, RaH updated
NOP
Any instruction in the delay slot must not use RaH as a destination register or use RaH
as a source operand.
Example
MOVIZF32
R0H, #5.0
; R0H = 5.0 (0x40A00000)
F32TOI16
R1H, R0H
; R1H(15:0)
= F32TOI16(R0H)
; R1H(31:16) = Sign extension of R1H(15)
MOVIZF32
R2H, #-5.0 ; R2H = -5.0 (0xC0A00000)
; <-- F32TOI16 complete, R1H(15:0)
= 5 (0x0005)
;
R1H(31:16) = 0 (0x0000)
F32TOI16
R3H, R2H
; R3H(15:0)
= F32TOI16(R2H)
; R3H(31:16) = Sign extension of R3H(15)
NOP
; 1 Cycle delay for F32TOI16 to complete
; <-- F32TOI16 complete, R3H(15:0)
= -5 (0xFFFB)
;
R3H(31:16) = (0xFFFF)
See also
SPRUEO2A – June 2007 – Revised August 2008
Instruction Set
51
Содержание TMS320C28 series
Страница 2: ...2 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...
Страница 12: ...Introduction 12 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...
Страница 20: ...CPU Register Set 20 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...
Страница 136: ...Instruction Set 136 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...