On Thu, Mar 06, 2025 at 07:31:22AM +0100, Ignacio Encinas Rubio wrote:
On 5/3/25 22:49, Charlie Jenkins wrote:
On Wed, Mar 05, 2025 at 05:39:28PM +0100, Ignacio Encinas wrote:
Vector registers are zero initialized by the kernel. Stop accepting "all ones" as a clean value.
Note that this was not working as expected given that value == 0xff can be assumed to be always false by the compiler as value's range is [-128, 127]. Both GCC (-Wtype-limits) and clang (-Wtautological-constant-out-of-range-compare) warn about this.
This check was included because the "dirty" value is an implementation detail that I believe is not strongly defined in the ABI. Since linux does always set this value to zero (currently) we can safely remove this check.
Thanks for the review. Just after sending the patch I noticed it should also remove some code that becomes useless after this change: _prev_value_ and _first_ variables were only needed because two "clean" values were supported.
I'll send a v2 tomorrow. I'm guessing keeping your "Reviewed-by" and "Tested-by" is the appropriate thing to do as the changes are very simple. Let me know if that's not the case.
Thanks again!
Yes, those changes seem small so you can keep the tags :)
- Charlie