X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=sim%2Farm%2Farmsupp.c;h=11bb53c5b7049130f201acc581f21db0f51d2765;hb=22aa1d51198689f5f3f01a874b405bf4449cbfb0;hp=e2bbf536ee27ca804833b7cdb810c5607ce2d604;hpb=73cb0348b296656e971c4d428aa63781e656a1c4;p=deliverable%2Fbinutils-gdb.git diff --git a/sim/arm/armsupp.c b/sim/arm/armsupp.c index e2bbf536ee..11bb53c5b7 100644 --- a/sim/arm/armsupp.c +++ b/sim/arm/armsupp.c @@ -17,6 +17,7 @@ #include "armdefs.h" #include "armemu.h" #include "ansidecl.h" +#include "libiberty.h" #include /* Definitions for the support routines. */ @@ -373,7 +374,7 @@ ModeToBank (ARMword mode) DUMMYBANK, DUMMYBANK, DUMMYBANK, SYSTEMBANK }; - if (mode >= (sizeof (bankofmode) / sizeof (bankofmode[0]))) + if (mode >= ARRAY_SIZE (bankofmode)) return DUMMYBANK; return bankofmode[mode]; @@ -1134,7 +1135,7 @@ handle_VFP_op (ARMul_State * state, ARMword instr) { if (trace) fprintf (stderr, " VFP: VMLS: %g = %g - %g * %g\n", - VFP_dval (dest) - val, + VFP_dval (dest) - val, VFP_dval (dest), VFP_dval (srcN), VFP_dval (srcM)); VFP_dval (dest) -= val; } @@ -1142,7 +1143,7 @@ handle_VFP_op (ARMul_State * state, ARMword instr) { if (trace) fprintf (stderr, " VFP: VMLA: %g = %g + %g * %g\n", - VFP_dval (dest) + val, + VFP_dval (dest) + val, VFP_dval (dest), VFP_dval (srcN), VFP_dval (srcM)); VFP_dval (dest) += val; } @@ -1155,7 +1156,7 @@ handle_VFP_op (ARMul_State * state, ARMword instr) { if (trace) fprintf (stderr, " VFP: VMLS: %g = %g - %g * %g\n", - VFP_fval (dest) - val, + VFP_fval (dest) - val, VFP_fval (dest), VFP_fval (srcN), VFP_fval (srcM)); VFP_fval (dest) -= val; } @@ -1163,7 +1164,7 @@ handle_VFP_op (ARMul_State * state, ARMword instr) { if (trace) fprintf (stderr, " VFP: VMLA: %g = %g + %g * %g\n", - VFP_fval (dest) + val, + VFP_fval (dest) + val, VFP_fval (dest), VFP_fval (srcN), VFP_fval (srcM)); VFP_fval (dest) += val; } @@ -1345,7 +1346,7 @@ handle_VFP_op (ARMul_State * state, ARMword instr) if (BIT (8)) { ARMdval src = VFP_dval (srcM); - + VFP_dval (dest) = fabs (src); if (trace) fprintf (stderr, " VFP: VABS (%g) = %g\n", src, VFP_dval (dest)); @@ -1402,7 +1403,7 @@ handle_VFP_op (ARMul_State * state, ARMword instr) if (BIT (16) == 0) { ARMdval src = VFP_dval (srcM); - + if (isinf (res) && isinf (src)) { if (res > 0.0 && src > 0.0) @@ -1442,7 +1443,7 @@ handle_VFP_op (ARMul_State * state, ARMword instr) if (BIT (16) == 0) { ARMfval src = VFP_fval (srcM); - + if (isinf (res) && isinf (src)) { if (res > 0.0 && src > 0.0)