UTOF

Integer to floating-point conversion [V2.01.00 or later]

UTOF

Integer TO Floating-point


[Syntax]

UTOF src, dest

 

[Operation]

dest = ( float ) ( unsigned long ) 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. You can assemble assembly-language code that includes this instruction if you have specified the assembler option -isa with selection of the instruction set of the RXv2 or a later version.

 

[Instruction Format]

Syntax

Processng Size

Operand

Code Size

(Byte)

src

dest

UTOF 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)

Note

* For the RX Family assembler manufactured by Renesas Electronics Corp., enter a scaled value (the actual value multiplied by 2 when the size extension specifier is .W or .UW, or by 4 when the specifier is .L) as the displacement value (dsp:8, dsp:16). With dsp:8, values from 0 to 510 (255 × 2) can be specified when the size extension specifier is .W or .UW, or values from 0 to 1020 (255 × 4) when the specifier is .L. With dsp:16, values from 0 to 131070 (65535 × 2) can be specified when the size extension specifier is .W or .UW, or values from 0 to 262140 (65535 × 4) when the specifier is .L. The value divided by 2 or 4 will be stored in the instruction code.

 

[Flag Change]

Flag

C

Z

S

O

CV

CO

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 value of the flag is 0.

CV : The value of the flag is 0.

CO : The value of the flag is 0.

CZ : The value of the flag is 0.

CU : The value of the flag is 0.

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

CE : The value of the flag is 0.

FX : The flag is set if an inexact exception is generated, and otherwise left unchanged.

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]

UTOF R1, R2

UTOF [R1], R2

UTOF 16[R1].L, R2