From 254c3783fee9d1b245d1b4b10b72e0c9314f3ff6 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 9 Jan 2021 17:57:48 -0500 Subject: sim: tests: get common tests working again These were written with 32-bit host assumptions baked into it. Simplify the printf formats to use ll length modifier as it's in C11 rather than trying to manually break it up into two, and cleanup some of the casts to stop assuming sizeof(long) is the same as sizeof(int). We also have to add a few more includes for the various funcs used in here. The tests aren't compiled automatically still. We can figure that out later with more work. --- sim/testsuite/ChangeLog | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'sim/testsuite/ChangeLog') diff --git a/sim/testsuite/ChangeLog b/sim/testsuite/ChangeLog index 94d30a9..a32672a 100644 --- a/sim/testsuite/ChangeLog +++ b/sim/testsuite/ChangeLog @@ -1,3 +1,18 @@ +2021-01-11 Mike Frysinger + + * common/alu-tst.c: Include stdlib.h. + (PACKAGE): Define. + (print_hex): Change printf to use %llx. + * common/bits-gen.c: Include stdlib.h, string.h, and unistd.h. + (gen_struct): Change long long to unsigned64. + (gen_bit): Change bit cast to bit mask. Change printf to use %llx. + (gen_mask): Likewise. + (usage): Delete default case. + (main): Change WITH_HOST_WORD_BITSIZE printf from %d to %zu. Emit + PACKAGE define and stdlib.h & string.h includes. + * common/bits-tst.c (calc): Change printf to use %llx. + (check_sext, check_rot, check_extract, check_bits): Likewise. + 2021-01-09 Mike Frysinger * configure: Regenerate. @@ -368,4 +383,3 @@ Mon Sep 1 16:43:55 1997 Andrew Cagney * configure.in (configdirs): Test for the target directory instead of matching on a target. - -- cgit v1.1