aicasm: Correct logic bug in the undefined register bit access detection code.
authorSascha Wildner <saw@online.de>
Tue, 10 Aug 2010 01:45:18 +0000 (03:45 +0200)
committerSascha Wildner <saw@online.de>
Tue, 10 Aug 2010 01:45:18 +0000 (03:45 +0200)
commit6affd6269fbf0381b1ad47b4594617c269b18b5a
tree791438c46b5754592133f09e91f4219c7c1861ff
parent5fd8d1fdcb1e8a688352f240470f3787c768c3c2
aicasm: Correct logic bug in the undefined register bit access detection code.

Quoting FreeBSD's commit msg:

The code in question verifies that all register write operations only change
bits that are defined (in the register definition file) for that effected
register.  The bug effectively disabled this checking.

o Fix the check by testing the opcode against all supported read ("and" based)
  operands.

o Add missing bit definitions to the aic7xxx and aic79xx register definition
  files so that the warning (treated as a fatal error) does not spuriously
  fire.

Taken-from: FreeBSD

[While I'm here, also add a missing free() and raise WARNS to 6.]
sys/dev/disk/aic7xxx/aic79xx.reg
sys/dev/disk/aic7xxx/aic7xxx.reg
sys/dev/disk/aic7xxx/aicasm/Makefile
sys/dev/disk/aic7xxx/aicasm/aicasm.c
sys/dev/disk/aic7xxx/aicasm/aicasm_gram.y
sys/dev/disk/aic7xxx/aicasm/aicasm_scan.l