Linux64Specific.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. // Description : Specific to Linux declarations, inline functions etc.
  9. #ifndef CRYINCLUDE_CRYCOMMON_LINUX64SPECIFIC_H
  10. #define CRYINCLUDE_CRYCOMMON_LINUX64SPECIFIC_H
  11. #pragma once
  12. #if !defined(__ARM_ARCH)
  13. #define _CPU_AMD64
  14. #define _CPU_SSE
  15. #endif // __ARM_NEON
  16. //////////////////////////////////////////////////////////////////////////
  17. // Standard includes.
  18. //////////////////////////////////////////////////////////////////////////
  19. #include <malloc.h>
  20. #include <stdint.h>
  21. #include <sys/dir.h>
  22. #if !defined(__ARM_ARCH)
  23. #include <sys/io.h>
  24. #endif // __ARM_ARCH
  25. #include <fcntl.h>
  26. #include <sys/types.h>
  27. #include <sys/stat.h>
  28. #include <time.h>
  29. #include <ctype.h>
  30. #if defined(_CPU_SSE)
  31. #include <xmmintrin.h>
  32. #endif
  33. //////////////////////////////////////////////////////////////////////////
  34. //////////////////////////////////////////////////////////////////////////
  35. // Define platform independent types.
  36. //////////////////////////////////////////////////////////////////////////
  37. #include "BaseTypes.h"
  38. typedef double real;
  39. typedef uint32 DWORD;
  40. typedef DWORD* LPDWORD;
  41. typedef uint64 DWORD_PTR;
  42. typedef intptr_t INT_PTR, * PINT_PTR;
  43. typedef uintptr_t UINT_PTR, * PUINT_PTR;
  44. typedef char* LPSTR, * PSTR;
  45. typedef uint64 __uint64;
  46. #if !defined(__clang__)
  47. typedef int64 __int64;
  48. #endif
  49. typedef int64 INT64;
  50. typedef uint64 UINT64;
  51. typedef long LONG_PTR, * PLONG_PTR, * PLONG;
  52. typedef unsigned long ULONG_PTR, * PULONG_PTR;
  53. typedef uint8 BYTE;
  54. typedef uint16 WORD;
  55. typedef void* HWND;
  56. typedef UINT_PTR WPARAM;
  57. typedef LONG_PTR LPARAM;
  58. typedef LONG_PTR LRESULT;
  59. #define PLARGE_INTEGER LARGE_INTEGER *
  60. typedef const char* LPCSTR, * PCSTR;
  61. typedef long long LONGLONG;
  62. typedef ULONG_PTR SIZE_T;
  63. typedef uint8 byte;
  64. #define ILINE __forceinline
  65. #define _A_RDONLY (0x01)
  66. #define _A_SUBDIR (0x10)
  67. #define _A_HIDDEN (0x02)
  68. //////////////////////////////////////////////////////////////////////////
  69. // Win32 FileAttributes.
  70. //////////////////////////////////////////////////////////////////////////
  71. #define FILE_ATTRIBUTE_READONLY 0x00000001
  72. #define FILE_ATTRIBUTE_HIDDEN 0x00000002
  73. #define FILE_ATTRIBUTE_SYSTEM 0x00000004
  74. #define FILE_ATTRIBUTE_DIRECTORY 0x00000010
  75. #define FILE_ATTRIBUTE_ARCHIVE 0x00000020
  76. #define FILE_ATTRIBUTE_DEVICE 0x00000040
  77. #define FILE_ATTRIBUTE_NORMAL 0x00000080
  78. #define FILE_ATTRIBUTE_TEMPORARY 0x00000100
  79. #define FILE_ATTRIBUTE_SPARSE_FILE 0x00000200
  80. #define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
  81. #define FILE_ATTRIBUTE_COMPRESSED 0x00000800
  82. #define FILE_ATTRIBUTE_OFFLINE 0x00001000
  83. #define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000
  84. #define FILE_ATTRIBUTE_ENCRYPTED 0x00004000
  85. #define INVALID_FILE_ATTRIBUTES (-1)
  86. #include "LinuxSpecific.h"
  87. #define TARGET_DEFAULT_ALIGN (0x8U)
  88. #define PLATFORM_64BIT
  89. #if defined(_RELEASE) || defined(__ARM_ARCH)
  90. #define __debugbreak()
  91. #else
  92. #define __debugbreak() asm("int3")
  93. #endif
  94. #define __assume(x)
  95. #define _msize(p) malloc_usable_size(p)
  96. #endif // CRYINCLUDE_CRYCOMMON_LINUX64SPECIFIC_H