From bb756eebdac6fd24e8919e2c43f7d2c8c4091f59 Mon Sep 17 00:00:00 2001 From: RajithaY Date: Tue, 25 Apr 2017 03:31:15 -0700 Subject: Adding qemu as a submodule of KVMFORNFV This Patch includes the changes to add qemu as a submodule to kvmfornfv repo and make use of the updated latest qemu for the execution of all testcase Change-Id: I1280af507a857675c7f81d30c95255635667bdd7 Signed-off-by:RajithaY --- qemu/tests/test-mul64.c | 69 ------------------------------------------------- 1 file changed, 69 deletions(-) delete mode 100644 qemu/tests/test-mul64.c (limited to 'qemu/tests/test-mul64.c') diff --git a/qemu/tests/test-mul64.c b/qemu/tests/test-mul64.c deleted file mode 100644 index 1282ec5a2..000000000 --- a/qemu/tests/test-mul64.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Test 64x64 -> 128 multiply subroutines - * - * This work is licensed under the terms of the GNU LGPL, version 2 or later. - * See the COPYING.LIB file in the top-level directory. - * - */ - -#include "qemu/osdep.h" -#include -#include "qemu/host-utils.h" - - -typedef struct { - uint64_t a, b; - uint64_t rh, rl; -} Test; - -static const Test test_u_data[] = { - { 1, 1, 0, 1 }, - { 10000, 10000, 0, 100000000 }, - { 0xffffffffffffffffULL, 2, 1, 0xfffffffffffffffeULL }, - { 0xffffffffffffffffULL, 0xffffffffffffffffULL, - 0xfffffffffffffffeULL, 0x0000000000000001ULL }, - { 0x1122334455667788ull, 0x8877665544332211ull, - 0x092228fb777ae38full, 0x0a3e963337c60008ull }, -}; - -static const Test test_s_data[] = { - { 1, 1, 0, 1 }, - { 1, -1, -1, -1 }, - { -10, -10, 0, 100 }, - { 10000, 10000, 0, 100000000 }, - { -1, 2, -1, -2 }, - { 0x1122334455667788ULL, 0x1122334455667788ULL, - 0x01258f60bbc2975cULL, 0x1eace4a3c82fb840ULL }, -}; - -static void test_u(void) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(test_u_data); ++i) { - uint64_t rl, rh; - mulu64(&rl, &rh, test_u_data[i].a, test_u_data[i].b); - g_assert_cmpuint(rl, ==, test_u_data[i].rl); - g_assert_cmpuint(rh, ==, test_u_data[i].rh); - } -} - -static void test_s(void) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(test_s_data); ++i) { - uint64_t rl, rh; - muls64(&rl, &rh, test_s_data[i].a, test_s_data[i].b); - g_assert_cmpuint(rl, ==, test_s_data[i].rl); - g_assert_cmpint(rh, ==, test_s_data[i].rh); - } -} - -int main(int argc, char **argv) -{ - g_test_init(&argc, &argv, NULL); - g_test_add_func("/host-utils/mulu64", test_u); - g_test_add_func("/host-utils/muls64", test_s); - return g_test_run(); -} -- cgit 1.2.3-korg