mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-31 11:20:05 +01:00
Because of the lack of an external ABI on low-level kernels, we cannot directly test internal functions. Instead, we construct a minimal op chain consisting of a read, the op to be tested, and a write. The bigger complication arises from the fact that the backend may generate arbitrary internal state that needs to be passed back to the implementation, which means we cannot directly call `func_ref` on the generated chain. To get around this, always compile the op chain twice - once using the backend to be tested, and once using the reference C backend. The actual entry point may also just be a shared wrapper, so we need to be very careful to run checkasm_check_func() on a pseudo-pointer that will actually be unique for each combination of backend and active CPU flags.