Example #1
0
 public RustEncoderGenerator(GeneratorContext generatorContext)
     : base(generatorContext.Types)
 {
     this.generatorContext = generatorContext;
     idConverter           = RustIdentifierConverter.Create();
     enumGenerator         = new RustEnumsGenerator(generatorContext);
 }
Example #2
0
 public RustInstrInfoGenerator(GeneratorOptions generatorOptions)
 {
     idConverter           = RustIdentifierConverter.Create();
     this.generatorOptions = generatorOptions;
     enumGenerator         = new RustEnumsGenerator(generatorOptions);
     constantsGenerator    = new RustConstantsGenerator(generatorOptions);
 }
Example #3
0
 public RustInstrCreateGen(GeneratorOptions generatorOptions)
 {
     idConverter           = RustIdentifierConverter.Create();
     this.generatorOptions = generatorOptions;
     docWriter             = new RustDocCommentWriter(idConverter);
     sb = new StringBuilder();
 }
Example #4
0
 public RustInstrCreateGen(GeneratorOptions generatorOptions)
 {
     idConverter           = RustIdentifierConverter.Create();
     this.generatorOptions = generatorOptions;
     docWriter             = new RustDocCommentWriter(idConverter);
     gen      = new InstrCreateGenImpl(idConverter, docWriter);
     genNames = GenCreateNameArgs.RustNames;
 }
 public RustInstrInfoGenerator(GeneratorContext generatorContext)
     : base(generatorContext.Types)
 {
     idConverter           = RustIdentifierConverter.Create();
     enumGenerator         = new RustEnumsGenerator(generatorContext);
     constantsGenerator    = new RustConstantsGenerator(generatorContext);
     this.generatorContext = generatorContext;
 }
Example #6
0
 public RustInstrCreateGen(GeneratorContext generatorContext)
     : base(generatorContext.Types)
 {
     this.generatorContext = generatorContext;
     idConverter           = RustIdentifierConverter.Create();
     docWriter             = new RustDocCommentWriter(idConverter);
     gen      = new InstrCreateGenImpl(genTypes, idConverter, docWriter);
     genNames = GenCreateNameArgs.RustNames;
 }
Example #7
0
 public LuaInstrCreateGen(GeneratorContext generatorContext)
     : base(generatorContext.Types)
 {
     this.generatorContext = generatorContext;
     idConverter           = LuaIdentifierConverter.Create();
     rustIdConverter       = RustIdentifierConverter.Create();
     docWriter             = new LuaDocCommentWriter(idConverter, TargetLanguage.Rust);
     sb = new StringBuilder();
 }
Example #8
0
 public RustInstrInfoGenerator(GeneratorContext generatorContext)
     : base(generatorContext.Types)
 {
     idConverter           = RustIdentifierConverter.Create();
     enumGenerator         = new RustEnumsGenerator(generatorContext);
     constantsGenerator    = new RustConstantsGenerator(generatorContext);
     this.generatorContext = generatorContext;
     opAccessType          = generatorContext.Types[TypeIds.OpAccess];
     registerType          = generatorContext.Types[TypeIds.Register];
 }
