Home | History | Annotate | Download | only in Arm
      1 /** @file
      2 *
      3 *  Copyright (c) 2013 - 2014, ARM Limited. All rights reserved.
      4 *
      5 *  This program and the accompanying materials
      6 *  are licensed and made available under the terms and conditions of the BSD License
      7 *  which accompanies this distribution.  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 /**
     15 University of Illinois/NCSA
     16 Open Source License
     17 
     18 Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT
     19 
     20 All rights reserved.
     21 
     22 Developed by:
     23 
     24     LLVM Team
     25 
     26     University of Illinois at Urbana-Champaign
     27 
     28     http://llvm.org
     29 
     30 Permission is hereby granted, free of charge, to any person obtaining a copy of
     31 this software and associated documentation files (the "Software"), to deal with
     32 the Software without restriction, including without limitation the rights to
     33 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
     34 of the Software, and to permit persons to whom the Software is furnished to do
     35 so, subject to the following conditions:
     36 
     37     * Redistributions of source code must retain the above copyright notice,
     38       this list of conditions and the following disclaimers.
     39 
     40     * Redistributions in binary form must reproduce the above copyright notice,
     41       this list of conditions and the following disclaimers in the
     42       documentation and/or other materials provided with the distribution.
     43 
     44     * Neither the names of the LLVM Team, University of Illinois at
     45       Urbana-Champaign, nor the names of its contributors may be used to
     46       endorse or promote products derived from this Software without specific
     47       prior written permission.
     48 
     49 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     50 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
     51 FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
     52 CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     53 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     54 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
     55 SOFTWARE.
     56 **/
     57 
     58 #ifndef INT_ENDIANNESS_H
     59 #define INT_ENDIANNESS_H
     60 
     61 #include <sys/endian.h>
     62 
     63 #if _BYTE_ORDER == _BIG_ENDIAN
     64 #define _YUGA_LITTLE_ENDIAN 0
     65 #define _YUGA_BIG_ENDIAN    1
     66 #elif _BYTE_ORDER == _LITTLE_ENDIAN
     67 #define _YUGA_LITTLE_ENDIAN 1
     68 #define _YUGA_BIG_ENDIAN    0
     69 #endif /* _BYTE_ORDER */
     70 
     71 #endif /* INT_ENDIANNESS_H */
     72