cachepc-qemu

Fork of AMDESE/qemu with changes for cachepc side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-qemu
Log | Files | Refs | Submodules | LICENSE | sfeed.txt

decimal128Local.h (1876B)


      1/* Local definitions for use with the decNumber C Library.
      2   Copyright (C) 2007 Free Software Foundation, Inc.
      3
      4   This file is part of GCC.
      5
      6   GCC is free software; you can redistribute it and/or modify it under
      7   the terms of the GNU General Public License as published by the Free
      8   Software Foundation; either version 2, or (at your option) any later
      9   version.
     10
     11   In addition to the permissions in the GNU General Public License,
     12   the Free Software Foundation gives you unlimited permission to link
     13   the compiled version of this file into combinations with other
     14   programs, and to distribute those combinations without any
     15   restriction coming from the use of this file.  (The General Public
     16   License restrictions do apply in other respects; for example, they
     17   cover modification of the file, and distribution when not linked
     18   into a combine executable.)
     19
     20   GCC is distributed in the hope that it will be useful, but WITHOUT ANY
     21   WARRANTY; without even the implied warranty of MERCHANTABILITY or
     22   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
     23   for more details.
     24
     25   You should have received a copy of the GNU General Public License
     26   along with GCC; see the file COPYING.  If not, write to the Free
     27   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
     28   02110-1301, USA.  */
     29
     30#if !defined(DECIMAL128LOCAL)
     31
     32/* The compiler needs sign manipulation functions for decimal128 which
     33   are not part of the decNumber package.  */
     34
     35/* Set sign; this assumes the sign was previously zero.  */
     36#define decimal128SetSign(d,b) \
     37  { (d)->bytes[WORDS_BIGENDIAN ? 0 : 15] |= ((unsigned) (b) << 7); }
     38
     39/* Clear sign.  */
     40#define decimal128ClearSign(d) \
     41  { (d)->bytes[WORDS_BIGENDIAN ? 0 : 15] &= ~0x80; }
     42
     43/* Flip sign.  */
     44#define decimal128FlipSign(d) \
     45  { (d)->bytes[WORDS_BIGENDIAN ? 0 : 15] ^= 0x80; }
     46
     47#endif