Example #9
0
        public LuaEnumsGenerator(GeneratorContext generatorContext)
            : base(generatorContext.Types)
        {
            luaIdConverter  = LuaIdentifierConverter.Create();
            rustIdConverter = RustIdentifierConverter.Create();
            rustDocWriter   = new Documentation.Rust.RustDocCommentWriter(rustIdConverter);

            var dirs = generatorContext.Types.Dirs;

            toFullFileInfo = new();
            toFullFileInfo.Add(TypeIds.BlockEncoderOptions, new FullEnumFileInfo(dirs.GetLuaFilename("BlockEncoderOptions.lua")));
            toFullFileInfo.Add(TypeIds.CC_a, new FullEnumFileInfo(dirs.GetLuaFilename("CC_a.lua")));
            toFullFileInfo.Add(TypeIds.CC_ae, new FullEnumFileInfo(dirs.GetLuaFilename("CC_ae.lua")));
            toFullFileInfo.Add(TypeIds.CC_b, new FullEnumFileInfo(dirs.GetLuaFilename("CC_b.lua")));
            toFullFileInfo.Add(TypeIds.CC_be, new FullEnumFileInfo(dirs.GetLuaFilename("CC_be.lua")));
            toFullFileInfo.Add(TypeIds.CC_e, new FullEnumFileInfo(dirs.GetLuaFilename("CC_e.lua")));
            toFullFileInfo.Add(TypeIds.CC_g, new FullEnumFileInfo(dirs.GetLuaFilename("CC_g.lua")));
            toFullFileInfo.Add(TypeIds.CC_ge, new FullEnumFileInfo(dirs.GetLuaFilename("CC_ge.lua")));
            toFullFileInfo.Add(TypeIds.CC_l, new FullEnumFileInfo(dirs.GetLuaFilename("CC_l.lua")));
            toFullFileInfo.Add(TypeIds.CC_le, new FullEnumFileInfo(dirs.GetLuaFilename("CC_le.lua")));
            toFullFileInfo.Add(TypeIds.CC_ne, new FullEnumFileInfo(dirs.GetLuaFilename("CC_ne.lua")));
            toFullFileInfo.Add(TypeIds.CC_np, new FullEnumFileInfo(dirs.GetLuaFilename("CC_np.lua")));
            toFullFileInfo.Add(TypeIds.CC_p, new FullEnumFileInfo(dirs.GetLuaFilename("CC_p.lua")));
            toFullFileInfo.Add(TypeIds.Code, new FullEnumFileInfo(dirs.GetLuaFilename("Code.lua")));
            toFullFileInfo.Add(TypeIds.CodeSize, new FullEnumFileInfo(dirs.GetLuaFilename("CodeSize.lua")));
            toFullFileInfo.Add(TypeIds.ConditionCode, new FullEnumFileInfo(dirs.GetLuaFilename("ConditionCode.lua")));
            toFullFileInfo.Add(TypeIds.CpuidFeature, new FullEnumFileInfo(dirs.GetLuaFilename("CpuidFeature.lua")));
            toFullFileInfo.Add(TypeIds.DecoderError, new FullEnumFileInfo(dirs.GetLuaFilename("DecoderError.lua")));
            toFullFileInfo.Add(TypeIds.DecoderOptions, new FullEnumFileInfo(dirs.GetLuaFilename("DecoderOptions.lua")));
            toFullFileInfo.Add(TypeIds.EncodingKind, new FullEnumFileInfo(dirs.GetLuaFilename("EncodingKind.lua")));
            toFullFileInfo.Add(TypeIds.FlowControl, new FullEnumFileInfo(dirs.GetLuaFilename("FlowControl.lua")));
            toFullFileInfo.Add(TypeIds.FormatMnemonicOptions, new FullEnumFileInfo(dirs.GetLuaFilename("FormatMnemonicOptions.lua")));
            toFullFileInfo.Add(TypeIds.MandatoryPrefix, new FullEnumFileInfo(dirs.GetLuaFilename("MandatoryPrefix.lua")));
            toFullFileInfo.Add(TypeIds.MemorySize, new FullEnumFileInfo(dirs.GetLuaFilename("MemorySize.lua")));
            toFullFileInfo.Add(TypeIds.MemorySizeOptions, new FullEnumFileInfo(dirs.GetLuaFilename("MemorySizeOptions.lua")));
            toFullFileInfo.Add(TypeIds.Mnemonic, new FullEnumFileInfo(dirs.GetLuaFilename("Mnemonic.lua")));
            toFullFileInfo.Add(TypeIds.OpAccess, new FullEnumFileInfo(dirs.GetLuaFilename("OpAccess.lua")));
            toFullFileInfo.Add(TypeIds.OpCodeOperandKind, new FullEnumFileInfo(dirs.GetLuaFilename("OpCodeOperandKind.lua")));
            toFullFileInfo.Add(TypeIds.MvexEHBit, new FullEnumFileInfo(dirs.GetLuaFilename("MvexEHBit.lua")));
            toFullFileInfo.Add(TypeIds.OpCodeTableKind, new FullEnumFileInfo(dirs.GetLuaFilename("OpCodeTableKind.lua")));
            toFullFileInfo.Add(TypeIds.OpKind, new FullEnumFileInfo(dirs.GetLuaFilename("OpKind.lua")));
            toFullFileInfo.Add(TypeIds.Register, new FullEnumFileInfo(dirs.GetLuaFilename("Register.lua")));
            toFullFileInfo.Add(TypeIds.RepPrefixKind, new FullEnumFileInfo(dirs.GetLuaFilename("RepPrefixKind.lua")));
            toFullFileInfo.Add(TypeIds.RflagsBits, new FullEnumFileInfo(dirs.GetLuaFilename("RflagsBits.lua")));
            toFullFileInfo.Add(TypeIds.RoundingControl, new FullEnumFileInfo(dirs.GetLuaFilename("RoundingControl.lua")));
            toFullFileInfo.Add(TypeIds.TupleType, new FullEnumFileInfo(dirs.GetLuaFilename("TupleType.lua")));
            toFullFileInfo.Add(TypeIds.FormatterSyntax, new FullEnumFileInfo(dirs.GetLuaFilename("FormatterSyntax.lua")));
            toFullFileInfo.Add(TypeIds.MvexConvFn, new FullEnumFileInfo(dirs.GetLuaFilename("MvexConvFn.lua")));
            toFullFileInfo.Add(TypeIds.MvexRegMemConv, new FullEnumFileInfo(dirs.GetLuaFilename("MvexRegMemConv.lua")));
            toFullFileInfo.Add(TypeIds.MvexTupleTypeLutKind, new FullEnumFileInfo(dirs.GetLuaFilename("MvexTupleTypeLutKind.lua")));

            toPartialFileInfo = new();
            toPartialFileInfo.Add(TypeIds.FormatterSyntax, new PartialEnumFileInfo("FormatterSyntax", TargetLanguage.Rust, dirs.GetLuaRustFilename("fmt.rs")));
        }
        public PythonRustConstantsGenerator(GeneratorContext generatorContext)
            : base(generatorContext.Types)
        {
            idConverter     = RustIdentifierConverter.Create();
            constantsWriter = new RustConstantsWriter(genTypes, idConverter, new RustDocCommentWriter(idConverter), new RustDeprecatedWriter(idConverter));

            var dirs = generatorContext.Types.Dirs;

            toPartialFileInfo = new Dictionary <TypeId, PartialConstantsFileInfo?>();
            toPartialFileInfo.Add(TypeIds.IcedConstants, new PartialConstantsFileInfo("IcedConstants", dirs.GetPythonRustFilename("iced_constants.rs")));
        }
