Switch dir over to use the new static filesystem dir methods.
[openbios.git] / libgcc / __negti2.c
blobe97cd122884ec60addeb0abbcfae6b1022b08ef6
1 /* Extracted from gcc-3.4.1/gcc/config/mips/_tilibi.c */
2 /* A few TImode functions needed for TFmode emulated arithmetic.
3 Copyright 2002, 2003 Free Software Foundation, Inc.
4 Contributed by Alexandre Oliva <aoliva@redhat.com>
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
13 GCC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING. If not, write to
20 the Free Software Foundation, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 #include "libgcc.h"
25 #if defined(__sparc__) || defined(__ppc__)
26 #define LIBGCC2_WORDS_BIG_ENDIAN
27 #endif
29 typedef union
31 struct TIstruct {
32 #if defined(LIBGCC2_WORDS_BIG_ENDIAN)
33 DItype high, low;
34 #else
35 DItype low, high;
36 #endif
37 } s;
38 TItype ll;
39 } TIunion;
41 TItype
42 __negti2 (TItype u)
44 TIunion w;
45 TIunion uu;
47 uu.ll = u;
49 w.s.low = -uu.s.low;
50 w.s.high = -uu.s.high - ((UDItype) w.s.low > 0);
52 return w.ll;