mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
01ef4f6982
Solaris doesn't have an endian.h header, but SPARC is the only big-endian architecture that runs Solaris, so just use that to detect endianness at compile time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182419 91177308-0d34-0410-b5e6-96231b3b80d8
50 lines
1.0 KiB
C++
50 lines
1.0 KiB
C++
/*===- llvm/Support/Solaris.h ------------------------------------*- C++ -*-===*
|
|
*
|
|
* The LLVM Compiler Infrastructure
|
|
*
|
|
* This file is distributed under the University of Illinois Open Source
|
|
* License. See LICENSE.TXT for details.
|
|
*
|
|
*===----------------------------------------------------------------------===*
|
|
*
|
|
* This file contains portability fixes for Solaris hosts.
|
|
*
|
|
*===----------------------------------------------------------------------===*/
|
|
|
|
#ifndef LLVM_SUPPORT_SOLARIS_H
|
|
#define LLVM_SUPPORT_SOLARIS_H
|
|
|
|
#include <sys/types.h>
|
|
#include <sys/regset.h>
|
|
|
|
/* Solaris doesn't have endian.h. SPARC is the only supported big-endian ISA. */
|
|
#define BIG_ENDIAN 4321
|
|
#define LITTLE_ENDIAN 1234
|
|
#if defined(__sparc) || defined(__sparc__)
|
|
#define BYTE_ORDER BIG_ENDIAN
|
|
#else
|
|
#define BYTE_ORDER LITTLE_ENDIAN
|
|
#endif
|
|
|
|
#undef CS
|
|
#undef DS
|
|
#undef ES
|
|
#undef FS
|
|
#undef GS
|
|
#undef SS
|
|
#undef EAX
|
|
#undef ECX
|
|
#undef EDX
|
|
#undef EBX
|
|
#undef ESP
|
|
#undef EBP
|
|
#undef ESI
|
|
#undef EDI
|
|
#undef EIP
|
|
#undef UESP
|
|
#undef EFL
|
|
#undef ERR
|
|
#undef TRAPNO
|
|
|
|
#endif
|