Example #11
0
        public PythonEnumsGenerator(GeneratorContext generatorContext)
            : base(generatorContext.Types)
        {
            pythonIdConverter   = PythonIdentifierConverter.Create();
            rustIdConverter     = RustIdentifierConverter.Create();
            rustDocWriter       = new Documentation.Rust.RustDocCommentWriter(rustIdConverter, ".");
            exportedPythonTypes = genTypes.GetObject <ExportedPythonTypes>(TypeIds.ExportedPythonTypes);

            var dirs = generatorContext.Types.Dirs;

            toFullFileInfo = new Dictionary <TypeId, FullEnumFileInfo?>();
            toFullFileInfo.Add(TypeIds.CC_a, new FullEnumFileInfo(dirs.GetPythonPyFilename("CC_a.py")));
            toFullFileInfo.Add(TypeIds.CC_ae, new FullEnumFileInfo(dirs.GetPythonPyFilename("CC_ae.py")));
            toFullFileInfo.Add(TypeIds.CC_b, new FullEnumFileInfo(dirs.GetPythonPyFilename("CC_b.py")));
            toFullFileInfo.Add(TypeIds.CC_be, new FullEnumFileInfo(dirs.GetPythonPyFilename("CC_be.py")));
            toFullFileInfo.Add(TypeIds.CC_e, new FullEnumFileInfo(dirs.GetPythonPyFilename("CC_e.py")));
            toFullFileInfo.Add(TypeIds.CC_g, new FullEnumFileInfo(dirs.GetPythonPyFilename("CC_g.py")));
            toFullFileInfo.Add(TypeIds.CC_ge, new FullEnumFileInfo(dirs.GetPythonPyFilename("CC_ge.py")));
            toFullFileInfo.Add(TypeIds.CC_l, new FullEnumFileInfo(dirs.GetPythonPyFilename("CC_l.py")));
            toFullFileInfo.Add(TypeIds.CC_le, new FullEnumFileInfo(dirs.GetPythonPyFilename("CC_le.py")));
            toFullFileInfo.Add(TypeIds.CC_ne, new FullEnumFileInfo(dirs.GetPythonPyFilename("CC_ne.py")));
            toFullFileInfo.Add(TypeIds.CC_np, new FullEnumFileInfo(dirs.GetPythonPyFilename("CC_np.py")));
            toFullFileInfo.Add(TypeIds.CC_p, new FullEnumFileInfo(dirs.GetPythonPyFilename("CC_p.py")));
            toFullFileInfo.Add(TypeIds.Code, new FullEnumFileInfo(dirs.GetPythonPyFilename("Code.py")));
            toFullFileInfo.Add(TypeIds.CodeSize, new FullEnumFileInfo(dirs.GetPythonPyFilename("CodeSize.py")));
            toFullFileInfo.Add(TypeIds.ConditionCode, new FullEnumFileInfo(dirs.GetPythonPyFilename("ConditionCode.py")));
            toFullFileInfo.Add(TypeIds.CpuidFeature, new FullEnumFileInfo(dirs.GetPythonPyFilename("CpuidFeature.py")));
            toFullFileInfo.Add(TypeIds.DecoderError, new FullEnumFileInfo(dirs.GetPythonPyFilename("DecoderError.py")));
            toFullFileInfo.Add(TypeIds.DecoderOptions, new FullEnumFileInfo(dirs.GetPythonPyFilename("DecoderOptions.py")));
            toFullFileInfo.Add(TypeIds.EncodingKind, new FullEnumFileInfo(dirs.GetPythonPyFilename("EncodingKind.py")));
            toFullFileInfo.Add(TypeIds.FlowControl, new FullEnumFileInfo(dirs.GetPythonPyFilename("FlowControl.py")));
            toFullFileInfo.Add(TypeIds.FormatMnemonicOptions, new FullEnumFileInfo(dirs.GetPythonPyFilename("FormatMnemonicOptions.py")));
            toFullFileInfo.Add(TypeIds.MandatoryPrefix, new FullEnumFileInfo(dirs.GetPythonPyFilename("MandatoryPrefix.py")));
            toFullFileInfo.Add(TypeIds.MemorySize, new FullEnumFileInfo(dirs.GetPythonPyFilename("MemorySize.py")));
            toFullFileInfo.Add(TypeIds.MemorySizeOptions, new FullEnumFileInfo(dirs.GetPythonPyFilename("MemorySizeOptions.py")));
            toFullFileInfo.Add(TypeIds.Mnemonic, new FullEnumFileInfo(dirs.GetPythonPyFilename("Mnemonic.py")));
            toFullFileInfo.Add(TypeIds.OpAccess, new FullEnumFileInfo(dirs.GetPythonPyFilename("OpAccess.py")));
            toFullFileInfo.Add(TypeIds.OpCodeOperandKind, new FullEnumFileInfo(dirs.GetPythonPyFilename("OpCodeOperandKind.py")));
            toFullFileInfo.Add(TypeIds.OpCodeTableKind, new FullEnumFileInfo(dirs.GetPythonPyFilename("OpCodeTableKind.py")));
            toFullFileInfo.Add(TypeIds.OpKind, new FullEnumFileInfo(dirs.GetPythonPyFilename("OpKind.py")));
            toFullFileInfo.Add(TypeIds.Register, new FullEnumFileInfo(dirs.GetPythonPyFilename("Register.py")));
            toFullFileInfo.Add(TypeIds.RepPrefixKind, new FullEnumFileInfo(dirs.GetPythonPyFilename("RepPrefixKind.py")));
            toFullFileInfo.Add(TypeIds.RflagsBits, new FullEnumFileInfo(dirs.GetPythonPyFilename("RflagsBits.py")));
            toFullFileInfo.Add(TypeIds.RoundingControl, new FullEnumFileInfo(dirs.GetPythonPyFilename("RoundingControl.py")));
            toFullFileInfo.Add(TypeIds.TupleType, new FullEnumFileInfo(dirs.GetPythonPyFilename("TupleType.py")));
            toFullFileInfo.Add(TypeIds.FormatterSyntax, new FullEnumFileInfo(dirs.GetPythonPyFilename("FormatterSyntax.py")));

            toPartialFileInfo = new Dictionary <TypeId, PartialEnumFileInfo?>();
            toPartialFileInfo.Add(TypeIds.FormatterSyntax, new PartialEnumFileInfo("FormatterSyntax", TargetLanguage.Rust, dirs.GetPythonRustFilename("formatter.rs")));
        }
Example #12
0
 public PythonInstrCreateGen(GeneratorContext generatorContext)
     : base(generatorContext.Types)
 {
     this.generatorContext = generatorContext;
     idConverter           = PythonIdentifierConverter.Create();
     rustIdConverter       = RustIdentifierConverter.Create();
     docWriter             = new PythonDocCommentWriter(idConverter, TargetLanguage.Rust, isInRootModule: true);
     genNames = new Rust.GenCreateNameArgs {
         CreatePrefix = "create",
         Register     = "_reg",
         Memory       = "_mem",
         Int32        = "_i32",
         UInt32       = "_u32",
         Int64        = "_i64",
         UInt64       = "_u64",
     };
     sb = new StringBuilder();
 }
