summaryrefslogtreecommitdiff
path: root/opcodes/cgen-asm.c
diff options
context:
space:
mode:
Diffstat (limited to 'opcodes/cgen-asm.c')
-rw-r--r--opcodes/cgen-asm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/opcodes/cgen-asm.c b/opcodes/cgen-asm.c
index 05b62bf49e1..c71c70de08e 100644
--- a/opcodes/cgen-asm.c
+++ b/opcodes/cgen-asm.c
@@ -225,7 +225,9 @@ cgen_parse_keyword (cd, strp, keyword_table, valuep)
/* Allow letters, digits, and any special characters. */
while (((p - start) < (int) sizeof (buf))
&& *p
- && (ISALNUM (*p) || strchr (keyword_table->nonalpha_chars, *p)))
+ && (ISALNUM (*p)
+ || *p == '_'
+ || strchr (keyword_table->nonalpha_chars, *p)))
++p;
if (p - start >= (int) sizeof (buf))