OpCodes.cpp 1.5 KB

123456789101112131415161718192021222324252627
  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 "RuntimeByteCodePch.h"
  6. // Make sure all basic opcode with no one byte layout fits in a byte.
  7. #define MACRO(opcode, layout, attr) CompileAssert((uint)Js::OpCode::opcode <= BYTE_MAX);
  8. #define MACRO_WMS(opcode, layout, attr) CompileAssert((uint)Js::OpCode::opcode <= BYTE_MAX);
  9. // Make sure all extended opcode needs two bytes.
  10. #define MACRO_EXTEND(opcode, layout, attr) CompileAssert((uint)Js::OpCode::opcode > BYTE_MAX);
  11. #define MACRO_EXTEND_WMS(opcode, layout, attr) CompileAssert((uint)Js::OpCode::opcode > BYTE_MAX);
  12. #include "OpCodes.h"
  13. #ifdef ASMJS_PLAT
  14. // Make sure all basic opcode with no one byte layout fits in a byte.
  15. #define MACRO(opcode, layout, attr) CompileAssert((uint)Js::OpCodeAsmJs::opcode <= BYTE_MAX);
  16. #define MACRO_WMS(opcode, layout, attr) CompileAssert((uint)Js::OpCodeAsmJs::opcode <= BYTE_MAX);
  17. // Make sure all extended opcode needs two bytes.
  18. #define MACRO_EXTEND(opcode, layout, attr) CompileAssert((uint)Js::OpCodeAsmJs::opcode > BYTE_MAX);
  19. #define MACRO_EXTEND_WMS(opcode, layout, attr) CompileAssert((uint)Js::OpCodeAsmJs::opcode > BYTE_MAX);
  20. #include "OpCodesAsmJs.h"
  21. #endif