Example #13
0
 public RustJSInstrCreateGen(GeneratorOptions generatorOptions)
 {
     idConverter           = RustJSIdentifierConverter.Create();
     rustIdConverter       = RustIdentifierConverter.Create();
     this.generatorOptions = generatorOptions;
     docWriter             = new RustDocCommentWriter(idConverter, ".");
     gen      = new Rust.InstrCreateGenImpl(idConverter, docWriter);
     genNames = new Rust.GenCreateNameArgs {
         CreatePrefix = "create",
         Register     = "Reg",
         Memory       = "Mem",
         Int32        = "I32",
         UInt32       = "U32",
         Int64        = "I64",
         UInt64       = "U64",
     };
     sb = new StringBuilder();
 }
Example #14
0
 public RustJSInstrCreateGen(GeneratorContext generatorContext)
     : base(generatorContext.Types)
 {
     this.generatorContext = generatorContext;
     idConverter           = RustJSIdentifierConverter.Create();
     rustIdConverter       = RustIdentifierConverter.Create();
     docWriter             = new RustDocCommentWriter(idConverter, ".", ".", ".", ".");
     gen      = new Rust.InstrCreateGenImpl(genTypes, idConverter, docWriter);
     genNames = new Rust.GenCreateNameArgs {
         CreatePrefix = "create",
         Register     = "Reg",
         Memory       = "Mem",
         Int32        = "I32",
         UInt32       = "U32",
         Int64        = "I64",
         UInt64       = "U64",
     };
     sb = new StringBuilder();
 }
Example #15
0
        public RustConstantsGenerator(GeneratorOptions generatorOptions)
        {
            idConverter     = RustIdentifierConverter.Create();
            constantsWriter = new RustConstantsWriter(idConverter, new RustDocCommentWriter(idConverter));

            toPartialFileInfo = new Dictionary <TypeId, PartialConstantsFileInfo?>();
            toPartialFileInfo.Add(TypeIds.IcedConstants, new PartialConstantsFileInfo("IcedConstants", Path.Combine(generatorOptions.RustDir, "iced_constants.rs")));
            toPartialFileInfo.Add(TypeIds.DecoderTestParserConstants, new PartialConstantsFileInfo("DecoderTestText", Path.Combine(generatorOptions.RustDir, "decoder", "tests", "test_parser.rs"), true));
            toPartialFileInfo.Add(TypeIds.DecoderConstants, new PartialConstantsFileInfo("DecoderConstants", Path.Combine(generatorOptions.RustDir, "test_utils", "decoder_constants.rs")));
            toPartialFileInfo.Add(TypeIds.InstrInfoConstants, new PartialConstantsFileInfo("InstrInfoConstants", Path.Combine(generatorOptions.RustDir, "info", "enums.rs")));
            toPartialFileInfo.Add(TypeIds.MiscInstrInfoTestConstants, new PartialConstantsFileInfo("MiscConstants", Path.Combine(generatorOptions.RustDir, "info", "tests", "constants.rs")));
            toPartialFileInfo.Add(TypeIds.InstructionInfoKeys, new PartialConstantsFileInfo("KeysConstants", Path.Combine(generatorOptions.RustDir, "info", "tests", "test_parser.rs"), true));
            toPartialFileInfo.Add(TypeIds.InstructionInfoDecoderOptions, new PartialConstantsFileInfo("DecoderOptionsConstants", Path.Combine(generatorOptions.RustDir, "info", "tests", "test_parser.rs"), true));
            toPartialFileInfo.Add(TypeIds.RflagsBitsConstants, new PartialConstantsFileInfo("RflagsBitsConstants", Path.Combine(generatorOptions.RustDir, "info", "tests", "test_parser.rs")));
            toPartialFileInfo.Add(TypeIds.MiscSectionNames, new PartialConstantsFileInfo("MiscSectionNames", Path.Combine(generatorOptions.RustDir, "info", "tests", "misc_test_data.rs")));
            toPartialFileInfo.Add(TypeIds.OpCodeInfoKeys, new PartialConstantsFileInfo("OpCodeInfoKeys", Path.Combine(generatorOptions.RustDir, "encoder", "tests", "op_code_test_case_parser.rs"), true));
            toPartialFileInfo.Add(TypeIds.OpCodeInfoFlags, new PartialConstantsFileInfo("OpCodeInfoFlags", Path.Combine(generatorOptions.RustDir, "encoder", "tests", "op_code_test_case_parser.rs"), true));
            toPartialFileInfo.Add(TypeIds.OpCodeFlags, new PartialConstantsFileInfo("Flags", Path.Combine(generatorOptions.RustDir, "encoder", "op_code.rs")));
        }
