aboutsummaryrefslogtreecommitdiff
path: root/target-m68k
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-28 01:46:43 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-28 01:46:43 +0000
commit5fc4adf6cedc991c0ee9f16a5d2431bcca07c902 (patch)
tree9c065e4325d003e93fb0d1b1c8439929d9c2fd22 /target-m68k
parentdd4131b39492bd91dc87d216e761ca4cf210fb67 (diff)
downloadqemu-5fc4adf6cedc991c0ee9f16a5d2431bcca07c902.zip
qemu-5fc4adf6cedc991c0ee9f16a5d2431bcca07c902.tar.gz
qemu-5fc4adf6cedc991c0ee9f16a5d2431bcca07c902.tar.bz2
Add diagnostic for bad opcode masks.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2882 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-m68k')
-rw-r--r--target-m68k/translate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index 10b733f..52f38e4 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -2440,8 +2440,12 @@ register_opcode (disas_proc proc, uint16_t opcode, uint16_t mask)
int to;
/* Sanity check. All set bits must be included in the mask. */
- if (opcode & ~mask)
+ if (opcode & ~mask) {
+ fprintf(stderr,
+ "qemu internal error: bogus opcode definition %04x/%04x\n",
+ opcode, mask);
abort();
+ }
/* This could probably be cleverer. For now just optimize the case where
the top bits are known. */
/* Find the first zero bit in the mask. */