From: Julian Seward Date: Wed, 19 Nov 2014 16:07:28 +0000 (+0000) Subject: Implement VFPv4 VFNMA, VFNMS d_d and s_s variants (not that X-Git-Tag: svn/VALGRIND_3_11_0^2~156 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5455d87e9a748bce3cb43aacdf0bc651f043aac2;p=thirdparty%2Fvalgrind.git Implement VFPv4 VFNMA, VFNMS d_d and s_s variants (not that there are any other variants). Fixes #340807. git-svn-id: svn://svn.valgrind.org/vex/trunk@2995 --- diff --git a/VEX/priv/guest_arm_toIR.c b/VEX/priv/guest_arm_toIR.c index abe9c3a035..dbead8f457 100644 --- a/VEX/priv/guest_arm_toIR.c +++ b/VEX/priv/guest_arm_toIR.c @@ -13529,6 +13529,28 @@ static Bool decode_CP10_CP11_instruction ( condT); DIP("fdivd%s d%u, d%u, d%u\n", nCC(conq), dD, dN, dM); goto decode_success_vfp; + case BITS4(1,0,1,0): /* VNFMS: -(d - n * m) (fused) */ + /* XXXROUNDINGFIXME look up ARM reference for fused + multiply-add rounding */ + putDReg(dD, triop(Iop_AddF64, rm, + unop(Iop_NegF64, getDReg(dD)), + triop(Iop_MulF64, rm, + getDReg(dN), + getDReg(dM))), + condT); + DIP("vfnmsd%s d%u, d%u, d%u\n", nCC(conq), dD, dN, dM); + goto decode_success_vfp; + case BITS4(1,0,1,1): /* VNFMA: -(d + n * m) (fused) */ + /* XXXROUNDINGFIXME look up ARM reference for fused + multiply-add rounding */ + putDReg(dD, triop(Iop_AddF64, rm, + unop(Iop_NegF64, getDReg(dD)), + triop(Iop_MulF64, rm, + unop(Iop_NegF64, getDReg(dN)), + getDReg(dM))), + condT); + DIP("vfnmad%s d%u, d%u, d%u\n", nCC(conq), dD, dN, dM); + goto decode_success_vfp; case BITS4(1,1,0,0): /* VFMA: d + n * m (fused) */ /* XXXROUNDINGFIXME look up ARM reference for fused multiply-add rounding */ @@ -14014,6 +14036,28 @@ static Bool decode_CP10_CP11_instruction ( condT); DIP("fdivs%s s%u, s%u, s%u\n", nCC(conq), fD, fN, fM); goto decode_success_vfp; + case BITS4(1,0,1,0): /* VNFMS: -(d - n * m) (fused) */ + /* XXXROUNDINGFIXME look up ARM reference for fused + multiply-add rounding */ + putFReg(fD, triop(Iop_AddF32, rm, + unop(Iop_NegF32, getFReg(fD)), + triop(Iop_MulF32, rm, + getFReg(fN), + getFReg(fM))), + condT); + DIP("vfnmss%s s%u, s%u, s%u\n", nCC(conq), fD, fN, fM); + goto decode_success_vfp; + case BITS4(1,0,1,1): /* VNFMA: -(d + n * m) (fused) */ + /* XXXROUNDINGFIXME look up ARM reference for fused + multiply-add rounding */ + putFReg(fD, triop(Iop_AddF32, rm, + unop(Iop_NegF32, getFReg(fD)), + triop(Iop_MulF32, rm, + unop(Iop_NegF32, getFReg(fN)), + getFReg(fM))), + condT); + DIP("vfnmas%s s%u, s%u, s%u\n", nCC(conq), fD, fN, fM); + goto decode_success_vfp; case BITS4(1,1,0,0): /* VFMA: d + n * m (fused) */ /* XXXROUNDINGFIXME look up ARM reference for fused multiply-add rounding */