Example #16
0
        public RustConstantsGenerator(GeneratorContext generatorContext)
            : base(generatorContext.Types)
        {
            idConverter     = RustIdentifierConverter.Create();
            constantsWriter = new RustConstantsWriter(genTypes, idConverter, new RustDocCommentWriter(idConverter), new RustDeprecatedWriter(idConverter));

            var dirs = generatorContext.Types.Dirs;

            toPartialFileInfo = new();
            toPartialFileInfo.Add(TypeIds.IcedConstants, new PartialConstantsFileInfo("IcedConstants", dirs.GetRustFilename("iced_constants.rs")));
            toPartialFileInfo.Add(TypeIds.DecoderTestParserConstants, new PartialConstantsFileInfo("DecoderTestText", dirs.GetRustFilename("decoder", "tests", "test_parser.rs"), true));
            toPartialFileInfo.Add(TypeIds.DecoderConstants, new PartialConstantsFileInfo("DecoderConstants", dirs.GetRustFilename("test_utils", "decoder_constants.rs")));
            toPartialFileInfo.Add(TypeIds.InstrInfoConstants, new PartialConstantsFileInfo("InstrInfoConstants", dirs.GetRustFilename("info", "enums.rs")));
            toPartialFileInfo.Add(TypeIds.MiscInstrInfoTestConstants, new PartialConstantsFileInfo("MiscConstants", dirs.GetRustFilename("info", "tests", "constants.rs")));
            toPartialFileInfo.Add(TypeIds.InstructionInfoKeys, new PartialConstantsFileInfo("KeysConstants", dirs.GetRustFilename("info", "tests", "test_parser.rs"), true));
            toPartialFileInfo.Add(TypeIds.RflagsBitsConstants, new PartialConstantsFileInfo("RflagsBitsConstants", dirs.GetRustFilename("info", "tests", "test_parser.rs")));
            toPartialFileInfo.Add(TypeIds.MiscSectionNames, new PartialConstantsFileInfo("MiscSectionNames", dirs.GetRustFilename("info", "tests", "misc_test_data.rs")));
            toPartialFileInfo.Add(TypeIds.OpCodeInfoKeys, new PartialConstantsFileInfo("OpCodeInfoKeys", dirs.GetRustFilename("encoder", "tests", "op_code_test_case_parser.rs"), true));
            toPartialFileInfo.Add(TypeIds.OpCodeInfoFlags, new PartialConstantsFileInfo("OpCodeInfoFlags", dirs.GetRustFilename("encoder", "tests", "op_code_test_case_parser.rs"), true));
        }
 public RustMnemonicsTableGenerator(GeneratorContext generatorContext)
 {
     idConverter           = RustIdentifierConverter.Create();
     this.generatorContext = generatorContext;
 }
        public RustEnumsGenerator(GeneratorContext generatorContext)
            : base(generatorContext.Types)
        {
            idConverter      = RustIdentifierConverter.Create();
            docWriter        = new RustDocCommentWriter(idConverter);
            deprecatedWriter = new RustDeprecatedWriter(idConverter);
            constantsWriter  = new RustConstantsWriter(genTypes, idConverter, docWriter, deprecatedWriter);

            var dir = generatorContext.RustDir;

            toPartialFileInfo = new Dictionary <TypeId, PartialEnumFileInfo?>();
            toPartialFileInfo.Add(TypeIds.Code, new PartialEnumFileInfo("Code", Path.Combine(dir, "code.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeNonExhaustive, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.CodeSize, new PartialEnumFileInfo("CodeSize", Path.Combine(dir, "enums.rs"), RustConstants.AttributeCopyEqOrdHash));
            toPartialFileInfo.Add(TypeIds.ConditionCode, new PartialEnumFileInfo("ConditionCode", Path.Combine(dir, "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.FeatureInstrInfo, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.CpuidFeature, new PartialEnumFileInfo("CpuidFeature", Path.Combine(dir, "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeNonExhaustive, RustConstants.FeatureInstrInfo, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.CpuidFeatureInternal, new PartialEnumFileInfo("CpuidFeatureInternal", Path.Combine(dir, "info", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.FeatureInstrInfo, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.DecoderOptions, new PartialEnumFileInfo("DecoderOptions", Path.Combine(dir, "decoder", "mod.rs")));
            toPartialFileInfo.Add(TypeIds.SerializedDataKind, new PartialEnumFileInfo("SerializedDataKind", Path.Combine(dir, "decoder", "table_de", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.OpCodeHandlerKind, new PartialEnumFileInfo("OpCodeHandlerKind", Path.Combine(dir, "decoder", "table_de", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.LegacyHandlerFlags, new PartialEnumFileInfo("LegacyHandlerFlags", Path.Combine(dir, "decoder", "enums.rs")));
            toPartialFileInfo.Add(TypeIds.EvexOpCodeHandlerKind, new PartialEnumFileInfo("EvexOpCodeHandlerKind", Path.Combine(dir, "decoder", "table_de", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes, RustConstants.FeatureEvex }));
            toPartialFileInfo.Add(TypeIds.VexOpCodeHandlerKind, new PartialEnumFileInfo("VexOpCodeHandlerKind", Path.Combine(dir, "decoder", "table_de", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes, RustConstants.FeatureVexOrXop }));
            toPartialFileInfo.Add(TypeIds.HandlerFlags, new PartialEnumFileInfo("HandlerFlags", Path.Combine(dir, "decoder", "mod.rs")));
            toPartialFileInfo.Add(TypeIds.MemorySize, new PartialEnumFileInfo("MemorySize", Path.Combine(dir, "memory_size.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeNonExhaustive, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.PseudoOpsKind, new PartialEnumFileInfo("PseudoOpsKind", Path.Combine(dir, "formatter", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.Register, new PartialEnumFileInfo("Register", Path.Combine(dir, "register.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeNonExhaustive }));
            toPartialFileInfo.Add(TypeIds.TupleType, new PartialEnumFileInfo("TupleType", Path.Combine(dir, "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeNonExhaustive, RustConstants.FeatureDecoderOrEncoder, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.Mnemonic, new PartialEnumFileInfo("Mnemonic", Path.Combine(dir, "mnemonic.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeNonExhaustive }));
            toPartialFileInfo.Add(TypeIds.FormatterFlowControl, new PartialEnumFileInfo("FormatterFlowControl", Path.Combine(dir, "formatter", "enums.rs"), RustConstants.AttributeCopyEq));
            toPartialFileInfo.Add(TypeIds.GasCtorKind, new PartialEnumFileInfo("CtorKind", Path.Combine(dir, "formatter", "gas", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.GasSizeOverride, new PartialEnumFileInfo("SizeOverride", Path.Combine(dir, "formatter", "gas", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.GasInstrOpInfoFlags, new PartialEnumFileInfo("InstrOpInfoFlags", Path.Combine(dir, "formatter", "gas", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.GasInstrOpKind, new PartialEnumFileInfo("InstrOpKind", Path.Combine(dir, "formatter", "gas", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.IntelCtorKind, new PartialEnumFileInfo("CtorKind", Path.Combine(dir, "formatter", "intel", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.IntelSizeOverride, new PartialEnumFileInfo("SizeOverride", Path.Combine(dir, "formatter", "intel", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.IntelBranchSizeInfo, new PartialEnumFileInfo("BranchSizeInfo", Path.Combine(dir, "formatter", "intel", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.IntelInstrOpInfoFlags, new PartialEnumFileInfo("InstrOpInfoFlags", Path.Combine(dir, "formatter", "intel", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.IntelInstrOpKind, new PartialEnumFileInfo("InstrOpKind", Path.Combine(dir, "formatter", "intel", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.MasmCtorKind, new PartialEnumFileInfo("CtorKind", Path.Combine(dir, "formatter", "masm", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.MasmInstrOpInfoFlags, new PartialEnumFileInfo("InstrOpInfoFlags", Path.Combine(dir, "formatter", "masm", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.MasmInstrOpKind, new PartialEnumFileInfo("InstrOpKind", Path.Combine(dir, "formatter", "masm", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.MasmSymbolTestFlags, new PartialEnumFileInfo("SymbolTestFlags", Path.Combine(dir, "formatter", "masm", "tests", "sym_opts.rs")));
            toPartialFileInfo.Add(TypeIds.NasmCtorKind, new PartialEnumFileInfo("CtorKind", Path.Combine(dir, "formatter", "nasm", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.NasmSignExtendInfo, new PartialEnumFileInfo("SignExtendInfo", Path.Combine(dir, "formatter", "nasm", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.NasmSizeOverride, new PartialEnumFileInfo("SizeOverride", Path.Combine(dir, "formatter", "nasm", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.NasmBranchSizeInfo, new PartialEnumFileInfo("BranchSizeInfo", Path.Combine(dir, "formatter", "nasm", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.NasmInstrOpInfoFlags, new PartialEnumFileInfo("InstrOpInfoFlags", Path.Combine(dir, "formatter", "nasm", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.NasmInstrOpKind, new PartialEnumFileInfo("InstrOpKind", Path.Combine(dir, "formatter", "nasm", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.NasmMemorySizeInfo, new PartialEnumFileInfo("MemorySizeInfo", Path.Combine(dir, "formatter", "nasm", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.NasmFarMemorySizeInfo, new PartialEnumFileInfo("FarMemorySizeInfo", Path.Combine(dir, "formatter", "nasm", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.MandatoryPrefix, new PartialEnumFileInfo("MandatoryPrefix", Path.Combine(dir, "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.FeatureOpCodeInfo }));
            toPartialFileInfo.Add(TypeIds.OpCodeTableKind, new PartialEnumFileInfo("OpCodeTableKind", Path.Combine(dir, "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.FeatureOpCodeInfo, RustConstants.AttributeNonExhaustive }));
            toPartialFileInfo.Add(TypeIds.RoundingControl, new PartialEnumFileInfo("RoundingControl", Path.Combine(dir, "enums.rs"), RustConstants.AttributeCopyEqOrdHash));
            toPartialFileInfo.Add(TypeIds.OpKind, new PartialEnumFileInfo("OpKind", Path.Combine(dir, "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.Instruction_MemoryFlags, new PartialEnumFileInfo("MemoryFlags", Path.Combine(dir, "instruction.rs")));
            toPartialFileInfo.Add(TypeIds.Instruction_OpKindFlags, new PartialEnumFileInfo("OpKindFlags", Path.Combine(dir, "instruction.rs")));
            toPartialFileInfo.Add(TypeIds.Instruction_CodeFlags, new PartialEnumFileInfo("CodeFlags", Path.Combine(dir, "instruction.rs")));
            toPartialFileInfo.Add(TypeIds.VectorLength, new PartialEnumFileInfo("VectorLength", Path.Combine(dir, "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.FeatureDecoderOrEncoder }));
            toPartialFileInfo.Add(TypeIds.MandatoryPrefixByte, new PartialEnumFileInfo("MandatoryPrefixByte", Path.Combine(dir, "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.FeatureDecoderOrEncoder }));
            toPartialFileInfo.Add(TypeIds.OpSize, new PartialEnumFileInfo("OpSize", Path.Combine(dir, "decoder", "mod.rs"), RustConstants.AttributeCopyEq));
            toPartialFileInfo.Add(TypeIds.StateFlags, new PartialEnumFileInfo("StateFlags", Path.Combine(dir, "decoder", "mod.rs")));
            toPartialFileInfo.Add(TypeIds.EncodingKind, new PartialEnumFileInfo("EncodingKind", Path.Combine(dir, "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeNonExhaustive, RustConstants.FeatureDecoderOrEncoderOrInstrInfo }));
            toPartialFileInfo.Add(TypeIds.FlowControl, new PartialEnumFileInfo("FlowControl", Path.Combine(dir, "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.FeatureInstrInfo }));
            toPartialFileInfo.Add(TypeIds.OpCodeOperandKind, new PartialEnumFileInfo("OpCodeOperandKind", Path.Combine(dir, "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeNonExhaustive, RustConstants.FeatureOpCodeInfo, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.RflagsBits, new PartialEnumFileInfo("RflagsBits", Path.Combine(dir, "enums.rs"), RustConstants.FeatureInstrInfo));
            toPartialFileInfo.Add(TypeIds.CodeInfo, new PartialEnumFileInfo("CodeInfo", Path.Combine(dir, "info", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.FeatureInstrInfo, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.RflagsInfo, new PartialEnumFileInfo("RflagsInfo", Path.Combine(dir, "info", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.FeatureInstrInfo, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.OpInfo0, new PartialEnumFileInfo("OpInfo0", Path.Combine(dir, "info", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.FeatureInstrInfo, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.OpInfo1, new PartialEnumFileInfo("OpInfo1", Path.Combine(dir, "info", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.FeatureInstrInfo, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.OpInfo2, new PartialEnumFileInfo("OpInfo2", Path.Combine(dir, "info", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.FeatureInstrInfo, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.OpInfo3, new PartialEnumFileInfo("OpInfo3", Path.Combine(dir, "info", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.FeatureInstrInfo, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.OpInfo4, new PartialEnumFileInfo("OpInfo4", Path.Combine(dir, "info", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.FeatureInstrInfo, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.InfoFlags1, new PartialEnumFileInfo("InfoFlags1", Path.Combine(dir, "info", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.FeatureInstrInfo }));
            toPartialFileInfo.Add(TypeIds.InfoFlags2, new PartialEnumFileInfo("InfoFlags2", Path.Combine(dir, "info", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.FeatureInstrInfo }));
            toPartialFileInfo.Add(TypeIds.OpAccess, new PartialEnumFileInfo("OpAccess", Path.Combine(dir, "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.FeatureInstrInfo }));
            toPartialFileInfo.Add(TypeIds.MemorySizeFlags, new PartialEnumFileInfo("MemorySizeFlags", Path.Combine(dir, "info", "tests", "constants.rs"), new[] { RustConstants.AttributeCopyEqOrdHash }));
            toPartialFileInfo.Add(TypeIds.RegisterFlags, new PartialEnumFileInfo("RegisterFlags", Path.Combine(dir, "info", "tests", "constants.rs"), new[] { RustConstants.AttributeCopyEqOrdHash }));
            toPartialFileInfo.Add(TypeIds.LegacyOpCodeTable, new PartialEnumFileInfo("LegacyOpCodeTable", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.VexOpCodeTable, new PartialEnumFileInfo("VexOpCodeTable", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes, RustConstants.FeatureVex }));
            toPartialFileInfo.Add(TypeIds.XopOpCodeTable, new PartialEnumFileInfo("XopOpCodeTable", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes, RustConstants.FeatureXop }));
            toPartialFileInfo.Add(TypeIds.EvexOpCodeTable, new PartialEnumFileInfo("EvexOpCodeTable", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes, RustConstants.FeatureEvex }));
            toPartialFileInfo.Add(TypeIds.Encodable, new PartialEnumFileInfo("Encodable", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.OpCodeHandlerFlags, new PartialEnumFileInfo("OpCodeHandlerFlags", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.FeatureEncoder }));
            toPartialFileInfo.Add(TypeIds.LegacyOpKind, new PartialEnumFileInfo("LegacyOpKind", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.VexOpKind, new PartialEnumFileInfo("VexOpKind", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes, RustConstants.FeatureVex }));
            toPartialFileInfo.Add(TypeIds.XopOpKind, new PartialEnumFileInfo("XopOpKind", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes, RustConstants.FeatureXop }));
            toPartialFileInfo.Add(TypeIds.EvexOpKind, new PartialEnumFileInfo("EvexOpKind", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes, RustConstants.FeatureEvex }));
            toPartialFileInfo.Add(TypeIds.OperandSize, new PartialEnumFileInfo("OperandSize", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.AddressSize, new PartialEnumFileInfo("AddressSize", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.VexVectorLength, new PartialEnumFileInfo("VexVectorLength", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes, RustConstants.FeatureVex }));
            toPartialFileInfo.Add(TypeIds.XopVectorLength, new PartialEnumFileInfo("XopVectorLength", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes, RustConstants.FeatureXop }));
            toPartialFileInfo.Add(TypeIds.EvexVectorLength, new PartialEnumFileInfo("EvexVectorLength", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes, RustConstants.FeatureEvex }));
            toPartialFileInfo.Add(TypeIds.DisplSize, new PartialEnumFileInfo("DisplSize", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.ImmSize, new PartialEnumFileInfo("ImmSize", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.EncoderFlags, new PartialEnumFileInfo("EncoderFlags", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.EncFlags1, new PartialEnumFileInfo("EncFlags1", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.LegacyFlags3, new PartialEnumFileInfo("LegacyFlags3", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.VexFlags3, new PartialEnumFileInfo("VexFlags3", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes, RustConstants.FeatureVex }));
            toPartialFileInfo.Add(TypeIds.XopFlags3, new PartialEnumFileInfo("XopFlags3", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes, RustConstants.FeatureXop }));
            toPartialFileInfo.Add(TypeIds.EvexFlags3, new PartialEnumFileInfo("EvexFlags3", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes, RustConstants.FeatureEvex }));
            toPartialFileInfo.Add(TypeIds.AllowedPrefixes, new PartialEnumFileInfo("AllowedPrefixes", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.LegacyFlags, new PartialEnumFileInfo("LegacyFlags", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.VexFlags, new PartialEnumFileInfo("VexFlags", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes, RustConstants.FeatureVex }));
            toPartialFileInfo.Add(TypeIds.XopFlags, new PartialEnumFileInfo("XopFlags", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes, RustConstants.FeatureXop }));
            toPartialFileInfo.Add(TypeIds.EvexFlags, new PartialEnumFileInfo("EvexFlags", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes, RustConstants.FeatureEvex }));
            toPartialFileInfo.Add(TypeIds.D3nowFlags, new PartialEnumFileInfo("D3nowFlags", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes, RustConstants.FeatureD3now }));
            toPartialFileInfo.Add(TypeIds.WBit, new PartialEnumFileInfo("WBit", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes, RustConstants.FeatureVexOrXopOrEvex }));
            toPartialFileInfo.Add(TypeIds.LKind, new PartialEnumFileInfo("LKind", Path.Combine(dir, "encoder", "op_code_fmt.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.OpCodeFlags, new PartialEnumFileInfo("Flags", Path.Combine(dir, "encoder", "op_code.rs"), new[] { RustConstants.AttributeCopyEq, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.RepPrefixKind, new PartialEnumFileInfo("RepPrefixKind", Path.Combine(dir, "encoder", "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeNonExhaustive }));
            toPartialFileInfo.Add(TypeIds.RelocKind, new PartialEnumFileInfo("RelocKind", Path.Combine(dir, "block_enc", "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeNonExhaustive }));
            toPartialFileInfo.Add(TypeIds.BlockEncoderOptions, new PartialEnumFileInfo("BlockEncoderOptions", Path.Combine(dir, "block_enc", "enums.rs"), RustConstants.AttributeCopyEqOrdHash));
            toPartialFileInfo.Add(TypeIds.NumberBase, new PartialEnumFileInfo("NumberBase", Path.Combine(dir, "formatter", "enums.rs"), RustConstants.AttributeCopyEqOrdHash));
            toPartialFileInfo.Add(TypeIds.MemorySizeOptions, new PartialEnumFileInfo("MemorySizeOptions", Path.Combine(dir, "formatter", "enums.rs"), RustConstants.AttributeCopyEqOrdHash));
            toPartialFileInfo.Add(TypeIds.FormatMnemonicOptions, new PartialEnumFileInfo("FormatMnemonicOptions", Path.Combine(dir, "formatter", "enums.rs"), RustConstants.AttributeCopyEqOrdHash));
            toPartialFileInfo.Add(TypeIds.PrefixKind, new PartialEnumFileInfo("PrefixKind", Path.Combine(dir, "formatter", "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeNonExhaustive }));
            toPartialFileInfo.Add(TypeIds.DecoratorKind, new PartialEnumFileInfo("DecoratorKind", Path.Combine(dir, "formatter", "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeNonExhaustive }));
            toPartialFileInfo.Add(TypeIds.NumberKind, new PartialEnumFileInfo("NumberKind", Path.Combine(dir, "formatter", "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeNonExhaustive }));
            toPartialFileInfo.Add(TypeIds.FormatterTextKind, new PartialEnumFileInfo("FormatterTextKind", Path.Combine(dir, "formatter", "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeNonExhaustive }));
            toPartialFileInfo.Add(TypeIds.SymbolFlags, new PartialEnumFileInfo("SymbolFlags", Path.Combine(dir, "formatter", "enums.rs"), RustConstants.AttributeCopyEqOrdHash));
            toPartialFileInfo.Add(TypeIds.CC_b, new PartialEnumFileInfo("CC_b", Path.Combine(dir, "formatter", "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.CC_ae, new PartialEnumFileInfo("CC_ae", Path.Combine(dir, "formatter", "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.CC_e, new PartialEnumFileInfo("CC_e", Path.Combine(dir, "formatter", "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.CC_ne, new PartialEnumFileInfo("CC_ne", Path.Combine(dir, "formatter", "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.CC_be, new PartialEnumFileInfo("CC_be", Path.Combine(dir, "formatter", "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.CC_a, new PartialEnumFileInfo("CC_a", Path.Combine(dir, "formatter", "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.CC_p, new PartialEnumFileInfo("CC_p", Path.Combine(dir, "formatter", "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.CC_np, new PartialEnumFileInfo("CC_np", Path.Combine(dir, "formatter", "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.CC_l, new PartialEnumFileInfo("CC_l", Path.Combine(dir, "formatter", "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.CC_ge, new PartialEnumFileInfo("CC_ge", Path.Combine(dir, "formatter", "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.CC_le, new PartialEnumFileInfo("CC_le", Path.Combine(dir, "formatter", "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.CC_g, new PartialEnumFileInfo("CC_g", Path.Combine(dir, "formatter", "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeAllowNonCamelCaseTypes }));
            toPartialFileInfo.Add(TypeIds.OptionsProps, new PartialEnumFileInfo("OptionsProps", Path.Combine(dir, "formatter", "tests", "enums.rs"), new[] { RustConstants.AttributeCopyEqOrdHash, RustConstants.AttributeAllowNonCamelCaseTypes }));
        }
 public RustRegisterInfoTableGenerator(GeneratorContext generatorContext)
 {
     idConverter           = RustIdentifierConverter.Create();
     this.generatorContext = generatorContext;
 }
Example #20
0
 public RustTableGen(GeneratorContext generatorContext)
     : base(generatorContext.Types)
 {
     this.generatorContext = generatorContext;
     idConverter           = RustIdentifierConverter.Create();
 }
Example #21
0
 public RustFormatterTableSerializer(string filename, FmtInstructionDef[] defs, EnumType ctorKindEnum)
     : base(defs, RustIdentifierConverter.Create(), ctorKindEnum["Previous"]) => this.filename = filename;
 public RustRegToAddrSizeGenerator(GeneratorContext generatorContext)
 {
     genTypes    = generatorContext.Types;
     idConverter = RustIdentifierConverter.Create();
 }
Example #23
0
 public RustD3nowCodeValuesTableGenerator(GeneratorOptions generatorOptions)
 {
     idConverter           = RustIdentifierConverter.Create();
     this.generatorOptions = generatorOptions;
 }
Example #24
0
 public RustInstructionMemorySizesGenerator(GeneratorOptions generatorOptions)
 {
     idConverter           = RustIdentifierConverter.Create();
     this.generatorOptions = generatorOptions;
 }
Example #25
0
 public RustDictGenerator(GeneratorContext generatorContext)
 {
     idConverter           = RustIdentifierConverter.Create();
     this.generatorContext = generatorContext;
 }
		public RustTupleTypeTableGenerator(GeneratorContext generatorContext) {
			idConverter = RustIdentifierConverter.Create();
			this.generatorContext = generatorContext;
		}
 public RustRegisterInfoTableGenerator(GeneratorOptions generatorOptions)
 {
     idConverter           = RustIdentifierConverter.Create();
     this.generatorOptions = generatorOptions;
 }
Example #28
0
 public EnumHashTableGen(GeneratorContext generatorContext)
 {
     idConverter           = RustIdentifierConverter.Create();
     this.generatorContext = generatorContext;
 }
 public RustInstructionMemorySizesGenerator(GeneratorContext generatorContext)
 {
     idConverter           = RustIdentifierConverter.Create();
     this.generatorContext = generatorContext;
 }
Example #30
0
 public RustMnemonicsTableGenerator(GeneratorOptions generatorOptions)
 {
     idConverter           = RustIdentifierConverter.Create();
     this.generatorOptions = generatorOptions;
 }