aboutsummaryrefslogtreecommitdiff
path: root/sim/m32c/srcdest.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/m32c/srcdest.c')
-rw-r--r--sim/m32c/srcdest.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sim/m32c/srcdest.c b/sim/m32c/srcdest.c
index 8dfe9d0..937779b 100644
--- a/sim/m32c/srcdest.c
+++ b/sim/m32c/srcdest.c
@@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <stdio.h>
#include <stdlib.h>
+#include "libiberty.h"
#include "cpu.h"
#include "mem.h"
@@ -354,7 +355,7 @@ decode_sd23 (int bbb, int bb, int bytes, int ind, int add)
srcdest sd;
int code = (bbb << 2) | bb;
- if (code >= sizeof (modes23) / sizeof (modes23[0]))
+ if (code >= ARRAY_SIZE (modes23))
abort ();
if (trace)