arm: force rounding towards zero on cast to integer with VFP
Cast to integer should not be affected by the current rounding mode as set by fesetround.
This commit is contained in:
@ -1926,7 +1926,7 @@ void gen_cvt_ftoi(int t)
|
|||||||
#ifdef TCC_ARM_VFP
|
#ifdef TCC_ARM_VFP
|
||||||
r=vfpr(gv(RC_FLOAT));
|
r=vfpr(gv(RC_FLOAT));
|
||||||
u=u?0:0x10000;
|
u=u?0:0x10000;
|
||||||
o(0xEEBC0A40|(r<<12)|r|T2CPR(r2)|u); /* ftoXiY */
|
o(0xEEBC0AC0|(r<<12)|r|T2CPR(r2)|u); /* ftoXizY */
|
||||||
r2=intr(vtop->r=get_reg(RC_INT));
|
r2=intr(vtop->r=get_reg(RC_INT));
|
||||||
o(0xEE100A10|(r<<16)|(r2<<12));
|
o(0xEE100A10|(r<<16)|(r2<<12));
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user