aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/aic7xxx/aicasm/aicasm_gram.y
diff options
context:
space:
mode:
authorKenneth D. Merry <ken@FreeBSD.org>2001-04-04 22:50:57 +0000
committerKenneth D. Merry <ken@FreeBSD.org>2001-04-04 22:50:57 +0000
commit4464fee50386ebff4d8a1e9f4e28917f1791918a (patch)
tree2dd20dcadebaa7fc4a498f15ad0498ae873b645c /sys/dev/aic7xxx/aicasm/aicasm_gram.y
parenta1bc34c6b8c9e4f2ba683f26dec5793bf3cd493d (diff)
Don't allow immediate values of 0 for operations that can take either an
immediate value or the accumulator. 0 is the chip's internal representation for the accumulator, and so 0 is an invalid immediate value when the accumulator can also be specified as an argument. Submitted by: gibbs
Notes
Notes: svn path=/head/; revision=75201
Diffstat (limited to 'sys/dev/aic7xxx/aicasm/aicasm_gram.y')
-rw-r--r--sys/dev/aic7xxx/aicasm/aicasm_gram.y5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/aic7xxx/aicasm/aicasm_gram.y b/sys/dev/aic7xxx/aicasm/aicasm_gram.y
index d0bc6714acdc..91425f38c30a 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
{