Skip to content

checkasm: Improve 32-bit parameter clobbering on x86-64

Henrik Gramner requested to merge gramner/dav1d:checkasm_arg_clobber into master

The previous method of doing parameter clobbering was hacky and unreliable, but this approach works much better. The same could probably be done for AArch64 as well.

Also fix one bug that was detected because of this improvement.

This relies on _Generic(), which is part of C11. AFAIK pretty much all reasonably modern compilers support this, however MSVC doesn't enable it unless compiled with /std:c11. We already use some C11 features (stdatomic.h and anonymous structs/unions), so maybe we should just embrace C11?

Merge request reports