mirror of https://github.com/icedland/iced.git
Generate classes to convert string -> enum variants (tests)
This commit is contained in:
parent
ad78eef4e6
commit
6d7e440e72
|
@ -0,0 +1,146 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Generator.Enums;
|
||||
using Generator.IO;
|
||||
|
||||
namespace Generator.Decoder.Java {
|
||||
[Generator(TargetLanguage.Java)]
|
||||
sealed class EnumHashTableGen {
|
||||
readonly IdentifierConverter idConverter;
|
||||
readonly GeneratorContext generatorContext;
|
||||
|
||||
public EnumHashTableGen(GeneratorContext generatorContext) {
|
||||
idConverter = JavaIdentifierConverter.Create();
|
||||
this.generatorContext = generatorContext;
|
||||
}
|
||||
|
||||
public void Generate() {
|
||||
var genTypes = generatorContext.Types;
|
||||
var infos = new (EnumType enumType, bool lowerCase, string enumPackage, string name)[] {
|
||||
(genTypes[TypeIds.Code], false, JavaConstants.IcedPackage, "Code"),
|
||||
(genTypes[TypeIds.CpuidFeature], false, JavaConstants.IcedPackage, "CpuidFeature"),
|
||||
(genTypes[TypeIds.DecoderError], false, JavaConstants.DecoderPackage, "DecoderError"),
|
||||
(genTypes[TypeIds.DecoderOptions], false, JavaConstants.DecoderPackage, "DecoderOptions"),
|
||||
(genTypes[TypeIds.EncodingKind], false, JavaConstants.IcedPackage, "EncodingKind"),
|
||||
(genTypes[TypeIds.FlowControl], false, JavaConstants.IcedPackage, "FlowControl"),
|
||||
(genTypes[TypeIds.MemorySize], false, JavaConstants.IcedPackage, "MemorySize"),
|
||||
(genTypes[TypeIds.Mnemonic], false, JavaConstants.IcedPackage, "Mnemonic"),
|
||||
(genTypes[TypeIds.OpCodeOperandKind], false, JavaConstants.InstructionInfoPackage, "OpCodeOperandKind"),
|
||||
(genTypes[TypeIds.Register], true, JavaConstants.IcedPackage, "Register"),
|
||||
(genTypes[TypeIds.TupleType], false, JavaConstants.IcedPackage, "TupleType"),
|
||||
(genTypes[TypeIds.ConditionCode], false, JavaConstants.IcedPackage, "ConditionCode"),
|
||||
(genTypes[TypeIds.MemorySizeOptions], false, JavaConstants.FormatterPackage, "MemorySizeOptions"),
|
||||
(genTypes[TypeIds.NumberBase], false, JavaConstants.FormatterPackage, "NumberBase"),
|
||||
(genTypes[TypeIds.OptionsProps], false, JavaConstants.FormatterPackage, "OptionsProps"),
|
||||
(genTypes[TypeIds.CC_b], false, JavaConstants.FormatterPackage, "CC_b"),
|
||||
(genTypes[TypeIds.CC_ae], false, JavaConstants.FormatterPackage, "CC_ae"),
|
||||
(genTypes[TypeIds.CC_e], false, JavaConstants.FormatterPackage, "CC_e"),
|
||||
(genTypes[TypeIds.CC_ne], false, JavaConstants.FormatterPackage, "CC_ne"),
|
||||
(genTypes[TypeIds.CC_be], false, JavaConstants.FormatterPackage, "CC_be"),
|
||||
(genTypes[TypeIds.CC_a], false, JavaConstants.FormatterPackage, "CC_a"),
|
||||
(genTypes[TypeIds.CC_p], false, JavaConstants.FormatterPackage, "CC_p"),
|
||||
(genTypes[TypeIds.CC_np], false, JavaConstants.FormatterPackage, "CC_np"),
|
||||
(genTypes[TypeIds.CC_l], false, JavaConstants.FormatterPackage, "CC_l"),
|
||||
(genTypes[TypeIds.CC_ge], false, JavaConstants.FormatterPackage, "CC_ge"),
|
||||
(genTypes[TypeIds.CC_le], false, JavaConstants.FormatterPackage, "CC_le"),
|
||||
(genTypes[TypeIds.CC_g], false, JavaConstants.FormatterPackage, "CC_g"),
|
||||
(genTypes[TypeIds.MvexConvFn], false, JavaConstants.IcedPackage, "MvexConvFn"),
|
||||
(genTypes[TypeIds.MvexTupleTypeLutKind], false, JavaConstants.IcedPackage, "MvexTupleTypeLutKind"),
|
||||
};
|
||||
foreach (var info in infos) {
|
||||
// Java method byte code limitations
|
||||
const int maxVariantsPerMethod = 500;
|
||||
|
||||
var className = "To" + info.name;
|
||||
var filename = JavaConstants.GetTestFilename(genTypes, JavaConstants.IcedPackage, className + ".java");
|
||||
using (var writer = new FileWriter(TargetLanguage.Java, FileUtils.OpenWrite(filename))) {
|
||||
writer.WriteFileHeader();
|
||||
writer.WriteLine($"package {JavaConstants.IcedPackage};");
|
||||
writer.WriteLine();
|
||||
writer.WriteLine("import java.util.HashMap;");
|
||||
writer.WriteLine("import java.util.Iterator;");
|
||||
if (info.enumPackage != JavaConstants.IcedPackage) {
|
||||
writer.WriteLine();
|
||||
writer.WriteLine($"import {info.enumPackage}.{info.name};");
|
||||
}
|
||||
writer.WriteLine();
|
||||
writer.WriteLine($"public final class {className} {{");
|
||||
using (writer.Indent()) {
|
||||
var enumValues = info.enumType.Values.
|
||||
Where(a => !a.DeprecatedInfo.IsDeprecatedAndRenamed &&
|
||||
!(a.DeprecatedInfo.IsDeprecated && a.DeprecatedInfo.IsError)).ToArray();
|
||||
writer.WriteLine("static Integer tryGet(String key) {");
|
||||
using (writer.Indent())
|
||||
writer.WriteLine("return map.get(key);");
|
||||
writer.WriteLine("}");
|
||||
writer.WriteLine();
|
||||
writer.WriteLine("static Integer get(String key) {");
|
||||
using (writer.Indent()) {
|
||||
writer.WriteLine("Integer value = tryGet(key);");
|
||||
writer.WriteLine("if (value == null)");
|
||||
using (writer.Indent())
|
||||
writer.WriteLine($"throw new UnsupportedOperationException(String.format(\"Couldn't find enum variant {info.name}.%s\", key));");
|
||||
writer.WriteLine("return value;");
|
||||
}
|
||||
writer.WriteLine("}");
|
||||
writer.WriteLine();
|
||||
writer.WriteLine("static Iterator<String> names() {");
|
||||
using (writer.Indent())
|
||||
writer.WriteLine("return map.keySet().iterator();");
|
||||
writer.WriteLine("}");
|
||||
writer.WriteLine();
|
||||
writer.WriteLine("static Iterator<Integer> values() {");
|
||||
using (writer.Indent())
|
||||
writer.WriteLine("return map.values().iterator();");
|
||||
writer.WriteLine("}");
|
||||
writer.WriteLine();
|
||||
writer.WriteLine("static int size() {");
|
||||
using (writer.Indent())
|
||||
writer.WriteLine("return map.size();");
|
||||
writer.WriteLine("}");
|
||||
writer.WriteLine();
|
||||
writer.WriteLine("static HashMap<String, Integer> copy() {");
|
||||
using (writer.Indent())
|
||||
writer.WriteLine("return new HashMap<String, Integer>(map);");
|
||||
writer.WriteLine("}");
|
||||
writer.WriteLine();
|
||||
writer.WriteLine("private static final HashMap<String, Integer> map = getMap();");
|
||||
writer.WriteLine();
|
||||
int variantMethods = (info.enumType.Values.Length + maxVariantsPerMethod - 1) / maxVariantsPerMethod;
|
||||
writer.WriteLine("private static HashMap<String, Integer> getMap() {");
|
||||
using (writer.Indent()) {
|
||||
writer.WriteLine($"HashMap<String, Integer> map = new HashMap<String, Integer>({enumValues.Length});");
|
||||
for (int i = 0; i < variantMethods; i++)
|
||||
writer.WriteLine($"initMap{i}(map);");
|
||||
writer.WriteLine("return map;");
|
||||
}
|
||||
writer.WriteLine("}");
|
||||
for (int i = 0; i < variantMethods; i++) {
|
||||
writer.WriteLine();
|
||||
int start = i * maxVariantsPerMethod;
|
||||
int end = Math.Min(start + maxVariantsPerMethod, enumValues.Length);
|
||||
bool anyDeprec = enumValues.Skip(start).Take(end - start).Any(a => a.DeprecatedInfo.IsDeprecated);
|
||||
if (anyDeprec)
|
||||
writer.WriteLine("@SuppressWarnings(\"deprecation\")");
|
||||
writer.WriteLine($"private static void initMap{i}(HashMap<String, Integer> map) {{");
|
||||
using (writer.Indent()) {
|
||||
for (int j = start; j < end; j++) {
|
||||
var value = enumValues[j];
|
||||
var key = value.RawName;
|
||||
if (info.lowerCase)
|
||||
key = key.ToLowerInvariant();
|
||||
writer.WriteLine($"map.put(\"{key}\", {idConverter.ToDeclTypeAndValue(value)});");
|
||||
}
|
||||
}
|
||||
writer.WriteLine("}");
|
||||
}
|
||||
}
|
||||
writer.WriteLine("}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.github.icedland.iced.x86.fmt.CC_a;
|
||||
|
||||
public final class ToCC_a {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant CC_a.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(2);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("a", CC_a.A);
|
||||
map.put("nbe", CC_a.NBE);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.github.icedland.iced.x86.fmt.CC_ae;
|
||||
|
||||
public final class ToCC_ae {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant CC_ae.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(3);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("ae", CC_ae.AE);
|
||||
map.put("nb", CC_ae.NB);
|
||||
map.put("nc", CC_ae.NC);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.github.icedland.iced.x86.fmt.CC_b;
|
||||
|
||||
public final class ToCC_b {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant CC_b.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(3);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("b", CC_b.B);
|
||||
map.put("c", CC_b.C);
|
||||
map.put("nae", CC_b.NAE);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.github.icedland.iced.x86.fmt.CC_be;
|
||||
|
||||
public final class ToCC_be {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant CC_be.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(2);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("be", CC_be.BE);
|
||||
map.put("na", CC_be.NA);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.github.icedland.iced.x86.fmt.CC_e;
|
||||
|
||||
public final class ToCC_e {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant CC_e.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(2);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("e", CC_e.E);
|
||||
map.put("z", CC_e.Z);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.github.icedland.iced.x86.fmt.CC_g;
|
||||
|
||||
public final class ToCC_g {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant CC_g.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(2);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("g", CC_g.G);
|
||||
map.put("nle", CC_g.NLE);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.github.icedland.iced.x86.fmt.CC_ge;
|
||||
|
||||
public final class ToCC_ge {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant CC_ge.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(2);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("ge", CC_ge.GE);
|
||||
map.put("nl", CC_ge.NL);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.github.icedland.iced.x86.fmt.CC_l;
|
||||
|
||||
public final class ToCC_l {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant CC_l.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(2);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("l", CC_l.L);
|
||||
map.put("nge", CC_l.NGE);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.github.icedland.iced.x86.fmt.CC_le;
|
||||
|
||||
public final class ToCC_le {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant CC_le.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(2);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("le", CC_le.LE);
|
||||
map.put("ng", CC_le.NG);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.github.icedland.iced.x86.fmt.CC_ne;
|
||||
|
||||
public final class ToCC_ne {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant CC_ne.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(2);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("ne", CC_ne.NE);
|
||||
map.put("nz", CC_ne.NZ);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.github.icedland.iced.x86.fmt.CC_np;
|
||||
|
||||
public final class ToCC_np {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant CC_np.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(2);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("np", CC_np.NP);
|
||||
map.put("po", CC_np.PO);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.github.icedland.iced.x86.fmt.CC_p;
|
||||
|
||||
public final class ToCC_p {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant CC_p.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(2);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("p", CC_p.P);
|
||||
map.put("pe", CC_p.PE);
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,66 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
public final class ToConditionCode {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant ConditionCode.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(17);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("None", ConditionCode.NONE);
|
||||
map.put("o", ConditionCode.O);
|
||||
map.put("no", ConditionCode.NO);
|
||||
map.put("b", ConditionCode.B);
|
||||
map.put("ae", ConditionCode.AE);
|
||||
map.put("e", ConditionCode.E);
|
||||
map.put("ne", ConditionCode.NE);
|
||||
map.put("be", ConditionCode.BE);
|
||||
map.put("a", ConditionCode.A);
|
||||
map.put("s", ConditionCode.S);
|
||||
map.put("ns", ConditionCode.NS);
|
||||
map.put("p", ConditionCode.P);
|
||||
map.put("np", ConditionCode.NP);
|
||||
map.put("l", ConditionCode.L);
|
||||
map.put("ge", ConditionCode.GE);
|
||||
map.put("le", ConditionCode.LE);
|
||||
map.put("g", ConditionCode.G);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,211 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
public final class ToCpuidFeature {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant CpuidFeature.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(162);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("INTEL8086", CpuidFeature.INTEL8086);
|
||||
map.put("INTEL8086_ONLY", CpuidFeature.INTEL8086_ONLY);
|
||||
map.put("INTEL186", CpuidFeature.INTEL186);
|
||||
map.put("INTEL286", CpuidFeature.INTEL286);
|
||||
map.put("INTEL286_ONLY", CpuidFeature.INTEL286_ONLY);
|
||||
map.put("INTEL386", CpuidFeature.INTEL386);
|
||||
map.put("INTEL386_ONLY", CpuidFeature.INTEL386_ONLY);
|
||||
map.put("INTEL386_A0_ONLY", CpuidFeature.INTEL386_A0_ONLY);
|
||||
map.put("INTEL486", CpuidFeature.INTEL486);
|
||||
map.put("INTEL486_A_ONLY", CpuidFeature.INTEL486_A_ONLY);
|
||||
map.put("UMOV", CpuidFeature.UMOV);
|
||||
map.put("IA64", CpuidFeature.IA64);
|
||||
map.put("X64", CpuidFeature.X64);
|
||||
map.put("ADX", CpuidFeature.ADX);
|
||||
map.put("AES", CpuidFeature.AES);
|
||||
map.put("AVX", CpuidFeature.AVX);
|
||||
map.put("AVX2", CpuidFeature.AVX2);
|
||||
map.put("AVX512_4FMAPS", CpuidFeature.AVX512_4FMAPS);
|
||||
map.put("AVX512_4VNNIW", CpuidFeature.AVX512_4VNNIW);
|
||||
map.put("AVX512_BF16", CpuidFeature.AVX512_BF16);
|
||||
map.put("AVX512_BITALG", CpuidFeature.AVX512_BITALG);
|
||||
map.put("AVX512_IFMA", CpuidFeature.AVX512_IFMA);
|
||||
map.put("AVX512_VBMI", CpuidFeature.AVX512_VBMI);
|
||||
map.put("AVX512_VBMI2", CpuidFeature.AVX512_VBMI2);
|
||||
map.put("AVX512_VNNI", CpuidFeature.AVX512_VNNI);
|
||||
map.put("AVX512_VP2INTERSECT", CpuidFeature.AVX512_VP2INTERSECT);
|
||||
map.put("AVX512_VPOPCNTDQ", CpuidFeature.AVX512_VPOPCNTDQ);
|
||||
map.put("AVX512BW", CpuidFeature.AVX512BW);
|
||||
map.put("AVX512CD", CpuidFeature.AVX512CD);
|
||||
map.put("AVX512DQ", CpuidFeature.AVX512DQ);
|
||||
map.put("AVX512ER", CpuidFeature.AVX512ER);
|
||||
map.put("AVX512F", CpuidFeature.AVX512F);
|
||||
map.put("AVX512PF", CpuidFeature.AVX512PF);
|
||||
map.put("AVX512VL", CpuidFeature.AVX512VL);
|
||||
map.put("BMI1", CpuidFeature.BMI1);
|
||||
map.put("BMI2", CpuidFeature.BMI2);
|
||||
map.put("CET_IBT", CpuidFeature.CET_IBT);
|
||||
map.put("CET_SS", CpuidFeature.CET_SS);
|
||||
map.put("CL1INVMB", CpuidFeature.CL1INVMB);
|
||||
map.put("CLDEMOTE", CpuidFeature.CLDEMOTE);
|
||||
map.put("CLFLUSHOPT", CpuidFeature.CLFLUSHOPT);
|
||||
map.put("CLFSH", CpuidFeature.CLFSH);
|
||||
map.put("CLWB", CpuidFeature.CLWB);
|
||||
map.put("CLZERO", CpuidFeature.CLZERO);
|
||||
map.put("CMOV", CpuidFeature.CMOV);
|
||||
map.put("CMPXCHG16B", CpuidFeature.CMPXCHG16B);
|
||||
map.put("CPUID", CpuidFeature.CPUID);
|
||||
map.put("CX8", CpuidFeature.CX8);
|
||||
map.put("D3NOW", CpuidFeature.D3NOW);
|
||||
map.put("D3NOWEXT", CpuidFeature.D3NOWEXT);
|
||||
map.put("OSS", CpuidFeature.OSS);
|
||||
map.put("ENQCMD", CpuidFeature.ENQCMD);
|
||||
map.put("F16C", CpuidFeature.F16C);
|
||||
map.put("FMA", CpuidFeature.FMA);
|
||||
map.put("FMA4", CpuidFeature.FMA4);
|
||||
map.put("FPU", CpuidFeature.FPU);
|
||||
map.put("FPU287", CpuidFeature.FPU287);
|
||||
map.put("FPU287XL_ONLY", CpuidFeature.FPU287XL_ONLY);
|
||||
map.put("FPU387", CpuidFeature.FPU387);
|
||||
map.put("FPU387SL_ONLY", CpuidFeature.FPU387SL_ONLY);
|
||||
map.put("FSGSBASE", CpuidFeature.FSGSBASE);
|
||||
map.put("FXSR", CpuidFeature.FXSR);
|
||||
map.put("CYRIX_D3NOW", CpuidFeature.CYRIX_D3NOW);
|
||||
map.put("GFNI", CpuidFeature.GFNI);
|
||||
map.put("HLE", CpuidFeature.HLE);
|
||||
map.put("HLE_or_RTM", CpuidFeature.HLE_OR_RTM);
|
||||
map.put("INVEPT", CpuidFeature.INVEPT);
|
||||
map.put("INVPCID", CpuidFeature.INVPCID);
|
||||
map.put("INVVPID", CpuidFeature.INVVPID);
|
||||
map.put("LWP", CpuidFeature.LWP);
|
||||
map.put("LZCNT", CpuidFeature.LZCNT);
|
||||
map.put("MCOMMIT", CpuidFeature.MCOMMIT);
|
||||
map.put("MMX", CpuidFeature.MMX);
|
||||
map.put("MONITOR", CpuidFeature.MONITOR);
|
||||
map.put("MONITORX", CpuidFeature.MONITORX);
|
||||
map.put("MOVBE", CpuidFeature.MOVBE);
|
||||
map.put("MOVDIR64B", CpuidFeature.MOVDIR64B);
|
||||
map.put("MOVDIRI", CpuidFeature.MOVDIRI);
|
||||
map.put("MPX", CpuidFeature.MPX);
|
||||
map.put("MSR", CpuidFeature.MSR);
|
||||
map.put("MULTIBYTENOP", CpuidFeature.MULTIBYTENOP);
|
||||
map.put("PADLOCK_ACE", CpuidFeature.PADLOCK_ACE);
|
||||
map.put("PADLOCK_PHE", CpuidFeature.PADLOCK_PHE);
|
||||
map.put("PADLOCK_PMM", CpuidFeature.PADLOCK_PMM);
|
||||
map.put("PADLOCK_RNG", CpuidFeature.PADLOCK_RNG);
|
||||
map.put("PAUSE", CpuidFeature.PAUSE);
|
||||
map.put("PCLMULQDQ", CpuidFeature.PCLMULQDQ);
|
||||
map.put("PCOMMIT", CpuidFeature.PCOMMIT);
|
||||
map.put("PCONFIG", CpuidFeature.PCONFIG);
|
||||
map.put("PKU", CpuidFeature.PKU);
|
||||
map.put("POPCNT", CpuidFeature.POPCNT);
|
||||
map.put("PREFETCHW", CpuidFeature.PREFETCHW);
|
||||
map.put("PREFETCHWT1", CpuidFeature.PREFETCHWT1);
|
||||
map.put("PTWRITE", CpuidFeature.PTWRITE);
|
||||
map.put("RDPID", CpuidFeature.RDPID);
|
||||
map.put("RDPMC", CpuidFeature.RDPMC);
|
||||
map.put("RDPRU", CpuidFeature.RDPRU);
|
||||
map.put("RDRAND", CpuidFeature.RDRAND);
|
||||
map.put("RDSEED", CpuidFeature.RDSEED);
|
||||
map.put("RDTSCP", CpuidFeature.RDTSCP);
|
||||
map.put("RTM", CpuidFeature.RTM);
|
||||
map.put("SEP", CpuidFeature.SEP);
|
||||
map.put("SGX1", CpuidFeature.SGX1);
|
||||
map.put("SHA", CpuidFeature.SHA);
|
||||
map.put("SKINIT", CpuidFeature.SKINIT);
|
||||
map.put("SKINIT_or_SVM", CpuidFeature.SKINIT_OR_SVM);
|
||||
map.put("SMAP", CpuidFeature.SMAP);
|
||||
map.put("SMX", CpuidFeature.SMX);
|
||||
map.put("SSE", CpuidFeature.SSE);
|
||||
map.put("SSE2", CpuidFeature.SSE2);
|
||||
map.put("SSE3", CpuidFeature.SSE3);
|
||||
map.put("SSE4_1", CpuidFeature.SSE4_1);
|
||||
map.put("SSE4_2", CpuidFeature.SSE4_2);
|
||||
map.put("SSE4A", CpuidFeature.SSE4A);
|
||||
map.put("SSSE3", CpuidFeature.SSSE3);
|
||||
map.put("SVM", CpuidFeature.SVM);
|
||||
map.put("SEV_ES", CpuidFeature.SEV_ES);
|
||||
map.put("SYSCALL", CpuidFeature.SYSCALL);
|
||||
map.put("TBM", CpuidFeature.TBM);
|
||||
map.put("TSC", CpuidFeature.TSC);
|
||||
map.put("VAES", CpuidFeature.VAES);
|
||||
map.put("VMX", CpuidFeature.VMX);
|
||||
map.put("VPCLMULQDQ", CpuidFeature.VPCLMULQDQ);
|
||||
map.put("WAITPKG", CpuidFeature.WAITPKG);
|
||||
map.put("WBNOINVD", CpuidFeature.WBNOINVD);
|
||||
map.put("XOP", CpuidFeature.XOP);
|
||||
map.put("XSAVE", CpuidFeature.XSAVE);
|
||||
map.put("XSAVEC", CpuidFeature.XSAVEC);
|
||||
map.put("XSAVEOPT", CpuidFeature.XSAVEOPT);
|
||||
map.put("XSAVES", CpuidFeature.XSAVES);
|
||||
map.put("SEV_SNP", CpuidFeature.SEV_SNP);
|
||||
map.put("SERIALIZE", CpuidFeature.SERIALIZE);
|
||||
map.put("TSXLDTRK", CpuidFeature.TSXLDTRK);
|
||||
map.put("INVLPGB", CpuidFeature.INVLPGB);
|
||||
map.put("AMX_BF16", CpuidFeature.AMX_BF16);
|
||||
map.put("AMX_TILE", CpuidFeature.AMX_TILE);
|
||||
map.put("AMX_INT8", CpuidFeature.AMX_INT8);
|
||||
map.put("CYRIX_FPU", CpuidFeature.CYRIX_FPU);
|
||||
map.put("CYRIX_SMM", CpuidFeature.CYRIX_SMM);
|
||||
map.put("CYRIX_SMINT", CpuidFeature.CYRIX_SMINT);
|
||||
map.put("CYRIX_SMINT_0F7E", CpuidFeature.CYRIX_SMINT_0F7E);
|
||||
map.put("CYRIX_SHR", CpuidFeature.CYRIX_SHR);
|
||||
map.put("CYRIX_DDI", CpuidFeature.CYRIX_DDI);
|
||||
map.put("CYRIX_EMMI", CpuidFeature.CYRIX_EMMI);
|
||||
map.put("CYRIX_DMI", CpuidFeature.CYRIX_DMI);
|
||||
map.put("CENTAUR_AIS", CpuidFeature.CENTAUR_AIS);
|
||||
map.put("MOV_TR", CpuidFeature.MOV_TR);
|
||||
map.put("SMM", CpuidFeature.SMM);
|
||||
map.put("TDX", CpuidFeature.TDX);
|
||||
map.put("KL", CpuidFeature.KL);
|
||||
map.put("AESKLE", CpuidFeature.AESKLE);
|
||||
map.put("WIDE_KL", CpuidFeature.WIDE_KL);
|
||||
map.put("UINTR", CpuidFeature.UINTR);
|
||||
map.put("HRESET", CpuidFeature.HRESET);
|
||||
map.put("AVX_VNNI", CpuidFeature.AVX_VNNI);
|
||||
map.put("PADLOCK_GMI", CpuidFeature.PADLOCK_GMI);
|
||||
map.put("FRED", CpuidFeature.FRED);
|
||||
map.put("LKGS", CpuidFeature.LKGS);
|
||||
map.put("AVX512_FP16", CpuidFeature.AVX512_FP16);
|
||||
map.put("UDBG", CpuidFeature.UDBG);
|
||||
map.put("KNC", CpuidFeature.KNC);
|
||||
map.put("PADLOCK_UNDOC", CpuidFeature.PADLOCK_UNDOC);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.github.icedland.iced.x86.dec.DecoderError;
|
||||
|
||||
public final class ToDecoderError {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant DecoderError.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(3);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("None", DecoderError.NONE);
|
||||
map.put("InvalidInstruction", DecoderError.INVALID_INSTRUCTION);
|
||||
map.put("NoMoreBytes", DecoderError.NO_MORE_BYTES);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.github.icedland.iced.x86.dec.DecoderOptions;
|
||||
|
||||
public final class ToDecoderOptions {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant DecoderOptions.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(26);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("None", DecoderOptions.NONE);
|
||||
map.put("NoInvalidCheck", DecoderOptions.NO_INVALID_CHECK);
|
||||
map.put("AMD", DecoderOptions.AMD);
|
||||
map.put("ForceReservedNop", DecoderOptions.FORCE_RESERVED_NOP);
|
||||
map.put("Umov", DecoderOptions.UMOV);
|
||||
map.put("Xbts", DecoderOptions.XBTS);
|
||||
map.put("Cmpxchg486A", DecoderOptions.CMPXCHG486A);
|
||||
map.put("OldFpu", DecoderOptions.OLD_FPU);
|
||||
map.put("Pcommit", DecoderOptions.PCOMMIT);
|
||||
map.put("Loadall286", DecoderOptions.LOADALL286);
|
||||
map.put("Loadall386", DecoderOptions.LOADALL386);
|
||||
map.put("Cl1invmb", DecoderOptions.CL1INVMB);
|
||||
map.put("MovTr", DecoderOptions.MOV_TR);
|
||||
map.put("Jmpe", DecoderOptions.JMPE);
|
||||
map.put("NoPause", DecoderOptions.NO_PAUSE);
|
||||
map.put("NoWbnoinvd", DecoderOptions.NO_WBNOINVD);
|
||||
map.put("Udbg", DecoderOptions.UDBG);
|
||||
map.put("NoMPFX_0FBC", DecoderOptions.NO_MPFX_0FBC);
|
||||
map.put("NoMPFX_0FBD", DecoderOptions.NO_MPFX_0FBD);
|
||||
map.put("NoLahfSahf64", DecoderOptions.NO_LAHF_SAHF_64);
|
||||
map.put("MPX", DecoderOptions.MPX);
|
||||
map.put("Cyrix", DecoderOptions.CYRIX);
|
||||
map.put("Cyrix_SMINT_0F7E", DecoderOptions.CYRIX_SMINT_0F7E);
|
||||
map.put("Cyrix_DMI", DecoderOptions.CYRIX_DMI);
|
||||
map.put("ALTINST", DecoderOptions.ALTINST);
|
||||
map.put("KNC", DecoderOptions.KNC);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
public final class ToEncodingKind {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant EncodingKind.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(6);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("Legacy", EncodingKind.LEGACY);
|
||||
map.put("VEX", EncodingKind.VEX);
|
||||
map.put("EVEX", EncodingKind.EVEX);
|
||||
map.put("XOP", EncodingKind.XOP);
|
||||
map.put("D3NOW", EncodingKind.D3NOW);
|
||||
map.put("MVEX", EncodingKind.MVEX);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
public final class ToFlowControl {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant FlowControl.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(10);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("Next", FlowControl.NEXT);
|
||||
map.put("UnconditionalBranch", FlowControl.UNCONDITIONAL_BRANCH);
|
||||
map.put("IndirectBranch", FlowControl.INDIRECT_BRANCH);
|
||||
map.put("ConditionalBranch", FlowControl.CONDITIONAL_BRANCH);
|
||||
map.put("Return", FlowControl.RETURN);
|
||||
map.put("Call", FlowControl.CALL);
|
||||
map.put("IndirectCall", FlowControl.INDIRECT_CALL);
|
||||
map.put("Interrupt", FlowControl.INTERRUPT);
|
||||
map.put("XbeginXabortXend", FlowControl.XBEGIN_XABORT_XEND);
|
||||
map.put("Exception", FlowControl.EXCEPTION);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,209 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
public final class ToMemorySize {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant MemorySize.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(160);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("Unknown", MemorySize.UNKNOWN);
|
||||
map.put("UInt8", MemorySize.UINT8);
|
||||
map.put("UInt16", MemorySize.UINT16);
|
||||
map.put("UInt32", MemorySize.UINT32);
|
||||
map.put("UInt52", MemorySize.UINT52);
|
||||
map.put("UInt64", MemorySize.UINT64);
|
||||
map.put("UInt128", MemorySize.UINT128);
|
||||
map.put("UInt256", MemorySize.UINT256);
|
||||
map.put("UInt512", MemorySize.UINT512);
|
||||
map.put("Int8", MemorySize.INT8);
|
||||
map.put("Int16", MemorySize.INT16);
|
||||
map.put("Int32", MemorySize.INT32);
|
||||
map.put("Int64", MemorySize.INT64);
|
||||
map.put("Int128", MemorySize.INT128);
|
||||
map.put("Int256", MemorySize.INT256);
|
||||
map.put("Int512", MemorySize.INT512);
|
||||
map.put("SegPtr16", MemorySize.SEG_PTR16);
|
||||
map.put("SegPtr32", MemorySize.SEG_PTR32);
|
||||
map.put("SegPtr64", MemorySize.SEG_PTR64);
|
||||
map.put("WordOffset", MemorySize.WORD_OFFSET);
|
||||
map.put("DwordOffset", MemorySize.DWORD_OFFSET);
|
||||
map.put("QwordOffset", MemorySize.QWORD_OFFSET);
|
||||
map.put("Bound16_WordWord", MemorySize.BOUND16_WORD_WORD);
|
||||
map.put("Bound32_DwordDword", MemorySize.BOUND32_DWORD_DWORD);
|
||||
map.put("Bnd32", MemorySize.BND32);
|
||||
map.put("Bnd64", MemorySize.BND64);
|
||||
map.put("Fword6", MemorySize.FWORD6);
|
||||
map.put("Fword10", MemorySize.FWORD10);
|
||||
map.put("Float16", MemorySize.FLOAT16);
|
||||
map.put("Float32", MemorySize.FLOAT32);
|
||||
map.put("Float64", MemorySize.FLOAT64);
|
||||
map.put("Float80", MemorySize.FLOAT80);
|
||||
map.put("Float128", MemorySize.FLOAT128);
|
||||
map.put("BFloat16", MemorySize.BFLOAT16);
|
||||
map.put("FpuEnv14", MemorySize.FPU_ENV14);
|
||||
map.put("FpuEnv28", MemorySize.FPU_ENV28);
|
||||
map.put("FpuState94", MemorySize.FPU_STATE94);
|
||||
map.put("FpuState108", MemorySize.FPU_STATE108);
|
||||
map.put("Fxsave_512Byte", MemorySize.FXSAVE_512BYTE);
|
||||
map.put("Fxsave64_512Byte", MemorySize.FXSAVE64_512BYTE);
|
||||
map.put("Xsave", MemorySize.XSAVE);
|
||||
map.put("Xsave64", MemorySize.XSAVE64);
|
||||
map.put("Bcd", MemorySize.BCD);
|
||||
map.put("Tilecfg", MemorySize.TILECFG);
|
||||
map.put("Tile", MemorySize.TILE);
|
||||
map.put("SegmentDescSelector", MemorySize.SEGMENT_DESC_SELECTOR);
|
||||
map.put("KLHandleAes128", MemorySize.KLHANDLE_AES128);
|
||||
map.put("KLHandleAes256", MemorySize.KLHANDLE_AES256);
|
||||
map.put("Packed16_UInt8", MemorySize.PACKED16_UINT8);
|
||||
map.put("Packed16_Int8", MemorySize.PACKED16_INT8);
|
||||
map.put("Packed32_UInt8", MemorySize.PACKED32_UINT8);
|
||||
map.put("Packed32_Int8", MemorySize.PACKED32_INT8);
|
||||
map.put("Packed32_UInt16", MemorySize.PACKED32_UINT16);
|
||||
map.put("Packed32_Int16", MemorySize.PACKED32_INT16);
|
||||
map.put("Packed32_Float16", MemorySize.PACKED32_FLOAT16);
|
||||
map.put("Packed32_BFloat16", MemorySize.PACKED32_BFLOAT16);
|
||||
map.put("Packed64_UInt8", MemorySize.PACKED64_UINT8);
|
||||
map.put("Packed64_Int8", MemorySize.PACKED64_INT8);
|
||||
map.put("Packed64_UInt16", MemorySize.PACKED64_UINT16);
|
||||
map.put("Packed64_Int16", MemorySize.PACKED64_INT16);
|
||||
map.put("Packed64_UInt32", MemorySize.PACKED64_UINT32);
|
||||
map.put("Packed64_Int32", MemorySize.PACKED64_INT32);
|
||||
map.put("Packed64_Float16", MemorySize.PACKED64_FLOAT16);
|
||||
map.put("Packed64_Float32", MemorySize.PACKED64_FLOAT32);
|
||||
map.put("Packed128_UInt8", MemorySize.PACKED128_UINT8);
|
||||
map.put("Packed128_Int8", MemorySize.PACKED128_INT8);
|
||||
map.put("Packed128_UInt16", MemorySize.PACKED128_UINT16);
|
||||
map.put("Packed128_Int16", MemorySize.PACKED128_INT16);
|
||||
map.put("Packed128_UInt32", MemorySize.PACKED128_UINT32);
|
||||
map.put("Packed128_Int32", MemorySize.PACKED128_INT32);
|
||||
map.put("Packed128_UInt52", MemorySize.PACKED128_UINT52);
|
||||
map.put("Packed128_UInt64", MemorySize.PACKED128_UINT64);
|
||||
map.put("Packed128_Int64", MemorySize.PACKED128_INT64);
|
||||
map.put("Packed128_Float16", MemorySize.PACKED128_FLOAT16);
|
||||
map.put("Packed128_Float32", MemorySize.PACKED128_FLOAT32);
|
||||
map.put("Packed128_Float64", MemorySize.PACKED128_FLOAT64);
|
||||
map.put("Packed128_2xFloat16", MemorySize.PACKED128_2X_FLOAT16);
|
||||
map.put("Packed128_2xBFloat16", MemorySize.PACKED128_2X_BFLOAT16);
|
||||
map.put("Packed256_UInt8", MemorySize.PACKED256_UINT8);
|
||||
map.put("Packed256_Int8", MemorySize.PACKED256_INT8);
|
||||
map.put("Packed256_UInt16", MemorySize.PACKED256_UINT16);
|
||||
map.put("Packed256_Int16", MemorySize.PACKED256_INT16);
|
||||
map.put("Packed256_UInt32", MemorySize.PACKED256_UINT32);
|
||||
map.put("Packed256_Int32", MemorySize.PACKED256_INT32);
|
||||
map.put("Packed256_UInt52", MemorySize.PACKED256_UINT52);
|
||||
map.put("Packed256_UInt64", MemorySize.PACKED256_UINT64);
|
||||
map.put("Packed256_Int64", MemorySize.PACKED256_INT64);
|
||||
map.put("Packed256_UInt128", MemorySize.PACKED256_UINT128);
|
||||
map.put("Packed256_Int128", MemorySize.PACKED256_INT128);
|
||||
map.put("Packed256_Float16", MemorySize.PACKED256_FLOAT16);
|
||||
map.put("Packed256_Float32", MemorySize.PACKED256_FLOAT32);
|
||||
map.put("Packed256_Float64", MemorySize.PACKED256_FLOAT64);
|
||||
map.put("Packed256_Float128", MemorySize.PACKED256_FLOAT128);
|
||||
map.put("Packed256_2xFloat16", MemorySize.PACKED256_2X_FLOAT16);
|
||||
map.put("Packed256_2xBFloat16", MemorySize.PACKED256_2X_BFLOAT16);
|
||||
map.put("Packed512_UInt8", MemorySize.PACKED512_UINT8);
|
||||
map.put("Packed512_Int8", MemorySize.PACKED512_INT8);
|
||||
map.put("Packed512_UInt16", MemorySize.PACKED512_UINT16);
|
||||
map.put("Packed512_Int16", MemorySize.PACKED512_INT16);
|
||||
map.put("Packed512_UInt32", MemorySize.PACKED512_UINT32);
|
||||
map.put("Packed512_Int32", MemorySize.PACKED512_INT32);
|
||||
map.put("Packed512_UInt52", MemorySize.PACKED512_UINT52);
|
||||
map.put("Packed512_UInt64", MemorySize.PACKED512_UINT64);
|
||||
map.put("Packed512_Int64", MemorySize.PACKED512_INT64);
|
||||
map.put("Packed512_UInt128", MemorySize.PACKED512_UINT128);
|
||||
map.put("Packed512_Float16", MemorySize.PACKED512_FLOAT16);
|
||||
map.put("Packed512_Float32", MemorySize.PACKED512_FLOAT32);
|
||||
map.put("Packed512_Float64", MemorySize.PACKED512_FLOAT64);
|
||||
map.put("Packed512_2xFloat16", MemorySize.PACKED512_2X_FLOAT16);
|
||||
map.put("Packed512_2xBFloat16", MemorySize.PACKED512_2X_BFLOAT16);
|
||||
map.put("Broadcast32_Float16", MemorySize.BROADCAST32_FLOAT16);
|
||||
map.put("Broadcast64_UInt32", MemorySize.BROADCAST64_UINT32);
|
||||
map.put("Broadcast64_Int32", MemorySize.BROADCAST64_INT32);
|
||||
map.put("Broadcast64_Float16", MemorySize.BROADCAST64_FLOAT16);
|
||||
map.put("Broadcast64_Float32", MemorySize.BROADCAST64_FLOAT32);
|
||||
map.put("Broadcast128_Int16", MemorySize.BROADCAST128_INT16);
|
||||
map.put("Broadcast128_UInt16", MemorySize.BROADCAST128_UINT16);
|
||||
map.put("Broadcast128_UInt32", MemorySize.BROADCAST128_UINT32);
|
||||
map.put("Broadcast128_Int32", MemorySize.BROADCAST128_INT32);
|
||||
map.put("Broadcast128_UInt52", MemorySize.BROADCAST128_UINT52);
|
||||
map.put("Broadcast128_UInt64", MemorySize.BROADCAST128_UINT64);
|
||||
map.put("Broadcast128_Int64", MemorySize.BROADCAST128_INT64);
|
||||
map.put("Broadcast128_Float16", MemorySize.BROADCAST128_FLOAT16);
|
||||
map.put("Broadcast128_Float32", MemorySize.BROADCAST128_FLOAT32);
|
||||
map.put("Broadcast128_Float64", MemorySize.BROADCAST128_FLOAT64);
|
||||
map.put("Broadcast128_2xInt16", MemorySize.BROADCAST128_2X_INT16);
|
||||
map.put("Broadcast128_2xInt32", MemorySize.BROADCAST128_2X_INT32);
|
||||
map.put("Broadcast128_2xUInt32", MemorySize.BROADCAST128_2X_UINT32);
|
||||
map.put("Broadcast128_2xFloat16", MemorySize.BROADCAST128_2X_FLOAT16);
|
||||
map.put("Broadcast128_2xBFloat16", MemorySize.BROADCAST128_2X_BFLOAT16);
|
||||
map.put("Broadcast256_Int16", MemorySize.BROADCAST256_INT16);
|
||||
map.put("Broadcast256_UInt16", MemorySize.BROADCAST256_UINT16);
|
||||
map.put("Broadcast256_UInt32", MemorySize.BROADCAST256_UINT32);
|
||||
map.put("Broadcast256_Int32", MemorySize.BROADCAST256_INT32);
|
||||
map.put("Broadcast256_UInt52", MemorySize.BROADCAST256_UINT52);
|
||||
map.put("Broadcast256_UInt64", MemorySize.BROADCAST256_UINT64);
|
||||
map.put("Broadcast256_Int64", MemorySize.BROADCAST256_INT64);
|
||||
map.put("Broadcast256_Float16", MemorySize.BROADCAST256_FLOAT16);
|
||||
map.put("Broadcast256_Float32", MemorySize.BROADCAST256_FLOAT32);
|
||||
map.put("Broadcast256_Float64", MemorySize.BROADCAST256_FLOAT64);
|
||||
map.put("Broadcast256_2xInt16", MemorySize.BROADCAST256_2X_INT16);
|
||||
map.put("Broadcast256_2xInt32", MemorySize.BROADCAST256_2X_INT32);
|
||||
map.put("Broadcast256_2xUInt32", MemorySize.BROADCAST256_2X_UINT32);
|
||||
map.put("Broadcast256_2xFloat16", MemorySize.BROADCAST256_2X_FLOAT16);
|
||||
map.put("Broadcast256_2xBFloat16", MemorySize.BROADCAST256_2X_BFLOAT16);
|
||||
map.put("Broadcast512_Int16", MemorySize.BROADCAST512_INT16);
|
||||
map.put("Broadcast512_UInt16", MemorySize.BROADCAST512_UINT16);
|
||||
map.put("Broadcast512_UInt32", MemorySize.BROADCAST512_UINT32);
|
||||
map.put("Broadcast512_Int32", MemorySize.BROADCAST512_INT32);
|
||||
map.put("Broadcast512_UInt52", MemorySize.BROADCAST512_UINT52);
|
||||
map.put("Broadcast512_UInt64", MemorySize.BROADCAST512_UINT64);
|
||||
map.put("Broadcast512_Int64", MemorySize.BROADCAST512_INT64);
|
||||
map.put("Broadcast512_Float16", MemorySize.BROADCAST512_FLOAT16);
|
||||
map.put("Broadcast512_Float32", MemorySize.BROADCAST512_FLOAT32);
|
||||
map.put("Broadcast512_Float64", MemorySize.BROADCAST512_FLOAT64);
|
||||
map.put("Broadcast512_2xFloat16", MemorySize.BROADCAST512_2X_FLOAT16);
|
||||
map.put("Broadcast512_2xInt16", MemorySize.BROADCAST512_2X_INT16);
|
||||
map.put("Broadcast512_2xUInt32", MemorySize.BROADCAST512_2X_UINT32);
|
||||
map.put("Broadcast512_2xInt32", MemorySize.BROADCAST512_2X_INT32);
|
||||
map.put("Broadcast512_2xBFloat16", MemorySize.BROADCAST512_2X_BFLOAT16);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.github.icedland.iced.x86.fmt.MemorySizeOptions;
|
||||
|
||||
public final class ToMemorySizeOptions {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant MemorySizeOptions.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(4);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("Default", MemorySizeOptions.DEFAULT);
|
||||
map.put("Always", MemorySizeOptions.ALWAYS);
|
||||
map.put("Minimal", MemorySizeOptions.MINIMAL);
|
||||
map.put("Never", MemorySizeOptions.NEVER);
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,62 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
public final class ToMvexConvFn {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant MvexConvFn.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(13);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("None", MvexConvFn.NONE);
|
||||
map.put("Sf32", MvexConvFn.SF32);
|
||||
map.put("Sf64", MvexConvFn.SF64);
|
||||
map.put("Si32", MvexConvFn.SI32);
|
||||
map.put("Si64", MvexConvFn.SI64);
|
||||
map.put("Uf32", MvexConvFn.UF32);
|
||||
map.put("Uf64", MvexConvFn.UF64);
|
||||
map.put("Ui32", MvexConvFn.UI32);
|
||||
map.put("Ui64", MvexConvFn.UI64);
|
||||
map.put("Df32", MvexConvFn.DF32);
|
||||
map.put("Df64", MvexConvFn.DF64);
|
||||
map.put("Di32", MvexConvFn.DI32);
|
||||
map.put("Di64", MvexConvFn.DI64);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
public final class ToMvexTupleTypeLutKind {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant MvexTupleTypeLutKind.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(14);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("Int32", MvexTupleTypeLutKind.INT32);
|
||||
map.put("Int32_Half", MvexTupleTypeLutKind.INT32_HALF);
|
||||
map.put("Int32_4to16", MvexTupleTypeLutKind.INT32_4TO16);
|
||||
map.put("Int32_1to16_or_elem", MvexTupleTypeLutKind.INT32_1TO16_OR_ELEM);
|
||||
map.put("Int64", MvexTupleTypeLutKind.INT64);
|
||||
map.put("Int64_4to8", MvexTupleTypeLutKind.INT64_4TO8);
|
||||
map.put("Int64_1to8_or_elem", MvexTupleTypeLutKind.INT64_1TO8_OR_ELEM);
|
||||
map.put("Float32", MvexTupleTypeLutKind.FLOAT32);
|
||||
map.put("Float32_Half", MvexTupleTypeLutKind.FLOAT32_HALF);
|
||||
map.put("Float32_4to16", MvexTupleTypeLutKind.FLOAT32_4TO16);
|
||||
map.put("Float32_1to16_or_elem", MvexTupleTypeLutKind.FLOAT32_1TO16_OR_ELEM);
|
||||
map.put("Float64", MvexTupleTypeLutKind.FLOAT64);
|
||||
map.put("Float64_4to8", MvexTupleTypeLutKind.FLOAT64_4TO8);
|
||||
map.put("Float64_1to8_or_elem", MvexTupleTypeLutKind.FLOAT64_1TO8_OR_ELEM);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.github.icedland.iced.x86.fmt.NumberBase;
|
||||
|
||||
public final class ToNumberBase {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant NumberBase.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(4);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("Hexadecimal", NumberBase.HEXADECIMAL);
|
||||
map.put("Decimal", NumberBase.DECIMAL);
|
||||
map.put("Octal", NumberBase.OCTAL);
|
||||
map.put("Binary", NumberBase.BINARY);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,160 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.github.icedland.iced.x86.info.OpCodeOperandKind;
|
||||
|
||||
public final class ToOpCodeOperandKind {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant OpCodeOperandKind.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(109);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("None", OpCodeOperandKind.NONE);
|
||||
map.put("farbr2_2", OpCodeOperandKind.FARBR2_2);
|
||||
map.put("farbr4_2", OpCodeOperandKind.FARBR4_2);
|
||||
map.put("mem_offs", OpCodeOperandKind.MEM_OFFS);
|
||||
map.put("mem", OpCodeOperandKind.MEM);
|
||||
map.put("mem_mpx", OpCodeOperandKind.MEM_MPX);
|
||||
map.put("mem_mib", OpCodeOperandKind.MEM_MIB);
|
||||
map.put("mem_vsib32x", OpCodeOperandKind.MEM_VSIB32X);
|
||||
map.put("mem_vsib64x", OpCodeOperandKind.MEM_VSIB64X);
|
||||
map.put("mem_vsib32y", OpCodeOperandKind.MEM_VSIB32Y);
|
||||
map.put("mem_vsib64y", OpCodeOperandKind.MEM_VSIB64Y);
|
||||
map.put("mem_vsib32z", OpCodeOperandKind.MEM_VSIB32Z);
|
||||
map.put("mem_vsib64z", OpCodeOperandKind.MEM_VSIB64Z);
|
||||
map.put("r8_or_mem", OpCodeOperandKind.R8_OR_MEM);
|
||||
map.put("r16_or_mem", OpCodeOperandKind.R16_OR_MEM);
|
||||
map.put("r32_or_mem", OpCodeOperandKind.R32_OR_MEM);
|
||||
map.put("r32_or_mem_mpx", OpCodeOperandKind.R32_OR_MEM_MPX);
|
||||
map.put("r64_or_mem", OpCodeOperandKind.R64_OR_MEM);
|
||||
map.put("r64_or_mem_mpx", OpCodeOperandKind.R64_OR_MEM_MPX);
|
||||
map.put("mm_or_mem", OpCodeOperandKind.MM_OR_MEM);
|
||||
map.put("xmm_or_mem", OpCodeOperandKind.XMM_OR_MEM);
|
||||
map.put("ymm_or_mem", OpCodeOperandKind.YMM_OR_MEM);
|
||||
map.put("zmm_or_mem", OpCodeOperandKind.ZMM_OR_MEM);
|
||||
map.put("bnd_or_mem_mpx", OpCodeOperandKind.BND_OR_MEM_MPX);
|
||||
map.put("k_or_mem", OpCodeOperandKind.K_OR_MEM);
|
||||
map.put("r8_reg", OpCodeOperandKind.R8_REG);
|
||||
map.put("r8_opcode", OpCodeOperandKind.R8_OPCODE);
|
||||
map.put("r16_reg", OpCodeOperandKind.R16_REG);
|
||||
map.put("r16_reg_mem", OpCodeOperandKind.R16_REG_MEM);
|
||||
map.put("r16_rm", OpCodeOperandKind.R16_RM);
|
||||
map.put("r16_opcode", OpCodeOperandKind.R16_OPCODE);
|
||||
map.put("r32_reg", OpCodeOperandKind.R32_REG);
|
||||
map.put("r32_reg_mem", OpCodeOperandKind.R32_REG_MEM);
|
||||
map.put("r32_rm", OpCodeOperandKind.R32_RM);
|
||||
map.put("r32_opcode", OpCodeOperandKind.R32_OPCODE);
|
||||
map.put("r32_vvvv", OpCodeOperandKind.R32_VVVV);
|
||||
map.put("r64_reg", OpCodeOperandKind.R64_REG);
|
||||
map.put("r64_reg_mem", OpCodeOperandKind.R64_REG_MEM);
|
||||
map.put("r64_rm", OpCodeOperandKind.R64_RM);
|
||||
map.put("r64_opcode", OpCodeOperandKind.R64_OPCODE);
|
||||
map.put("r64_vvvv", OpCodeOperandKind.R64_VVVV);
|
||||
map.put("seg_reg", OpCodeOperandKind.SEG_REG);
|
||||
map.put("k_reg", OpCodeOperandKind.K_REG);
|
||||
map.put("kp1_reg", OpCodeOperandKind.KP1_REG);
|
||||
map.put("k_rm", OpCodeOperandKind.K_RM);
|
||||
map.put("k_vvvv", OpCodeOperandKind.K_VVVV);
|
||||
map.put("mm_reg", OpCodeOperandKind.MM_REG);
|
||||
map.put("mm_rm", OpCodeOperandKind.MM_RM);
|
||||
map.put("xmm_reg", OpCodeOperandKind.XMM_REG);
|
||||
map.put("xmm_rm", OpCodeOperandKind.XMM_RM);
|
||||
map.put("xmm_vvvv", OpCodeOperandKind.XMM_VVVV);
|
||||
map.put("xmmp3_vvvv", OpCodeOperandKind.XMMP3_VVVV);
|
||||
map.put("xmm_is4", OpCodeOperandKind.XMM_IS4);
|
||||
map.put("xmm_is5", OpCodeOperandKind.XMM_IS5);
|
||||
map.put("ymm_reg", OpCodeOperandKind.YMM_REG);
|
||||
map.put("ymm_rm", OpCodeOperandKind.YMM_RM);
|
||||
map.put("ymm_vvvv", OpCodeOperandKind.YMM_VVVV);
|
||||
map.put("ymm_is4", OpCodeOperandKind.YMM_IS4);
|
||||
map.put("ymm_is5", OpCodeOperandKind.YMM_IS5);
|
||||
map.put("zmm_reg", OpCodeOperandKind.ZMM_REG);
|
||||
map.put("zmm_rm", OpCodeOperandKind.ZMM_RM);
|
||||
map.put("zmm_vvvv", OpCodeOperandKind.ZMM_VVVV);
|
||||
map.put("zmmp3_vvvv", OpCodeOperandKind.ZMMP3_VVVV);
|
||||
map.put("cr_reg", OpCodeOperandKind.CR_REG);
|
||||
map.put("dr_reg", OpCodeOperandKind.DR_REG);
|
||||
map.put("tr_reg", OpCodeOperandKind.TR_REG);
|
||||
map.put("bnd_reg", OpCodeOperandKind.BND_REG);
|
||||
map.put("es", OpCodeOperandKind.ES);
|
||||
map.put("cs", OpCodeOperandKind.CS);
|
||||
map.put("ss", OpCodeOperandKind.SS);
|
||||
map.put("ds", OpCodeOperandKind.DS);
|
||||
map.put("fs", OpCodeOperandKind.FS);
|
||||
map.put("gs", OpCodeOperandKind.GS);
|
||||
map.put("al", OpCodeOperandKind.AL);
|
||||
map.put("cl", OpCodeOperandKind.CL);
|
||||
map.put("ax", OpCodeOperandKind.AX);
|
||||
map.put("dx", OpCodeOperandKind.DX);
|
||||
map.put("eax", OpCodeOperandKind.EAX);
|
||||
map.put("rax", OpCodeOperandKind.RAX);
|
||||
map.put("st0", OpCodeOperandKind.ST0);
|
||||
map.put("sti_opcode", OpCodeOperandKind.STI_OPCODE);
|
||||
map.put("imm4_m2z", OpCodeOperandKind.IMM4_M2Z);
|
||||
map.put("imm8", OpCodeOperandKind.IMM8);
|
||||
map.put("imm8_const_1", OpCodeOperandKind.IMM8_CONST_1);
|
||||
map.put("imm8sex16", OpCodeOperandKind.IMM8SEX16);
|
||||
map.put("imm8sex32", OpCodeOperandKind.IMM8SEX32);
|
||||
map.put("imm8sex64", OpCodeOperandKind.IMM8SEX64);
|
||||
map.put("imm16", OpCodeOperandKind.IMM16);
|
||||
map.put("imm32", OpCodeOperandKind.IMM32);
|
||||
map.put("imm32sex64", OpCodeOperandKind.IMM32SEX64);
|
||||
map.put("imm64", OpCodeOperandKind.IMM64);
|
||||
map.put("seg_rSI", OpCodeOperandKind.SEG_RSI);
|
||||
map.put("es_rDI", OpCodeOperandKind.ES_RDI);
|
||||
map.put("seg_rDI", OpCodeOperandKind.SEG_RDI);
|
||||
map.put("seg_rBX_al", OpCodeOperandKind.SEG_RBX_AL);
|
||||
map.put("br16_1", OpCodeOperandKind.BR16_1);
|
||||
map.put("br32_1", OpCodeOperandKind.BR32_1);
|
||||
map.put("br64_1", OpCodeOperandKind.BR64_1);
|
||||
map.put("br16_2", OpCodeOperandKind.BR16_2);
|
||||
map.put("br32_4", OpCodeOperandKind.BR32_4);
|
||||
map.put("br64_4", OpCodeOperandKind.BR64_4);
|
||||
map.put("xbegin_2", OpCodeOperandKind.XBEGIN_2);
|
||||
map.put("xbegin_4", OpCodeOperandKind.XBEGIN_4);
|
||||
map.put("brdisp_2", OpCodeOperandKind.BRDISP_2);
|
||||
map.put("brdisp_4", OpCodeOperandKind.BRDISP_4);
|
||||
map.put("sibmem", OpCodeOperandKind.SIBMEM);
|
||||
map.put("tmm_reg", OpCodeOperandKind.TMM_REG);
|
||||
map.put("tmm_rm", OpCodeOperandKind.TMM_RM);
|
||||
map.put("tmm_vvvv", OpCodeOperandKind.TMM_VVVV);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,115 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.github.icedland.iced.x86.fmt.OptionsProps;
|
||||
|
||||
public final class ToOptionsProps {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant OptionsProps.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(64);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("AddLeadingZeroToHexNumbers", OptionsProps.ADD_LEADING_ZERO_TO_HEX_NUMBERS);
|
||||
map.put("AlwaysShowScale", OptionsProps.ALWAYS_SHOW_SCALE);
|
||||
map.put("AlwaysShowSegmentRegister", OptionsProps.ALWAYS_SHOW_SEGMENT_REGISTER);
|
||||
map.put("BinaryDigitGroupSize", OptionsProps.BINARY_DIGIT_GROUP_SIZE);
|
||||
map.put("BinaryPrefix", OptionsProps.BINARY_PREFIX);
|
||||
map.put("BinarySuffix", OptionsProps.BINARY_SUFFIX);
|
||||
map.put("BranchLeadingZeros", OptionsProps.BRANCH_LEADING_ZEROS);
|
||||
map.put("DecimalDigitGroupSize", OptionsProps.DECIMAL_DIGIT_GROUP_SIZE);
|
||||
map.put("DecimalPrefix", OptionsProps.DECIMAL_PREFIX);
|
||||
map.put("DecimalSuffix", OptionsProps.DECIMAL_SUFFIX);
|
||||
map.put("DigitSeparator", OptionsProps.DIGIT_SEPARATOR);
|
||||
map.put("DisplacementLeadingZeros", OptionsProps.DISPLACEMENT_LEADING_ZEROS);
|
||||
map.put("FirstOperandCharIndex", OptionsProps.FIRST_OPERAND_CHAR_INDEX);
|
||||
map.put("GasNakedRegisters", OptionsProps.GAS_NAKED_REGISTERS);
|
||||
map.put("GasShowMnemonicSizeSuffix", OptionsProps.GAS_SHOW_MNEMONIC_SIZE_SUFFIX);
|
||||
map.put("GasSpaceAfterMemoryOperandComma", OptionsProps.GAS_SPACE_AFTER_MEMORY_OPERAND_COMMA);
|
||||
map.put("HexDigitGroupSize", OptionsProps.HEX_DIGIT_GROUP_SIZE);
|
||||
map.put("HexPrefix", OptionsProps.HEX_PREFIX);
|
||||
map.put("HexSuffix", OptionsProps.HEX_SUFFIX);
|
||||
map.put("IP", OptionsProps.IP);
|
||||
map.put("LeadingZeros", OptionsProps.LEADING_ZEROS);
|
||||
map.put("MasmAddDsPrefix32", OptionsProps.MASM_ADD_DS_PREFIX32);
|
||||
map.put("MemorySizeOptions", OptionsProps.MEMORY_SIZE_OPTIONS);
|
||||
map.put("NasmShowSignExtendedImmediateSize", OptionsProps.NASM_SHOW_SIGN_EXTENDED_IMMEDIATE_SIZE);
|
||||
map.put("NumberBase", OptionsProps.NUMBER_BASE);
|
||||
map.put("OctalDigitGroupSize", OptionsProps.OCTAL_DIGIT_GROUP_SIZE);
|
||||
map.put("OctalPrefix", OptionsProps.OCTAL_PREFIX);
|
||||
map.put("OctalSuffix", OptionsProps.OCTAL_SUFFIX);
|
||||
map.put("PreferST0", OptionsProps.PREFER_ST0);
|
||||
map.put("RipRelativeAddresses", OptionsProps.RIP_RELATIVE_ADDRESSES);
|
||||
map.put("ScaleBeforeIndex", OptionsProps.SCALE_BEFORE_INDEX);
|
||||
map.put("ShowBranchSize", OptionsProps.SHOW_BRANCH_SIZE);
|
||||
map.put("ShowSymbolAddress", OptionsProps.SHOW_SYMBOL_ADDRESS);
|
||||
map.put("ShowZeroDisplacements", OptionsProps.SHOW_ZERO_DISPLACEMENTS);
|
||||
map.put("SignedImmediateOperands", OptionsProps.SIGNED_IMMEDIATE_OPERANDS);
|
||||
map.put("SignedMemoryDisplacements", OptionsProps.SIGNED_MEMORY_DISPLACEMENTS);
|
||||
map.put("SmallHexNumbersInDecimal", OptionsProps.SMALL_HEX_NUMBERS_IN_DECIMAL);
|
||||
map.put("SpaceAfterMemoryBracket", OptionsProps.SPACE_AFTER_MEMORY_BRACKET);
|
||||
map.put("SpaceAfterOperandSeparator", OptionsProps.SPACE_AFTER_OPERAND_SEPARATOR);
|
||||
map.put("SpaceBetweenMemoryAddOperators", OptionsProps.SPACE_BETWEEN_MEMORY_ADD_OPERATORS);
|
||||
map.put("SpaceBetweenMemoryMulOperators", OptionsProps.SPACE_BETWEEN_MEMORY_MUL_OPERATORS);
|
||||
map.put("TabSize", OptionsProps.TAB_SIZE);
|
||||
map.put("UppercaseAll", OptionsProps.UPPERCASE_ALL);
|
||||
map.put("UppercaseDecorators", OptionsProps.UPPERCASE_DECORATORS);
|
||||
map.put("UppercaseHex", OptionsProps.UPPERCASE_HEX);
|
||||
map.put("UppercaseKeywords", OptionsProps.UPPERCASE_KEYWORDS);
|
||||
map.put("UppercaseMnemonics", OptionsProps.UPPERCASE_MNEMONICS);
|
||||
map.put("UppercasePrefixes", OptionsProps.UPPERCASE_PREFIXES);
|
||||
map.put("UppercaseRegisters", OptionsProps.UPPERCASE_REGISTERS);
|
||||
map.put("UsePseudoOps", OptionsProps.USE_PSEUDO_OPS);
|
||||
map.put("CC_b", OptionsProps.CC_B);
|
||||
map.put("CC_ae", OptionsProps.CC_AE);
|
||||
map.put("CC_e", OptionsProps.CC_E);
|
||||
map.put("CC_ne", OptionsProps.CC_NE);
|
||||
map.put("CC_be", OptionsProps.CC_BE);
|
||||
map.put("CC_a", OptionsProps.CC_A);
|
||||
map.put("CC_p", OptionsProps.CC_P);
|
||||
map.put("CC_np", OptionsProps.CC_NP);
|
||||
map.put("CC_l", OptionsProps.CC_L);
|
||||
map.put("CC_ge", OptionsProps.CC_GE);
|
||||
map.put("CC_le", OptionsProps.CC_LE);
|
||||
map.put("CC_g", OptionsProps.CC_G);
|
||||
map.put("DecoderOptions", OptionsProps.DECODER_OPTIONS);
|
||||
map.put("ShowUselessPrefixes", OptionsProps.SHOW_USELESS_PREFIXES);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,306 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
public final class ToRegister {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant Register.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(256);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("none", Register.NONE);
|
||||
map.put("al", Register.AL);
|
||||
map.put("cl", Register.CL);
|
||||
map.put("dl", Register.DL);
|
||||
map.put("bl", Register.BL);
|
||||
map.put("ah", Register.AH);
|
||||
map.put("ch", Register.CH);
|
||||
map.put("dh", Register.DH);
|
||||
map.put("bh", Register.BH);
|
||||
map.put("spl", Register.SPL);
|
||||
map.put("bpl", Register.BPL);
|
||||
map.put("sil", Register.SIL);
|
||||
map.put("dil", Register.DIL);
|
||||
map.put("r8l", Register.R8L);
|
||||
map.put("r9l", Register.R9L);
|
||||
map.put("r10l", Register.R10L);
|
||||
map.put("r11l", Register.R11L);
|
||||
map.put("r12l", Register.R12L);
|
||||
map.put("r13l", Register.R13L);
|
||||
map.put("r14l", Register.R14L);
|
||||
map.put("r15l", Register.R15L);
|
||||
map.put("ax", Register.AX);
|
||||
map.put("cx", Register.CX);
|
||||
map.put("dx", Register.DX);
|
||||
map.put("bx", Register.BX);
|
||||
map.put("sp", Register.SP);
|
||||
map.put("bp", Register.BP);
|
||||
map.put("si", Register.SI);
|
||||
map.put("di", Register.DI);
|
||||
map.put("r8w", Register.R8W);
|
||||
map.put("r9w", Register.R9W);
|
||||
map.put("r10w", Register.R10W);
|
||||
map.put("r11w", Register.R11W);
|
||||
map.put("r12w", Register.R12W);
|
||||
map.put("r13w", Register.R13W);
|
||||
map.put("r14w", Register.R14W);
|
||||
map.put("r15w", Register.R15W);
|
||||
map.put("eax", Register.EAX);
|
||||
map.put("ecx", Register.ECX);
|
||||
map.put("edx", Register.EDX);
|
||||
map.put("ebx", Register.EBX);
|
||||
map.put("esp", Register.ESP);
|
||||
map.put("ebp", Register.EBP);
|
||||
map.put("esi", Register.ESI);
|
||||
map.put("edi", Register.EDI);
|
||||
map.put("r8d", Register.R8D);
|
||||
map.put("r9d", Register.R9D);
|
||||
map.put("r10d", Register.R10D);
|
||||
map.put("r11d", Register.R11D);
|
||||
map.put("r12d", Register.R12D);
|
||||
map.put("r13d", Register.R13D);
|
||||
map.put("r14d", Register.R14D);
|
||||
map.put("r15d", Register.R15D);
|
||||
map.put("rax", Register.RAX);
|
||||
map.put("rcx", Register.RCX);
|
||||
map.put("rdx", Register.RDX);
|
||||
map.put("rbx", Register.RBX);
|
||||
map.put("rsp", Register.RSP);
|
||||
map.put("rbp", Register.RBP);
|
||||
map.put("rsi", Register.RSI);
|
||||
map.put("rdi", Register.RDI);
|
||||
map.put("r8", Register.R8);
|
||||
map.put("r9", Register.R9);
|
||||
map.put("r10", Register.R10);
|
||||
map.put("r11", Register.R11);
|
||||
map.put("r12", Register.R12);
|
||||
map.put("r13", Register.R13);
|
||||
map.put("r14", Register.R14);
|
||||
map.put("r15", Register.R15);
|
||||
map.put("eip", Register.EIP);
|
||||
map.put("rip", Register.RIP);
|
||||
map.put("es", Register.ES);
|
||||
map.put("cs", Register.CS);
|
||||
map.put("ss", Register.SS);
|
||||
map.put("ds", Register.DS);
|
||||
map.put("fs", Register.FS);
|
||||
map.put("gs", Register.GS);
|
||||
map.put("xmm0", Register.XMM0);
|
||||
map.put("xmm1", Register.XMM1);
|
||||
map.put("xmm2", Register.XMM2);
|
||||
map.put("xmm3", Register.XMM3);
|
||||
map.put("xmm4", Register.XMM4);
|
||||
map.put("xmm5", Register.XMM5);
|
||||
map.put("xmm6", Register.XMM6);
|
||||
map.put("xmm7", Register.XMM7);
|
||||
map.put("xmm8", Register.XMM8);
|
||||
map.put("xmm9", Register.XMM9);
|
||||
map.put("xmm10", Register.XMM10);
|
||||
map.put("xmm11", Register.XMM11);
|
||||
map.put("xmm12", Register.XMM12);
|
||||
map.put("xmm13", Register.XMM13);
|
||||
map.put("xmm14", Register.XMM14);
|
||||
map.put("xmm15", Register.XMM15);
|
||||
map.put("xmm16", Register.XMM16);
|
||||
map.put("xmm17", Register.XMM17);
|
||||
map.put("xmm18", Register.XMM18);
|
||||
map.put("xmm19", Register.XMM19);
|
||||
map.put("xmm20", Register.XMM20);
|
||||
map.put("xmm21", Register.XMM21);
|
||||
map.put("xmm22", Register.XMM22);
|
||||
map.put("xmm23", Register.XMM23);
|
||||
map.put("xmm24", Register.XMM24);
|
||||
map.put("xmm25", Register.XMM25);
|
||||
map.put("xmm26", Register.XMM26);
|
||||
map.put("xmm27", Register.XMM27);
|
||||
map.put("xmm28", Register.XMM28);
|
||||
map.put("xmm29", Register.XMM29);
|
||||
map.put("xmm30", Register.XMM30);
|
||||
map.put("xmm31", Register.XMM31);
|
||||
map.put("ymm0", Register.YMM0);
|
||||
map.put("ymm1", Register.YMM1);
|
||||
map.put("ymm2", Register.YMM2);
|
||||
map.put("ymm3", Register.YMM3);
|
||||
map.put("ymm4", Register.YMM4);
|
||||
map.put("ymm5", Register.YMM5);
|
||||
map.put("ymm6", Register.YMM6);
|
||||
map.put("ymm7", Register.YMM7);
|
||||
map.put("ymm8", Register.YMM8);
|
||||
map.put("ymm9", Register.YMM9);
|
||||
map.put("ymm10", Register.YMM10);
|
||||
map.put("ymm11", Register.YMM11);
|
||||
map.put("ymm12", Register.YMM12);
|
||||
map.put("ymm13", Register.YMM13);
|
||||
map.put("ymm14", Register.YMM14);
|
||||
map.put("ymm15", Register.YMM15);
|
||||
map.put("ymm16", Register.YMM16);
|
||||
map.put("ymm17", Register.YMM17);
|
||||
map.put("ymm18", Register.YMM18);
|
||||
map.put("ymm19", Register.YMM19);
|
||||
map.put("ymm20", Register.YMM20);
|
||||
map.put("ymm21", Register.YMM21);
|
||||
map.put("ymm22", Register.YMM22);
|
||||
map.put("ymm23", Register.YMM23);
|
||||
map.put("ymm24", Register.YMM24);
|
||||
map.put("ymm25", Register.YMM25);
|
||||
map.put("ymm26", Register.YMM26);
|
||||
map.put("ymm27", Register.YMM27);
|
||||
map.put("ymm28", Register.YMM28);
|
||||
map.put("ymm29", Register.YMM29);
|
||||
map.put("ymm30", Register.YMM30);
|
||||
map.put("ymm31", Register.YMM31);
|
||||
map.put("zmm0", Register.ZMM0);
|
||||
map.put("zmm1", Register.ZMM1);
|
||||
map.put("zmm2", Register.ZMM2);
|
||||
map.put("zmm3", Register.ZMM3);
|
||||
map.put("zmm4", Register.ZMM4);
|
||||
map.put("zmm5", Register.ZMM5);
|
||||
map.put("zmm6", Register.ZMM6);
|
||||
map.put("zmm7", Register.ZMM7);
|
||||
map.put("zmm8", Register.ZMM8);
|
||||
map.put("zmm9", Register.ZMM9);
|
||||
map.put("zmm10", Register.ZMM10);
|
||||
map.put("zmm11", Register.ZMM11);
|
||||
map.put("zmm12", Register.ZMM12);
|
||||
map.put("zmm13", Register.ZMM13);
|
||||
map.put("zmm14", Register.ZMM14);
|
||||
map.put("zmm15", Register.ZMM15);
|
||||
map.put("zmm16", Register.ZMM16);
|
||||
map.put("zmm17", Register.ZMM17);
|
||||
map.put("zmm18", Register.ZMM18);
|
||||
map.put("zmm19", Register.ZMM19);
|
||||
map.put("zmm20", Register.ZMM20);
|
||||
map.put("zmm21", Register.ZMM21);
|
||||
map.put("zmm22", Register.ZMM22);
|
||||
map.put("zmm23", Register.ZMM23);
|
||||
map.put("zmm24", Register.ZMM24);
|
||||
map.put("zmm25", Register.ZMM25);
|
||||
map.put("zmm26", Register.ZMM26);
|
||||
map.put("zmm27", Register.ZMM27);
|
||||
map.put("zmm28", Register.ZMM28);
|
||||
map.put("zmm29", Register.ZMM29);
|
||||
map.put("zmm30", Register.ZMM30);
|
||||
map.put("zmm31", Register.ZMM31);
|
||||
map.put("k0", Register.K0);
|
||||
map.put("k1", Register.K1);
|
||||
map.put("k2", Register.K2);
|
||||
map.put("k3", Register.K3);
|
||||
map.put("k4", Register.K4);
|
||||
map.put("k5", Register.K5);
|
||||
map.put("k6", Register.K6);
|
||||
map.put("k7", Register.K7);
|
||||
map.put("bnd0", Register.BND0);
|
||||
map.put("bnd1", Register.BND1);
|
||||
map.put("bnd2", Register.BND2);
|
||||
map.put("bnd3", Register.BND3);
|
||||
map.put("cr0", Register.CR0);
|
||||
map.put("cr1", Register.CR1);
|
||||
map.put("cr2", Register.CR2);
|
||||
map.put("cr3", Register.CR3);
|
||||
map.put("cr4", Register.CR4);
|
||||
map.put("cr5", Register.CR5);
|
||||
map.put("cr6", Register.CR6);
|
||||
map.put("cr7", Register.CR7);
|
||||
map.put("cr8", Register.CR8);
|
||||
map.put("cr9", Register.CR9);
|
||||
map.put("cr10", Register.CR10);
|
||||
map.put("cr11", Register.CR11);
|
||||
map.put("cr12", Register.CR12);
|
||||
map.put("cr13", Register.CR13);
|
||||
map.put("cr14", Register.CR14);
|
||||
map.put("cr15", Register.CR15);
|
||||
map.put("dr0", Register.DR0);
|
||||
map.put("dr1", Register.DR1);
|
||||
map.put("dr2", Register.DR2);
|
||||
map.put("dr3", Register.DR3);
|
||||
map.put("dr4", Register.DR4);
|
||||
map.put("dr5", Register.DR5);
|
||||
map.put("dr6", Register.DR6);
|
||||
map.put("dr7", Register.DR7);
|
||||
map.put("dr8", Register.DR8);
|
||||
map.put("dr9", Register.DR9);
|
||||
map.put("dr10", Register.DR10);
|
||||
map.put("dr11", Register.DR11);
|
||||
map.put("dr12", Register.DR12);
|
||||
map.put("dr13", Register.DR13);
|
||||
map.put("dr14", Register.DR14);
|
||||
map.put("dr15", Register.DR15);
|
||||
map.put("st0", Register.ST0);
|
||||
map.put("st1", Register.ST1);
|
||||
map.put("st2", Register.ST2);
|
||||
map.put("st3", Register.ST3);
|
||||
map.put("st4", Register.ST4);
|
||||
map.put("st5", Register.ST5);
|
||||
map.put("st6", Register.ST6);
|
||||
map.put("st7", Register.ST7);
|
||||
map.put("mm0", Register.MM0);
|
||||
map.put("mm1", Register.MM1);
|
||||
map.put("mm2", Register.MM2);
|
||||
map.put("mm3", Register.MM3);
|
||||
map.put("mm4", Register.MM4);
|
||||
map.put("mm5", Register.MM5);
|
||||
map.put("mm6", Register.MM6);
|
||||
map.put("mm7", Register.MM7);
|
||||
map.put("tr0", Register.TR0);
|
||||
map.put("tr1", Register.TR1);
|
||||
map.put("tr2", Register.TR2);
|
||||
map.put("tr3", Register.TR3);
|
||||
map.put("tr4", Register.TR4);
|
||||
map.put("tr5", Register.TR5);
|
||||
map.put("tr6", Register.TR6);
|
||||
map.put("tr7", Register.TR7);
|
||||
map.put("tmm0", Register.TMM0);
|
||||
map.put("tmm1", Register.TMM1);
|
||||
map.put("tmm2", Register.TMM2);
|
||||
map.put("tmm3", Register.TMM3);
|
||||
map.put("tmm4", Register.TMM4);
|
||||
map.put("tmm5", Register.TMM5);
|
||||
map.put("tmm6", Register.TMM6);
|
||||
map.put("tmm7", Register.TMM7);
|
||||
map.put("dontuse0", Register.DONTUSE0);
|
||||
map.put("dontusefa", Register.DONTUSEFA);
|
||||
map.put("dontusefb", Register.DONTUSEFB);
|
||||
map.put("dontusefc", Register.DONTUSEFC);
|
||||
map.put("dontusefd", Register.DONTUSEFD);
|
||||
map.put("dontusefe", Register.DONTUSEFE);
|
||||
map.put("dontuseff", Register.DONTUSEFF);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (C) 2018-present iced project and contributors
|
||||
|
||||
// ⚠️This file was generated by GENERATOR!🦹♂️
|
||||
|
||||
package com.github.icedland.iced.x86;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
public final class ToTupleType {
|
||||
static Integer tryGet(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
static Integer get(String key) {
|
||||
Integer value = tryGet(key);
|
||||
if (value == null)
|
||||
throw new UnsupportedOperationException(String.format("Couldn't find enum variant TupleType.%s", key));
|
||||
return value;
|
||||
}
|
||||
|
||||
static Iterator<String> names() {
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
static Iterator<Integer> values() {
|
||||
return map.values().iterator();
|
||||
}
|
||||
|
||||
static int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
static HashMap<String, Integer> copy() {
|
||||
return new HashMap<String, Integer>(map);
|
||||
}
|
||||
|
||||
private static final HashMap<String, Integer> map = getMap();
|
||||
|
||||
private static HashMap<String, Integer> getMap() {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>(19);
|
||||
initMap0(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static void initMap0(HashMap<String, Integer> map) {
|
||||
map.put("N1", TupleType.N1);
|
||||
map.put("N2", TupleType.N2);
|
||||
map.put("N4", TupleType.N4);
|
||||
map.put("N8", TupleType.N8);
|
||||
map.put("N16", TupleType.N16);
|
||||
map.put("N32", TupleType.N32);
|
||||
map.put("N64", TupleType.N64);
|
||||
map.put("N8b4", TupleType.N8B4);
|
||||
map.put("N16b4", TupleType.N16B4);
|
||||
map.put("N32b4", TupleType.N32B4);
|
||||
map.put("N64b4", TupleType.N64B4);
|
||||
map.put("N16b8", TupleType.N16B8);
|
||||
map.put("N32b8", TupleType.N32B8);
|
||||
map.put("N64b8", TupleType.N64B8);
|
||||
map.put("N4b2", TupleType.N4B2);
|
||||
map.put("N8b2", TupleType.N8B2);
|
||||
map.put("N16b2", TupleType.N16B2);
|
||||
map.put("N32b2", TupleType.N32B2);
|
||||
map.put("N64b2", TupleType.N64B2);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue