From b257a6d283f6f5784cb351856b5dbe8c645a1f6f Mon Sep 17 00:00:00 2001 From: xleroy Date: Sun, 5 May 2013 16:29:20 +0000 Subject: ia32/i64_dtou: wrong play on rounding mode arm, powerpc: expand shifts inline in dtos and dtou arm: branchless code for shl and shr test: more tests for double -> long long conversions. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2234 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- runtime/test/test_int64.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'runtime/test') diff --git a/runtime/test/test_int64.c b/runtime/test/test_int64.c index 0a7dfc4..4dbad70 100644 --- a/runtime/test/test_int64.c +++ b/runtime/test/test_int64.c @@ -147,6 +147,16 @@ static void test1(u64 x, u64 y) if (f != g) error++, printf("(double) %lld (s) = %a, expected %a\n", x, f, g); + f = (double) x; + z = __i64_dtou(f); + if (z != (u64) (double) f) + error++, printf("(u64) %a = %llu, expected %llu\n", f, z, (u64) f); + + f = (double) ((s64) x); + t = __i64_dtos(f); + if (t != (s64) (double) f) + error++, printf("(s64) %a = %lld, expected %lld\n", f, z, (s64) f); + f = ((double) x) * 0.0001; z = __i64_dtou(f); if (z != (u64) f) -- cgit v1.2.3