Commit 5fc4adf6cedc991c0ee9f16a5d2431bcca07c902

Authored by pbrook
1 parent dd4131b3

Add diagnostic for bad opcode masks.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2882 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 5 additions and 1 deletions
target-m68k/translate.c
... ... @@ -2440,8 +2440,12 @@ register_opcode (disas_proc proc, uint16_t opcode, uint16_t mask)
2440 2440 int to;
2441 2441  
2442 2442 /* Sanity check. All set bits must be included in the mask. */
2443   - if (opcode & ~mask)
  2443 + if (opcode & ~mask) {
  2444 + fprintf(stderr,
  2445 + "qemu internal error: bogus opcode definition %04x/%04x\n",
  2446 + opcode, mask);
2444 2447 abort();
  2448 + }
2445 2449 /* This could probably be cleverer. For now just optimize the case where
2446 2450 the top bits are known. */
2447 2451 /* Find the first zero bit in the mask. */
... ...