[mlir][py] Enable loading only specified dialects during creation. (#121421)
[llvm-project.git] / lldb / source / DataFormatters / FormatterBytecode.def
blobc6645631fa0065b110c8606fe827e82546536a7a
1 //===-- FormatterBytecode.def -----------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef DEFINE_OPCODE
10 #define DEFINE_OPCODE(OP, MNEMONIC, NAME)
11 #endif
12 #ifndef DEFINE_SELECTOR
13 #define DEFINE_SELECTOR(ID, NAME)
14 #endif
15 #ifndef DEFINE_SIGNATURE
16 #define DEFINE_SIGNATURE(ID, NAME)
17 #endif
19 // Opcodes.
20 DEFINE_OPCODE(0x01, "dup", dup)
21 DEFINE_OPCODE(0x02, "drop", drop)
22 DEFINE_OPCODE(0x03, "pick", pick)
23 DEFINE_OPCODE(0x04, "over", over)
24 DEFINE_OPCODE(0x05, "swap", swap)
25 DEFINE_OPCODE(0x06, "rot", rot)
27 DEFINE_OPCODE(0x10, "{", begin)
28 DEFINE_OPCODE(0x11, "if", if)
29 DEFINE_OPCODE(0x12, "ifelse", ifelse)
31 DEFINE_OPCODE(0x20, nullptr, lit_uint)
32 DEFINE_OPCODE(0x21, nullptr, lit_int)
33 DEFINE_OPCODE(0x22, nullptr, lit_string)
34 DEFINE_OPCODE(0x23, nullptr, lit_selector)
36 DEFINE_OPCODE(0x2a, "as_int", as_int)
37 DEFINE_OPCODE(0x2b, "as_uint", as_uint)
38 DEFINE_OPCODE(0x2c, "is_null", is_null)
40 DEFINE_OPCODE(0x30, "+", plus)
41 DEFINE_OPCODE(0x31, "-", minus)
42 DEFINE_OPCODE(0x32, "*", mul)
43 DEFINE_OPCODE(0x33, "/", div)
44 DEFINE_OPCODE(0x34, "%", mod)
45 DEFINE_OPCODE(0x35, "<<", shl)
46 DEFINE_OPCODE(0x36, ">>", shr)
48 DEFINE_OPCODE(0x40, "&", and)
49 DEFINE_OPCODE(0x41, "|", or)
50 DEFINE_OPCODE(0x42, "^", xor)
51 DEFINE_OPCODE(0x43, "~", not)
53 DEFINE_OPCODE(0x50, "=", eq)
54 DEFINE_OPCODE(0x51, "!=", neq)
55 DEFINE_OPCODE(0x52, "<", lt)
56 DEFINE_OPCODE(0x53, ">", gt)
57 DEFINE_OPCODE(0x54, "=<", le)
58 DEFINE_OPCODE(0x55, ">=", ge)
60 DEFINE_OPCODE(0x60, "call", call)
62 // Selectors.
63 DEFINE_SELECTOR(0x00, summary)
64 DEFINE_SELECTOR(0x01, type_summary)
66 DEFINE_SELECTOR(0x10, get_num_children)
67 DEFINE_SELECTOR(0x11, get_child_at_index)
68 DEFINE_SELECTOR(0x12, get_child_with_name)
69 DEFINE_SELECTOR(0x13, get_child_index)
70 DEFINE_SELECTOR(0x15, get_type)
71 DEFINE_SELECTOR(0x16, get_template_argument_type)
72 DEFINE_SELECTOR(0x17, cast)
74 DEFINE_SELECTOR(0x20, get_value)
75 DEFINE_SELECTOR(0x21, get_value_as_unsigned)
76 DEFINE_SELECTOR(0x22, get_value_as_signed)
77 DEFINE_SELECTOR(0x23, get_value_as_address)
79 DEFINE_SELECTOR(0x40, read_memory_byte)
80 DEFINE_SELECTOR(0x41, read_memory_uint32)
81 DEFINE_SELECTOR(0x42, read_memory_int32)
82 DEFINE_SELECTOR(0x43, read_memory_unsigned)
83 DEFINE_SELECTOR(0x44, read_memory_signed)
84 DEFINE_SELECTOR(0x45, read_memory_address)
85 DEFINE_SELECTOR(0x46, read_memory)
87 DEFINE_SELECTOR(0x50, fmt)
88 DEFINE_SELECTOR(0x51, sprintf)
89 DEFINE_SELECTOR(0x52, strlen)
91 // Formatter signatures.
92 DEFINE_SIGNATURE(0, summary)
93 DEFINE_SIGNATURE(1, init)
94 DEFINE_SIGNATURE(2, get_num_children)
95 DEFINE_SIGNATURE(3, get_child_index)
96 DEFINE_SIGNATURE(4, get_child_at_index)
97 DEFINE_SIGNATURE(5, get_value)
99 #undef DEFINE_OPCODE
100 #undef DEFINE_SELECTOR
101 #undef DEFINE_SIGNATURE