md.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft Corporation and contributors. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #pragma once
  6. //
  7. // Machine dependent constants.
  8. //
  9. const int MachInt = 4;
  10. const int MachRegInt = 8;
  11. __declspec(selectany) const int MachPtr = 8;
  12. const int MachDouble = 8;
  13. const int MachRegDouble = 8;
  14. const int MachStackAlignment = MachPtr;
  15. const int MachArgsSlotOffset = MachPtr;
  16. const int MachMaxInstrSize = 12;
  17. const unsigned __int64 MachSignBit = 0x8000000000000000;
  18. const int MachSimd128 = 16;
  19. //
  20. //review: shouldn't we use _PAGESIZE_ from heap.h instead of hardcoded 8KB.
  21. //
  22. const int PAGESIZE = 2 * 0x1000;
  23. const IRType TyMachReg = TyInt64;
  24. const IRType TyMachPtr = TyUint64;
  25. const IRType TyMachDouble = TyFloat64;
  26. const IRType TyMachSimd128F4 = TySimd128F4;
  27. const IRType TyMachSimd128I4 = TySimd128I4;
  28. const IRType TyMachSimd128I8 = TySimd128I8;
  29. const IRType TyMachSimd128I16 = TySimd128I16;
  30. const IRType TyMachSimd128U4 = TySimd128U4;
  31. const IRType TyMachSimd128U8 = TySimd128U8;
  32. const IRType TyMachSimd128U16 = TySimd128U16;
  33. const IRType TyMachSimd128B4 = TySimd128B4;
  34. const IRType TyMachSimd128B8 = TySimd128B8;
  35. const IRType TyMachSimd128B16 = TySimd128B16;
  36. const IRType TyMachSimd128D2 = TySimd128D2;
  37. const DWORD EMIT_BUFFER_ALIGNMENT = 16;
  38. const DWORD INSTR_ALIGNMENT = 1;