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:
Andrew Brown
2021-12-12 18:31:42 -08:00
committed by GitHub
parent fab77e0d0f
commit 86611d3bbc
5 changed files with 131 additions and 13 deletions

View File

@@ -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.