]> git.proxmox.com Git - mirror_edk2.git/blob - StdLib/LibC/Main/x86flt_rounds.c
Add Socket Libraries.
[mirror_edk2.git] / StdLib / LibC / Main / x86flt_rounds.c
1 /** @file
2 Return the current FPU rounding mode.
3
4 Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 **/
13
14 extern int internal_FPU_rmode( void );
15
16 static INT8 rmode[] = { 1, 3, 2, 0 };
17
18 int
19 __flt_rounds ( void )
20 {
21 return rmode[ internal_FPU_rmode() ];
22 }