isle: expand enums in ISLE (#3586)
* x64: expand FloatCC enum in ISLE * isle: regenerate manifests * isle: generate all enum fields in `clif.isle` This expands the `gen_isle` function to write all of the immediate `enum`s out explicitly in `clif.isle`. Non-`enum` immediates are still `extern primitive`. * Only compile `enum_values` with `rebuild-isle` feature * Only compile `gen_enum_isle` with `rebuild-isle` feature
This commit is contained in:
@@ -111,6 +111,17 @@ pub(crate) enum OperandKindFields {
|
||||
TypeVar(TypeVar),
|
||||
}
|
||||
|
||||
impl OperandKindFields {
|
||||
/// Return the [EnumValues] for this field if it is an `enum`.
|
||||
#[cfg(feature = "rebuild-isle")]
|
||||
pub(crate) fn enum_values(&self) -> Option<&EnumValues> {
|
||||
match self {
|
||||
OperandKindFields::ImmEnum(map) => Some(map),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub(crate) struct OperandKind {
|
||||
/// String representation of the Rust type mapping to this OperandKind.
|
||||
|
||||
Reference in New Issue
Block a user