From 0864b150475e2c762f845a5942db66095886ee6e Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 31 Mar 2022 10:46:07 -0400 Subject: [PATCH] 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 Part-of: --- src/panfrost/bifrost/valhall/va_pack.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/panfrost/bifrost/valhall/va_pack.c b/src/panfrost/bifrost/valhall/va_pack.c index 3df70295190..6736057f0d8 100644 --- a/src/panfrost/bifrost/valhall/va_pack.c +++ b/src/panfrost/bifrost/valhall/va_pack.c @@ -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);