Opcodes.cpp 1.1 KB

123456789101112131415161718
  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. // We only have one extended range so maximum number of opcode is only 512 unless we add more extended ranges.
  7. CompileAssert((uint)Js::OpCode::ByteCodeLast < 512);
  8. // Make sure all basic opcode with no one byte layout fits in a byte.
  9. #define MACRO(opcode, layout, attr) CompileAssert((uint)Js::OpCode::opcode <= BYTE_MAX);
  10. #define MACRO_WMS(opcode, layout, attr) CompileAssert((uint)Js::OpCode::opcode <= BYTE_MAX);
  11. // Make sure all extended opcode needs two bytes.
  12. #define MACRO_EXTEND(opcode, layout, attr) CompileAssert((uint)Js::OpCode::opcode > BYTE_MAX);
  13. #define MACRO_EXTEND_WMS(opcode, layout, attr) CompileAssert((uint)Js::OpCode::opcode > BYTE_MAX);
  14. #include "OpCodes.h"