1
Fork 0

Fix incorrect register conflict detection in asm!

This would previously incorrectly reject two subregisters that were
distinct but part of the same larger register, for example `al` and
`ah`.
This commit is contained in:
Amanieu d'Antras 2022-02-10 18:04:09 +00:00
parent 502d6aa47b
commit 20e6c1d013
3 changed files with 33 additions and 1 deletions

View file

@ -373,7 +373,9 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
err.emit();
}
Entry::Vacant(v) => {
v.insert(idx);
if r == reg {
v.insert(idx);
}
}
}
};