From nobody Sun Nov 9 20:19:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1551734714298921.5545025144032; Mon, 4 Mar 2019 13:25:14 -0800 (PST) Received: from localhost ([127.0.0.1]:33288 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0v5D-0003iR-4P for importer@patchew.org; Mon, 04 Mar 2019 16:25:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0uuF-00036R-DG for qemu-devel@nongnu.org; Mon, 04 Mar 2019 16:13:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h0uq9-0002o8-Fc for qemu-devel@nongnu.org; Mon, 04 Mar 2019 16:09:39 -0500 Received: from mx2.rt-rk.com ([89.216.37.149]:41424 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h0uq7-0002kS-Gb for qemu-devel@nongnu.org; Mon, 04 Mar 2019 16:09:37 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id C11611A20C8; Mon, 4 Mar 2019 22:09:31 +0100 (CET) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id 7FAED1A205E; Mon, 4 Mar 2019 22:09:31 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Mon, 4 Mar 2019 22:09:07 +0100 Message-Id: <1551733750-4902-12-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1551733750-4902-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1551733750-4902-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH v7 11/14] tests/tcg: target/mips: Add tests for MIPS64R6 bit count instructions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arikalo@wavecomp.com, amarkovic@wavecomp.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Aleksandar Markovic Add tests for MIPS64R6 bit count instructions. Signed-off-by: Aleksandar Markovic --- .../isa/mips64r6/bit-count/test_mips64r6_clo.c | 144 +++++++++++++++++= ++++ .../isa/mips64r6/bit-count/test_mips64r6_clz.c | 144 +++++++++++++++++= ++++ .../isa/mips64r6/bit-count/test_mips64r6_dclo.c | 144 +++++++++++++++++= ++++ .../isa/mips64r6/bit-count/test_mips64r6_dclz.c | 144 +++++++++++++++++= ++++ 4 files changed, 576 insertions(+) create mode 100644 tests/tcg/mips/user/isa/mips64r6/bit-count/test_mips64r= 6_clo.c create mode 100644 tests/tcg/mips/user/isa/mips64r6/bit-count/test_mips64r= 6_clz.c create mode 100644 tests/tcg/mips/user/isa/mips64r6/bit-count/test_mips64r= 6_dclo.c create mode 100644 tests/tcg/mips/user/isa/mips64r6/bit-count/test_mips64r= 6_dclz.c diff --git a/tests/tcg/mips/user/isa/mips64r6/bit-count/test_mips64r6_clo.c= b/tests/tcg/mips/user/isa/mips64r6/bit-count/test_mips64r6_clo.c new file mode 100644 index 0000000..ca9a739 --- /dev/null +++ b/tests/tcg/mips/user/isa/mips64r6/bit-count/test_mips64r6_clo.c @@ -0,0 +1,144 @@ +/* + * Test program for MIPS64R6 instruction CLO + * + * Copyright (C) 2019 Wave Computing, Inc. + * Copyright (C) 2019 Aleksandar Markovic + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include +#include + +#include "../../../../include/wrappers_mips64r6.h" +#include "../../../../include/test_inputs_64.h" +#include "../../../../include/test_utils_64.h" + +#define TEST_COUNT_TOTAL (PATTERN_INPUTS_64_COUNT + RANDOM_INPUTS_64_COUNT) + + +int32_t main(void) +{ + char *instruction_name =3D "CLO"; + int32_t ret; + uint32_t i; + struct timeval start, end; + double elapsed_time; + + uint64_t b64_result[TEST_COUNT_TOTAL]; + uint64_t b64_expect[TEST_COUNT_TOTAL] =3D { + 0x0000000000000020ULL, /* 0 */ + 0x0000000000000000ULL, + 0x0000000000000001ULL, + 0x0000000000000000ULL, + 0x0000000000000002ULL, + 0x0000000000000000ULL, + 0x0000000000000003ULL, + 0x0000000000000000ULL, + 0x0000000000000004ULL, /* 8 */ + 0x0000000000000000ULL, + 0x0000000000000005ULL, + 0x0000000000000000ULL, + 0x0000000000000006ULL, + 0x0000000000000000ULL, + 0x0000000000000007ULL, + 0x0000000000000000ULL, + 0x0000000000000008ULL, /* 16 */ + 0x0000000000000000ULL, + 0x0000000000000009ULL, + 0x0000000000000000ULL, + 0x000000000000000aULL, + 0x0000000000000000ULL, + 0x000000000000000bULL, + 0x0000000000000000ULL, + 0x000000000000000cULL, /* 24 */ + 0x0000000000000000ULL, + 0x000000000000000dULL, + 0x0000000000000000ULL, + 0x000000000000000eULL, + 0x0000000000000000ULL, + 0x000000000000000fULL, + 0x0000000000000000ULL, + 0x0000000000000010ULL, /* 32 */ + 0x0000000000000000ULL, + 0x0000000000000011ULL, + 0x0000000000000000ULL, + 0x0000000000000012ULL, + 0x0000000000000000ULL, + 0x0000000000000013ULL, + 0x0000000000000000ULL, + 0x0000000000000014ULL, /* 40 */ + 0x0000000000000000ULL, + 0x0000000000000015ULL, + 0x0000000000000000ULL, + 0x0000000000000016ULL, + 0x0000000000000000ULL, + 0x0000000000000017ULL, + 0x0000000000000000ULL, + 0x0000000000000018ULL, /* 48 */ + 0x0000000000000000ULL, + 0x0000000000000019ULL, + 0x0000000000000000ULL, + 0x000000000000001aULL, + 0x0000000000000000ULL, + 0x000000000000001bULL, + 0x0000000000000000ULL, + 0x000000000000001cULL, /* 56 */ + 0x0000000000000000ULL, + 0x000000000000001dULL, + 0x0000000000000000ULL, + 0x000000000000001eULL, + 0x0000000000000000ULL, + 0x000000000000001fULL, + 0x0000000000000000ULL, + 0x0000000000000001ULL, /* 64 */ + 0x0000000000000005ULL, + 0x0000000000000001ULL, + 0x0000000000000000ULL, + 0x0000000000000001ULL, + 0x0000000000000002ULL, + 0x0000000000000001ULL, + 0x0000000000000006ULL, + 0x0000000000000000ULL, /* 72 */ + 0x0000000000000001ULL, + 0x0000000000000001ULL, + 0x0000000000000001ULL, + 0x0000000000000003ULL, + 0x0000000000000001ULL, + 0x0000000000000000ULL, + 0x0000000000000001ULL, + }; + + gettimeofday(&start, NULL); + + for (i =3D 0; i < TEST_COUNT_TOTAL; i++) { + if (i < PATTERN_INPUTS_64_COUNT) { + do_mips64r6_CLO(b64_pattern_se + i, b64_result + i); + } else { + do_mips64r6_CLO(b64_random_se + (i - PATTERN_INPUTS_64_COUNT), + b64_result + i); + } + } + + gettimeofday(&end, NULL); + + elapsed_time =3D (end.tv_sec - start.tv_sec) * 1000.0; + elapsed_time +=3D (end.tv_usec - start.tv_usec) / 1000.0; + + ret =3D check_results_64(instruction_name, TEST_COUNT_TOTAL, elapsed_t= ime, + b64_result, b64_expect); + + return ret; +} diff --git a/tests/tcg/mips/user/isa/mips64r6/bit-count/test_mips64r6_clz.c= b/tests/tcg/mips/user/isa/mips64r6/bit-count/test_mips64r6_clz.c new file mode 100644 index 0000000..0a7d21d --- /dev/null +++ b/tests/tcg/mips/user/isa/mips64r6/bit-count/test_mips64r6_clz.c @@ -0,0 +1,144 @@ +/* + * Test program for MIPS64R6 instruction CLZ + * + * Copyright (C) 2019 Wave Computing, Inc. + * Copyright (C) 2019 Aleksandar Markovic + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include +#include + +#include "../../../../include/wrappers_mips64r6.h" +#include "../../../../include/test_inputs_64.h" +#include "../../../../include/test_utils_64.h" + +#define TEST_COUNT_TOTAL (PATTERN_INPUTS_64_COUNT + RANDOM_INPUTS_64_COUNT) + + +int32_t main(void) +{ + char *instruction_name =3D "CLZ"; + int32_t ret; + uint32_t i; + struct timeval start, end; + double elapsed_time; + + uint64_t b64_result[TEST_COUNT_TOTAL]; + uint64_t b64_expect[TEST_COUNT_TOTAL] =3D { + 0x0000000000000000ULL, /* 0 */ + 0x0000000000000020ULL, + 0x0000000000000000ULL, + 0x0000000000000001ULL, + 0x0000000000000000ULL, + 0x0000000000000002ULL, + 0x0000000000000000ULL, + 0x0000000000000003ULL, + 0x0000000000000000ULL, /* 8 */ + 0x0000000000000004ULL, + 0x0000000000000000ULL, + 0x0000000000000005ULL, + 0x0000000000000000ULL, + 0x0000000000000006ULL, + 0x0000000000000000ULL, + 0x0000000000000007ULL, + 0x0000000000000000ULL, /* 16 */ + 0x0000000000000008ULL, + 0x0000000000000000ULL, + 0x0000000000000009ULL, + 0x0000000000000000ULL, + 0x000000000000000aULL, + 0x0000000000000000ULL, + 0x000000000000000bULL, + 0x0000000000000000ULL, /* 24 */ + 0x000000000000000cULL, + 0x0000000000000000ULL, + 0x000000000000000dULL, + 0x0000000000000000ULL, + 0x000000000000000eULL, + 0x0000000000000000ULL, + 0x000000000000000fULL, + 0x0000000000000000ULL, /* 32 */ + 0x0000000000000010ULL, + 0x0000000000000000ULL, + 0x0000000000000011ULL, + 0x0000000000000000ULL, + 0x0000000000000012ULL, + 0x0000000000000000ULL, + 0x0000000000000013ULL, + 0x0000000000000000ULL, /* 40 */ + 0x0000000000000014ULL, + 0x0000000000000000ULL, + 0x0000000000000015ULL, + 0x0000000000000000ULL, + 0x0000000000000016ULL, + 0x0000000000000000ULL, + 0x0000000000000017ULL, + 0x0000000000000000ULL, /* 48 */ + 0x0000000000000018ULL, + 0x0000000000000000ULL, + 0x0000000000000019ULL, + 0x0000000000000000ULL, + 0x000000000000001aULL, + 0x0000000000000000ULL, + 0x000000000000001bULL, + 0x0000000000000000ULL, /* 56 */ + 0x000000000000001cULL, + 0x0000000000000000ULL, + 0x000000000000001dULL, + 0x0000000000000000ULL, + 0x000000000000001eULL, + 0x0000000000000000ULL, + 0x000000000000001fULL, + 0x0000000000000000ULL, /* 64 */ + 0x0000000000000000ULL, + 0x0000000000000000ULL, + 0x0000000000000001ULL, + 0x0000000000000000ULL, + 0x0000000000000000ULL, + 0x0000000000000000ULL, + 0x0000000000000000ULL, + 0x0000000000000002ULL, /* 72 */ + 0x0000000000000000ULL, + 0x0000000000000000ULL, + 0x0000000000000000ULL, + 0x0000000000000000ULL, + 0x0000000000000000ULL, + 0x0000000000000001ULL, + 0x0000000000000000ULL, + }; + + gettimeofday(&start, NULL); + + for (i =3D 0; i < TEST_COUNT_TOTAL; i++) { + if (i < PATTERN_INPUTS_64_COUNT) { + do_mips64r6_CLZ(b64_pattern_se + i, b64_result + i); + } else { + do_mips64r6_CLZ(b64_random_se + (i - PATTERN_INPUTS_64_COUNT), + b64_result + i); + } + } + + gettimeofday(&end, NULL); + + elapsed_time =3D (end.tv_sec - start.tv_sec) * 1000.0; + elapsed_time +=3D (end.tv_usec - start.tv_usec) / 1000.0; + + ret =3D check_results_64(instruction_name, TEST_COUNT_TOTAL, elapsed_t= ime, + b64_result, b64_expect); + + return ret; +} diff --git a/tests/tcg/mips/user/isa/mips64r6/bit-count/test_mips64r6_dclo.= c b/tests/tcg/mips/user/isa/mips64r6/bit-count/test_mips64r6_dclo.c new file mode 100644 index 0000000..72bb473 --- /dev/null +++ b/tests/tcg/mips/user/isa/mips64r6/bit-count/test_mips64r6_dclo.c @@ -0,0 +1,144 @@ +/* + * Test program for MIPS64R6 instruction DCLO + * + * Copyright (C) 2019 Wave Computing, Inc. + * Copyright (C) 2019 Aleksandar Markovic + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include +#include + +#include "../../../../include/wrappers_mips64r6.h" +#include "../../../../include/test_inputs_64.h" +#include "../../../../include/test_utils_64.h" + +#define TEST_COUNT_TOTAL (PATTERN_INPUTS_64_COUNT + RANDOM_INPUTS_64_COUNT) + + +int32_t main(void) +{ + char *instruction_name =3D "DCLO"; + int32_t ret; + uint32_t i; + struct timeval start, end; + double elapsed_time; + + uint64_t b64_result[TEST_COUNT_TOTAL]; + uint64_t b64_expect[TEST_COUNT_TOTAL] =3D { + 0x0000000000000040ULL, /* 0 */ + 0x0000000000000000ULL, + 0x0000000000000001ULL, + 0x0000000000000000ULL, + 0x0000000000000002ULL, + 0x0000000000000000ULL, + 0x0000000000000003ULL, + 0x0000000000000000ULL, + 0x0000000000000004ULL, /* 8 */ + 0x0000000000000000ULL, + 0x0000000000000005ULL, + 0x0000000000000000ULL, + 0x0000000000000006ULL, + 0x0000000000000000ULL, + 0x0000000000000007ULL, + 0x0000000000000000ULL, + 0x0000000000000008ULL, /* 16 */ + 0x0000000000000000ULL, + 0x0000000000000009ULL, + 0x0000000000000000ULL, + 0x000000000000000aULL, + 0x0000000000000000ULL, + 0x000000000000000bULL, + 0x0000000000000000ULL, + 0x000000000000000cULL, /* 24 */ + 0x0000000000000000ULL, + 0x000000000000000dULL, + 0x0000000000000000ULL, + 0x000000000000000eULL, + 0x0000000000000000ULL, + 0x000000000000000fULL, + 0x0000000000000000ULL, + 0x0000000000000010ULL, /* 32 */ + 0x0000000000000000ULL, + 0x0000000000000011ULL, + 0x0000000000000000ULL, + 0x0000000000000012ULL, + 0x0000000000000000ULL, + 0x0000000000000013ULL, + 0x0000000000000000ULL, + 0x0000000000000014ULL, /* 40 */ + 0x0000000000000000ULL, + 0x0000000000000015ULL, + 0x0000000000000000ULL, + 0x0000000000000016ULL, + 0x0000000000000000ULL, + 0x0000000000000017ULL, + 0x0000000000000000ULL, + 0x0000000000000018ULL, /* 48 */ + 0x0000000000000000ULL, + 0x0000000000000019ULL, + 0x0000000000000000ULL, + 0x000000000000001aULL, + 0x0000000000000000ULL, + 0x000000000000001bULL, + 0x0000000000000000ULL, + 0x000000000000001cULL, /* 56 */ + 0x0000000000000000ULL, + 0x000000000000001dULL, + 0x0000000000000000ULL, + 0x000000000000001eULL, + 0x0000000000000000ULL, + 0x000000000000001fULL, + 0x0000000000000000ULL, + 0x0000000000000001ULL, /* 64 */ + 0x0000000000000005ULL, + 0x0000000000000001ULL, + 0x0000000000000000ULL, + 0x0000000000000001ULL, + 0x0000000000000002ULL, + 0x0000000000000001ULL, + 0x0000000000000006ULL, + 0x0000000000000000ULL, /* 72 */ + 0x0000000000000001ULL, + 0x0000000000000001ULL, + 0x0000000000000001ULL, + 0x0000000000000003ULL, + 0x0000000000000001ULL, + 0x0000000000000000ULL, + 0x0000000000000001ULL, + }; + + gettimeofday(&start, NULL); + + for (i =3D 0; i < TEST_COUNT_TOTAL; i++) { + if (i < PATTERN_INPUTS_64_COUNT) { + do_mips64r6_DCLO((void *)&b64_pattern[i], (void *)&b64_result[= i]); + } else { + do_mips64r6_DCLO((void *)&b64_random[i - PATTERN_INPUTS_64_COU= NT], + (void *)&b64_result[i]); + } + } + + gettimeofday(&end, NULL); + + elapsed_time =3D (end.tv_sec - start.tv_sec) * 1000.0; + elapsed_time +=3D (end.tv_usec - start.tv_usec) / 1000.0; + + ret =3D check_results_64(instruction_name, TEST_COUNT_TOTAL, elapsed_t= ime, + b64_result, b64_expect); + + return ret; +} diff --git a/tests/tcg/mips/user/isa/mips64r6/bit-count/test_mips64r6_dclz.= c b/tests/tcg/mips/user/isa/mips64r6/bit-count/test_mips64r6_dclz.c new file mode 100644 index 0000000..87df12b --- /dev/null +++ b/tests/tcg/mips/user/isa/mips64r6/bit-count/test_mips64r6_dclz.c @@ -0,0 +1,144 @@ +/* + * Test program for MIPS64R6 instruction DCLZ + * + * Copyright (C) 2019 Wave Computing, Inc. + * Copyright (C) 2019 Aleksandar Markovic + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include +#include + +#include "../../../../include/wrappers_mips64r6.h" +#include "../../../../include/test_inputs_64.h" +#include "../../../../include/test_utils_64.h" + +#define TEST_COUNT_TOTAL (PATTERN_INPUTS_64_COUNT + RANDOM_INPUTS_64_COUNT) + + +int32_t main(void) +{ + char *instruction_name =3D "DCLZ"; + int32_t ret; + uint32_t i; + struct timeval start, end; + double elapsed_time; + + uint64_t b64_result[TEST_COUNT_TOTAL]; + uint64_t b64_expect[TEST_COUNT_TOTAL] =3D { + 0x0000000000000000ULL, /* 0 */ + 0x0000000000000040ULL, + 0x0000000000000000ULL, + 0x0000000000000001ULL, + 0x0000000000000000ULL, + 0x0000000000000002ULL, + 0x0000000000000000ULL, + 0x0000000000000003ULL, + 0x0000000000000000ULL, /* 8 */ + 0x0000000000000004ULL, + 0x0000000000000000ULL, + 0x0000000000000005ULL, + 0x0000000000000000ULL, + 0x0000000000000006ULL, + 0x0000000000000000ULL, + 0x0000000000000007ULL, + 0x0000000000000000ULL, /* 16 */ + 0x0000000000000008ULL, + 0x0000000000000000ULL, + 0x0000000000000009ULL, + 0x0000000000000000ULL, + 0x000000000000000aULL, + 0x0000000000000000ULL, + 0x000000000000000bULL, + 0x0000000000000000ULL, /* 24 */ + 0x000000000000000cULL, + 0x0000000000000000ULL, + 0x000000000000000dULL, + 0x0000000000000000ULL, + 0x000000000000000eULL, + 0x0000000000000000ULL, + 0x000000000000000fULL, + 0x0000000000000000ULL, /* 32 */ + 0x0000000000000010ULL, + 0x0000000000000000ULL, + 0x0000000000000011ULL, + 0x0000000000000000ULL, + 0x0000000000000012ULL, + 0x0000000000000000ULL, + 0x0000000000000013ULL, + 0x0000000000000000ULL, /* 40 */ + 0x0000000000000014ULL, + 0x0000000000000000ULL, + 0x0000000000000015ULL, + 0x0000000000000000ULL, + 0x0000000000000016ULL, + 0x0000000000000000ULL, + 0x0000000000000017ULL, + 0x0000000000000000ULL, /* 48 */ + 0x0000000000000018ULL, + 0x0000000000000000ULL, + 0x0000000000000019ULL, + 0x0000000000000000ULL, + 0x000000000000001aULL, + 0x0000000000000000ULL, + 0x000000000000001bULL, + 0x0000000000000000ULL, /* 56 */ + 0x000000000000001cULL, + 0x0000000000000000ULL, + 0x000000000000001dULL, + 0x0000000000000000ULL, + 0x000000000000001eULL, + 0x0000000000000000ULL, + 0x000000000000001fULL, + 0x0000000000000000ULL, /* 64 */ + 0x0000000000000000ULL, + 0x0000000000000000ULL, + 0x0000000000000001ULL, + 0x0000000000000000ULL, + 0x0000000000000000ULL, + 0x0000000000000000ULL, + 0x0000000000000000ULL, + 0x0000000000000002ULL, /* 72 */ + 0x0000000000000000ULL, + 0x0000000000000000ULL, + 0x0000000000000000ULL, + 0x0000000000000000ULL, + 0x0000000000000000ULL, + 0x0000000000000001ULL, + 0x0000000000000000ULL, + }; + + gettimeofday(&start, NULL); + + for (i =3D 0; i < TEST_COUNT_TOTAL; i++) { + if (i < PATTERN_INPUTS_64_COUNT) { + do_mips64r6_DCLZ(b64_pattern + i, b64_result + i); + } else { + do_mips64r6_DCLZ(b64_random + (i - PATTERN_INPUTS_64_COUNT), + b64_result + i); + } + } + + gettimeofday(&end, NULL); + + elapsed_time =3D (end.tv_sec - start.tv_sec) * 1000.0; + elapsed_time +=3D (end.tv_usec - start.tv_usec) / 1000.0; + + ret =3D check_results_64(instruction_name, TEST_COUNT_TOTAL, elapsed_t= ime, + b64_result, b64_expect); + + return ret; +} --=20 2.7.4