arm: fix conversion from integer to float/double with VFP

The source register was not encoded in the instruction.
This commit is contained in:
Daniel Glöckner 2013-02-03 17:51:33 +01:00
parent 6f4983af5b
commit 506193724f

View File

@ -1847,7 +1847,7 @@ ST_FUNC void gen_cvt_itof1(int t)
#ifdef TCC_ARM_VFP
r2=vfpr(vtop->r=get_reg(RC_FLOAT));
o(0xEE000A10|(r<<12)|(r2<<16)); /* fmsr */
r2<<=12;
r2|=r2<<12;
if(!(vtop->type.t & VT_UNSIGNED))
r2|=0x80; /* fuitoX -> fsituX */
o(0xEEB80A40|r2|T2CPR(t)); /* fYitoX*/