Update.
[glibc.git] / sysdeps / powerpc / q_neg.c
blob8e11afdbc6205a30e2705d769aae1c0872e386fe
1 /* Negate a 128-bit floating point value.
2 Copyright (C) 1997 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If not,
17 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
20 #include <quad_float.h>
22 /* long double _q_neg(const long double *a);
23 Negate 'a'. Don't raise exceptions.
26 void
27 __q_neg(unsigned int result[4], unsigned int a[4])
29 unsigned int t1,t2;
30 t1 = a[0];
31 t2 = a[1];
32 result[0] = t1 ^ 0x80000000;
33 t1 = a[2];
34 result[1] = t2;
35 t2 = a[3];
36 result[2] = t1;
37 result[3] = t2;