OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgcc/] [config/] [ia64/] [tf-signs.c] - Blame information for rev 849

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 734 jeremybenn
/* Copyright (C) 2008, 2009 Free Software Foundation, Inc.
2
 
3
This file is part of GCC.
4
 
5
GCC is free software; you can redistribute it and/or modify it under
6
the terms of the GNU General Public License as published by the Free
7
Software Foundation; either version 3, or (at your option) any later
8
version.
9
 
10
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
11
WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13
for more details.
14
 
15
Under Section 7 of GPL version 3, you are granted additional
16
permissions described in the GCC Runtime Library Exception, version
17
3.1, as published by the Free Software Foundation.
18
 
19
You should have received a copy of the GNU General Public License and
20
a copy of the GCC Runtime Library Exception along with this program;
21
see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
22
<http://www.gnu.org/licenses/>.  */
23
 
24
union _FP_UNION_Q
25
{
26
   __float128 flt;
27
   struct
28
   {
29
      unsigned long frac1 : 64;
30
      unsigned long frac0 : 48;
31
      unsigned exp : 15;
32
      unsigned sign : 1;
33
   } bits __attribute__((packed));
34
};
35
 
36
__float128 __copysigntf3 (__float128, __float128);
37
__float128 __fabstf2 (__float128);
38
 
39
__float128
40
__copysigntf3 (__float128 a, __float128 b)
41
{
42
  union _FP_UNION_Q A, B;
43
 
44
  A.flt = a;
45
  B.flt = b;
46
  A.bits.sign = B.bits.sign;
47
 
48
  return A.flt;
49
}
50
 
51
__float128
52
__fabstf2 (__float128 a)
53
{
54
  union _FP_UNION_Q A;
55
 
56
  A.flt = a;
57
  A.bits.sign = 0;
58
 
59
  return A.flt;
60
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.