md.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. 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. #define MD_GROW_LOCALS_AREA_UP
  7. // Don't encode large user constants, because they won't emit them as 32-bit numbers
  8. // in the instruction stream.
  9. #undef MD_ENCODE_LG_CONSTS
  10. #define MD_ENCODE_LG_CONSTS false
  11. //
  12. // Machine dependent constants.
  13. //
  14. const int MachChar = 1;
  15. const int MachShort = 2;
  16. const int MachInt = 4;
  17. const int MachRegInt = 4;
  18. __declspec(selectany) const int MachPtr = 4;
  19. const int MachDouble = 8;
  20. const int MachRegDouble = 8;
  21. const int MachArgsSlotOffset = MachPtr;
  22. const int MachStackAlignment = MachDouble;
  23. const int PAGESIZE = 0x1000;
  24. const IRType TyMachReg = TyInt32;
  25. const IRType TyMachPtr = TyUint32;
  26. const IRType TyMachDouble = TyFloat64;
  27. const DWORD EMIT_BUFFER_ALIGNMENT = 16;
  28. const DWORD INSTR_ALIGNMENT = 2;
  29. #ifdef INSERT_NOPS
  30. const int CountNops = 10;
  31. const int MachMaxInstrSize = (2 * CountNops + 1)*4;
  32. #else
  33. const int MachMaxInstrSize = 4;
  34. #endif
  35. #define SOFTWARE_FIXFOR_HARDWARE_BUGWIN8_502326