]> git.ipfire.org Git - people/ms/u-boot.git/blame - post/lib_powerpc/fpu/20010226-1.c
Coding Style cleanup: replace leading SPACEs by TABs
[people/ms/u-boot.git] / post / lib_powerpc / fpu / 20010226-1.c
CommitLineData
b4489621
SP
1/*
2 * Copyright (C) 2007
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
1a459660 5 * SPDX-License-Identifier: GPL-2.0+
b4489621
SP
6 */
7/*
8 * This file is originally a part of the GCC testsuite.
9 */
10
11#include <common.h>
12
b4489621
SP
13#include <post.h>
14
ce82ff05
YT
15GNU_FPOST_ATTR
16
e009cdeb
KG
17#if CONFIG_POST & CONFIG_SYS_POST_FPU
18
b4489621
SP
19int fpu_post_test_math3 (void)
20{
21 volatile long double dfrom = 1.1;
22 volatile long double m1;
23 volatile long double m2;
24 volatile unsigned long mant_long;
25
26 m1 = dfrom / 2.0;
27 m2 = m1 * 4294967296.0;
28 mant_long = ((unsigned long) m2) & 0xffffffff;
29
30 if (mant_long != 0x8ccccccc) {
31 post_log ("Error in FPU math3 test\n");
32 return -1;
33 }
34 return 0;
35}
36
6d0f6bcf 37#endif /* CONFIG_POST & CONFIG_SYS_POST_FPU */