Look for an ISA for the given `triple`. Return a builder that can create a corresponding `TargetIsa`.
(triple: Triple)
| 106 | /// Look for an ISA for the given `triple`. |
| 107 | /// Return a builder that can create a corresponding `TargetIsa`. |
| 108 | pub fn lookup(triple: Triple) -> Result<Builder, LookupError> { |
| 109 | match triple.architecture { |
| 110 | Architecture::X86_64 => { |
| 111 | isa_builder!(x64, (feature = "x86"), triple) |
| 112 | } |
| 113 | Architecture::Aarch64 { .. } => isa_builder!(aarch64, (feature = "arm64"), triple), |
| 114 | Architecture::S390x { .. } => isa_builder!(s390x, (feature = "s390x"), triple), |
| 115 | Architecture::Riscv64 { .. } => isa_builder!(riscv64, (feature = "riscv64"), triple), |
| 116 | Architecture::Pulley32 | Architecture::Pulley32be => { |
| 117 | isa_builder!(pulley32, (feature = "pulley"), triple) |
| 118 | } |
| 119 | Architecture::Pulley64 | Architecture::Pulley64be => { |
| 120 | isa_builder!(pulley64, (feature = "pulley"), triple) |
| 121 | } |
| 122 | _ => Err(LookupError::Unsupported), |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | /// The string names of all the supported, but possibly not enabled, architectures. The elements of |
| 127 | /// this slice are suitable to be passed to the [lookup_by_name] function to obtain the default |
no outgoing calls