From 57b88160aed48585cbea42c46ad1fc3347711931 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Tue, 19 Apr 2022 20:57:03 +0200 Subject: [PATCH] Add asm generation for typical OOR_EQUAL_P functions --- tests/tgen-mdict.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/tgen-mdict.c b/tests/tgen-mdict.c index b550569e..64612ce0 100644 --- a/tests/tgen-mdict.c +++ b/tests/tgen-mdict.c @@ -22,6 +22,7 @@ */ #include #include "m-dict.h" +#include "m-string.h" static inline bool my_oor_equal_p(uint64_t k, unsigned char n) { @@ -64,3 +65,21 @@ void clean(dict_t d) { dict_reset(d); } + +extern bool testempty(uint64_t d); +bool testempty(uint64_t d) +{ + if (my_oor_equal_p(d, 0) || my_oor_equal_p(d, 1)) + return true; + else + return false; +} + +extern bool testempty2(string_t d); +bool testempty2(string_t d) +{ + if (string_oor_equal_p(d, 0) || string_oor_equal_p(d, 1)) + return true; + else + return false; +}