md.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 = 8;
  18. __declspec(selectany) const int MachPtr = 8;
  19. const int MachDouble = 8;
  20. const int MachRegDouble = 8;
  21. const int MachArgsSlotOffset = MachPtr;
  22. const int MachStackAlignment = 16;
  23. const int PAGESIZE = 0x1000;
  24. const IRType TyMachReg = TyInt64;
  25. const IRType TyMachPtr = TyUint64;
  26. const IRType TyMachDouble = TyFloat64;
  27. const DWORD EMIT_BUFFER_ALIGNMENT = 16;
  28. const DWORD INSTR_ALIGNMENT = 4;
  29. #ifdef INSERT_NOPS
  30. const int CountNops = 10;
  31. const int MachMaxInstrSize = (CountNops + 1)*4;
  32. #else
  33. const int MachMaxInstrSize = 4;
  34. #endif