libhfuzz: Support old __sanitizer_cov_trace_cmp
@@ -173,6 +173,22 @@ ATTRIBUTE_X86_REQUIRE_SSE42 void __sanitizer_cov_trace_switch(uint64_t Val, uint
}
}
+ATTRIBUTE_X86_REQUIRE_SSE42 void __sanitizer_cov_trace_cmp(uint64_t SizeAndType, uint64_t Arg1,
+ uint64_t Arg2)
+{
+ uint64_t CmpSize = (SizeAndType >> 32) / 8;
+ switch (CmpSize) {
+ case (sizeof(uint8_t)):
+ return __sanitizer_cov_trace_cmp1(Arg1, Arg2);
+ case (sizeof(uint16_t)):
+ return __sanitizer_cov_trace_cmp2(Arg1, Arg2);
+ case (sizeof(uint32_t)):
+ return __sanitizer_cov_trace_cmp4(Arg1, Arg2);
+ case (sizeof(uint64_t)):
+ return __sanitizer_cov_trace_cmp8(Arg1, Arg2);
+ }
+}
+
/*
* -fsanitize-coverage=trace-pc-guard
*/
