aboutsummaryrefslogtreecommitdiff
path: root/sim/arm/armsupp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/arm/armsupp.c')
-rw-r--r--sim/arm/armsupp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sim/arm/armsupp.c b/sim/arm/armsupp.c
index 3ff4bf9..11bb53c 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 <math.h>
/* 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];