EncoderMD.h 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. #include "ARMEncode.h"
  6. class Encoder;
  7. enum RelocType {
  8. RelocTypeBranch26,
  9. RelocTypeBranch19,
  10. RelocTypeBranch14,
  11. RelocTypeLabel
  12. };
  13. enum InstructionType {
  14. None = 0,
  15. Integer = 1,
  16. Vfp = 2
  17. };
  18. #define FRAME_REG RegFP
  19. ///---------------------------------------------------------------------------
  20. ///
  21. /// class EncoderReloc
  22. ///
  23. ///---------------------------------------------------------------------------
  24. class EncodeReloc
  25. {
  26. public:
  27. static void New(EncodeReloc **pHead, RelocType relocType, BYTE *offset, IR::Instr *relocInstr, ArenaAllocator *alloc) { __debugbreak(); }
  28. public:
  29. EncodeReloc * m_next;
  30. RelocType m_relocType;
  31. BYTE * m_consumerOffset; // offset in instruction stream
  32. IR::Instr * m_relocInstr;
  33. };
  34. ///---------------------------------------------------------------------------
  35. ///
  36. /// class EncoderMD
  37. ///
  38. ///---------------------------------------------------------------------------
  39. class EncoderMD
  40. {
  41. public:
  42. EncoderMD(Func * func) { }
  43. ptrdiff_t Encode(IR::Instr * instr, BYTE *pc, BYTE* beginCodeAddress = nullptr) { __debugbreak(); return 0; }
  44. void Init(Encoder *encoder) { __debugbreak(); }
  45. void ApplyRelocs(size_t codeBufferAddress) { __debugbreak(); }
  46. static bool TryConstFold(IR::Instr *instr, IR::RegOpnd *regOpnd) { __debugbreak(); return 0; }
  47. static bool TryFold(IR::Instr *instr, IR::RegOpnd *regOpnd) { __debugbreak(); return 0; }
  48. const BYTE GetRegEncode(IR::RegOpnd *regOpnd) { __debugbreak(); return 0; }
  49. const BYTE GetFloatRegEncode(IR::RegOpnd *regOpnd) { __debugbreak(); return 0; }
  50. static const BYTE GetRegEncode(RegNum reg) { __debugbreak(); return 0; }
  51. static uint32 GetOpdope(IR::Instr *instr) { __debugbreak(); return 0; }
  52. static uint32 GetOpdope(Js::OpCode op) { __debugbreak(); return 0; }
  53. static bool IsLoad(IR::Instr *instr) { __debugbreak(); return 0; }
  54. static bool IsStore(IR::Instr *instr) { __debugbreak(); return 0; }
  55. static bool IsShifterUpdate(IR::Instr *instr) { __debugbreak(); return 0; }
  56. static bool IsShifterSub(IR::Instr *instr) { __debugbreak(); return 0; }
  57. static bool IsShifterPost(IR::Instr *instr) { __debugbreak(); return 0; }
  58. static bool SetsSBit(IR::Instr *instr) { __debugbreak(); return 0; }
  59. void AddLabelReloc(BYTE* relocAddress) { __debugbreak(); }
  60. static bool CanEncodeModConst12(DWORD constant) { __debugbreak(); return 0; }
  61. static bool CanEncodeLoadStoreOffset(int32 offset) { __debugbreak(); return 0; }
  62. static void BaseAndOffsetFromSym(IR::SymOpnd *symOpnd, RegNum *pBaseReg, int32 *pOffset, Func * func) { __debugbreak(); }
  63. static bool EncodeImmediate16(long constant, DWORD * result);
  64. void EncodeInlineeCallInfo(IR::Instr *instr, uint32 offset) { __debugbreak(); }
  65. static ENCODE_32 BranchOffset_26(int64 x);
  66. };