diff --git a/sys/dev/aic7xxx/aicasm/aicasm_gram.y b/sys/dev/aic7xxx/aicasm/aicasm_gram.y index d0bc6714acd..91425f38c30 100644 --- a/sys/dev/aic7xxx/aicasm/aicasm_gram.y +++ b/sys/dev/aic7xxx/aicasm/aicasm_gram.y @@ -623,6 +623,11 @@ immediate_or_a: expression { $$ = $1; + if ($$.value == 0) { + stop("Immediate value of 0 not valid for opcode", + EX_DATAERR); + /* NOTREACHED */ + } } | T_A {