From 3f2546b2ef55b661fd8dd69682b38992225e86f6 Mon Sep 17 00:00:00 2001 From: fishsoupisgood Date: Mon, 29 Apr 2019 01:17:54 +0100 Subject: Initial import of qemu-2.4.1 --- roms/u-boot/post/lib_powerpc/fpu/20001122-1.c | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 roms/u-boot/post/lib_powerpc/fpu/20001122-1.c (limited to 'roms/u-boot/post/lib_powerpc/fpu/20001122-1.c') diff --git a/roms/u-boot/post/lib_powerpc/fpu/20001122-1.c b/roms/u-boot/post/lib_powerpc/fpu/20001122-1.c new file mode 100644 index 00000000..caf52970 --- /dev/null +++ b/roms/u-boot/post/lib_powerpc/fpu/20001122-1.c @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2007 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + * + * SPDX-License-Identifier: GPL-2.0+ + */ +/* + * This file is originally a part of the GCC testsuite. + */ + +#include + +#include + +GNU_FPOST_ATTR + +#if CONFIG_POST & CONFIG_SYS_POST_FPU + +int fpu_post_test_math1 (void) +{ + volatile double a; + double c, d; + volatile double b; + + d = 1.0; + + do + { + c = d; + d = c * 0.5; + b = 1 + d; + } while (b != 1.0); + + a = 1.0 + c; + + if (a == 1.0) { + post_log ("Error in FPU math1 test\n"); + return -1; + } + + return 0; +} + +#endif /* CONFIG_POST & CONFIG_SYS_POST_FPU */ -- cgit v1.2.3