From f5c729ea59d227a507f83bd94d07f4366b46d72b Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 14 Mar 2025 21:08:01 +0200 Subject: start supporting 32bit arches --- tests/negr.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'tests/negr.c') diff --git a/tests/negr.c b/tests/negr.c index 84241e8..4528897 100644 --- a/tests/negr.c +++ b/tests/negr.c @@ -16,25 +16,24 @@ int main(int argc, char *argv[]) ejit_select_compile_func(f, 1, 0, EJIT_USE64(int64_t), do_jit); - assert(erf1(f, EJIT_ARG(0, int64_t)) == 0); - assert(erf1(f, EJIT_ARG(1, int64_t)) == (int64_t)0xffffffffffffffff); - assert(erf1(f, - EJIT_ARG(0xffffffff, - int64_t)) == (int64_t)0xffffffff00000001); - assert(erf1(f, - EJIT_ARG(0x80000000, - int64_t)) == (int64_t)0xffffffff80000000); - assert(erf1(f, - EJIT_ARG(0x7fffffff, - int64_t)) == (int64_t)0xffffffff80000001); - assert(erf1(f, - EJIT_ARG(0x80000001, - int64_t)) == (int64_t)0xffffffff7fffffff); - assert(erf1(f, EJIT_ARG(0xffffffffffffffff, int64_t)) == 1); - assert(erf1(f, EJIT_ARG(0x8000000000000000, int64_t)) + assert(erfl1(f, EJIT_ARG(0, int64_t)) == 0); + assert(erfl1(f, EJIT_ARG(1, int64_t)) == (int64_t)0xffffffffffffffff); + assert(erfl1(f, EJIT_ARG(0xffffffff, int64_t)) + == (int64_t)0xffffffff00000001); + assert(erfl1(f, EJIT_ARG(0x80000000, int64_t)) + == (int64_t)0xffffffff80000000); + + assert(erfl1(f, EJIT_ARG(0x7fffffff, int64_t)) + == (int64_t)0xffffffff80000001); + + assert(erfl1(f, EJIT_ARG(0x80000001, int64_t)) + == (int64_t)0xffffffff7fffffff); + + assert(erfl1(f, EJIT_ARG(0xffffffffffffffff, int64_t)) == 1); + assert(erfl1(f, EJIT_ARG(0x8000000000000000, int64_t)) == (int64_t)0x8000000000000000); - assert(erf1(f, EJIT_ARG(0x7fffffffffffffff, int64_t)) + assert(erfl1(f, EJIT_ARG(0x7fffffffffffffff, int64_t)) == (int64_t)0x8000000000000001); ejit_destroy_func(f); -- cgit v1.2.3