Skip to content

isaspec: bitfield validation

Rob Clark requested to merge robclark/mesa:isaspec/validation into main

This adds some asserts that we aren't trying to encode a value that does not fit in the given bitfield.

I'd like to get to the point where we could also test for valid encodings, for ex. from ir3_validate(), in order to catch errors earlier in the compile process. That will require a few other changes in ir3 first. But this seems like a reasonable first step, and already caught some issues.

/cc @austriancoder I found a couple things I had to cleanup in ir3's isa xml to avoid tripping the new assert.. it's possible that you might come across some issues as well. I suppose I could make the addition of the assert a cmdline arg to the generator, if needed.

Merge request reports