pan/va: Allow small constants in register pairs

They are zero extended 32->64-bit. Allow this. Noticed debugging spilling on
Valhall.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15756>
This commit is contained in:
Alyssa Rosenzweig 2022-03-31 10:46:07 -04:00
parent 862a19aa4b
commit 0864b15047
1 changed files with 3 additions and 0 deletions

View File

@ -45,6 +45,9 @@ va_validate_register_pair(const bi_instr *I, unsigned s)
if (lo.type == BI_INDEX_REGISTER) {
assert(hi.value & 1);
assert(hi.value == lo.value + 1);
} else if (lo.type == BI_INDEX_FAU && lo.value & BIR_FAU_IMMEDIATE) {
/* Small constants are zero extended, so the top word encode zero */
assert(hi.value == (BIR_FAU_IMMEDIATE | 0));
} else {
assert(hi.offset & 1);
assert(hi.offset == lo.offset + 1);