ITOF

Integer to floating-point conversion

ITOF

Integer TO Floating-point


[Syntax]

ITOF src, dest

 

[Operation]

dest = ( float ) src;

 

[Function]

-

This instruction converts the signed longword (32-bit) integer stored in src into a single-precision floating-point number and places the result in dest. Rounding of the result is in accord with the setting of the RM[1:0] bits in the FPSW. 00000000h is handled as +0 regardless of the rounding mode.

 

[Instruction Format]

Syntax

Processng Size

src

dest

Code size

(Byte)

ITOF src, dest

L

Rs

Rd

3

L

[Rs].memex

Rd

3 (memex == UB)

4 (memex != UB)

L

dsp:8[Rs].memex

Rd

4 (memex == UB)

5 (memex != UB)

L

dsp:16[Rs].memex

Rd

5 (memex == UB)

6 (memex != UB)

[Flag Change]

Flag

C

Z

S

O

CV

CZ

CU

CX

CE

FV

FO

FZ

FU

FX

Change

 

 

 

 

 

 

 

 

Conditions

Z :The flag is set if the result of the operation is +0; otherwise it is cleared.

S :The flag is set if the sign bit (bit 31) of the result of the operation is 1; otherwise it is cleared.

CV :The value of the flag is always 0.

CO :The value of the flag is always 0.

CZ :The value of the flag is always 0.

CU :The value of the flag is always 0.

CX :The flag is set if an inexact exception is generated; otherwise it is cleared.

CE:The value of the flag is always 0.

FX:The flag is set if an inexact exception is generated; otherwise it does not change.

Note

The FX flag does not change if the exception enable bit EX is 1. The S and Z flags do not change when an exception is generated.

[Description Example]

ITOF R1, R2

ITOF [R1], R2

ITOF 16[R1].L, R2