AsmJSByteCodeDumper.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  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. #ifndef TEMP_DISABLE_ASMJS
  7. namespace Js {
  8. #if DBG_DUMP
  9. class AsmJsByteCodeDumper : public ByteCodeDumper
  10. {
  11. public:
  12. static void Dump(AsmJsFunc* func, FunctionBody* body);
  13. static void DumpConstants(AsmJsFunc* func, FunctionBody* body);
  14. static void DumpOp(OpCodeAsmJs op, LayoutSize layoutSize, ByteCodeReader& reader, FunctionBody* dumpFunction);
  15. static void DumpIntReg(RegSlot reg);
  16. static void DumpDoubleReg(RegSlot reg);
  17. static void DumpFloatReg(RegSlot reg);
  18. static void DumpR8Float(float value);
  19. static void DumpFloat32x4Reg(RegSlot reg);
  20. static void DumpInt32x4Reg(RegSlot reg);
  21. static void DumpFloat64x2Reg(RegSlot reg);
  22. #define LAYOUT_TYPE(layout) \
  23. static void Dump##layout(OpCodeAsmJs op, const unaligned OpLayout##layout* data, FunctionBody * dumpFunction, ByteCodeReader& reader);
  24. #define LAYOUT_TYPE_WMS(layout) \
  25. template <class T> static void Dump##layout(OpCodeAsmJs op, const unaligned T* data, FunctionBody * dumpFunction, ByteCodeReader& reader);
  26. #include "LayoutTypesAsmJs.h"
  27. };
  28. #endif
  29. }
  30. #endif