05.02.2013 Views

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Instruction Details<br />

A8.6.295 VCVT, VCVTR (between floating-point <strong>and</strong> integer, VFP)<br />

These instructions convert a value in a register from floating-point to a 32-bit integer, or from a 32-bit integer<br />

to floating-point, <strong>and</strong> place the result in a second register.<br />

The floating-point to integer operation normally uses the Round towards Zero rounding mode, but can<br />

optionally use the rounding mode specified by the FPSCR. The integer to floating-point operation uses the<br />

rounding mode specified by the FPSCR.<br />

VCVT (between floating-point <strong>and</strong> fixed-point, VFP) on page A8-582 describes conversions between<br />

floating-point <strong>and</strong> 16-bit integers.<br />

Encoding T1 / A1 VFPv2, VFPv3 (sz = 1 UNDEFINED in single-precision only variants)<br />

VCVT{R}.S32.F64 , <br />

VCVT{R}.S32.F32 , <br />

VCVT{R}.U32.F64 , <br />

VCVT{R}.U32.F32 , <br />

VCVT.F64. , <br />

VCVT.F32. , <br />

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

1 1 1 0 1 1 1 0 1 D 1 1 1 opc2 Vd 1 0 1 sz op 1 M 0 Vm<br />

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

cond 1 1 1 0 1 D 1 1 1 opc2 Vd 1 0 1 sz op 1 M 0 Vm<br />

if opc2 != ‘000’ && opc2 != ‘10x’ then SEE “Related encodings”;<br />

to_integer = (opc2 == ‘1’); dp_operation = (sz == 1);<br />

if to_integer then<br />

unsigned = (opc2 == ‘0’); round_zero = (op == ‘1’);<br />

d = UInt(Vd:D); m = if dp_operation then UInt(M:Vm) else UInt(Vm:M);<br />

else<br />

unsigned = (op == ‘0’); round_fpscr = FALSE; // FALSE selects FPSCR rounding<br />

m = UInt(Vm:M); d = if dp_operation then UInt(D:Vd) else UInt(Vd:D);<br />

Related encodings See VFP data-processing instructions on page A7-24<br />

A8-578 Copyright © 1996-1998, 2000, 2004-2008 <strong>ARM</strong> Limited. All rights reserved. <strong>ARM</strong> DDI 0406B

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!