m32c_asm_hash (const char *mnem)
{
unsigned int h;
-
+
/* The length of the mnemonic for the Jcnd insns is 1. Hash jsri. */
if (mnem[0] == 'j' && mnem[1] != 's')
return 'j';
-
+
/* Don't hash scCND */
if (mnem[0] == 's' && mnem[1] == 'c')
return 's';
-
+
/* Don't hash bmCND */
if (mnem[0] == 'b' && mnem[1] == 'm')
return 'b';
-
+
for (h = 0; *mnem && *mnem != ' ' && *mnem != ':'; ++mnem)
h += *mnem;
return h % CGEN_ASM_HASH_SIZE;