mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 01:50:10 +01:00
pan/bi: Lint for infinite loops
I would make this unconditional, but conditionally branching to the same clause in a tight loop is (disturbingly) legal, as far as I know. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723>
This commit is contained in:
parent
63c2ee2c4c
commit
d3c92d32ba
1 changed files with 5 additions and 0 deletions
|
|
@ -279,6 +279,11 @@ dump_pc_imm(FILE *fp, uint64_t imm, enum bi_constmod mod, bool high32)
|
|||
|
||||
if (mod == BI_CONSTMOD_PC_LO && high32)
|
||||
fprintf(fp, " >> 32");
|
||||
|
||||
/* While technically in spec, referencing the current clause as (pc +
|
||||
* 0) likely indicates an unintended infinite loop */
|
||||
if (offs == 0)
|
||||
fprintf(fp, " /* XXX: likely an infinite loop */");
|
||||
}
|
||||
|
||||
/* Convert an index to an embedded constant in FAU-RAM to the index of the
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue