MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / lookup

Function lookup

cranelift/codegen/src/isa/mod.rs:108–124  ·  view source on GitHub ↗

Look for an ISA for the given `triple`. Return a builder that can create a corresponding `TargetIsa`.

(triple: Triple)

Source from the content-addressed store, hash-verified

106/// Look for an ISA for the given `triple`.
107/// Return a builder that can create a corresponding `TargetIsa`.
108pub 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

Callers 15

lookup_by_nameFunction · 0.70
from_target_isaMethod · 0.70
compile_testfileFunction · 0.50
memcmpFunction · 0.50
small_memcmp_helperFunction · 0.50
parse_cmdline_targetMethod · 0.50
parse_target_specsMethod · 0.50
parse_sets_and_tripleFunction · 0.50
set_isa_flagsMethod · 0.50
lookup_symbolMethod · 0.50
test_simple_funcFunction · 0.50

Calls

no outgoing calls

Tested by 15

compile_testfileFunction · 0.40
memcmpFunction · 0.40
test_simple_funcFunction · 0.40
test_multi_return_funcFunction · 0.40
test_simple_funcFunction · 0.40
test_multi_return_funcFunction · 0.40
test_simple_funcFunction · 0.40
test_multi_return_funcFunction · 0.40
test_simple_funcFunction · 0.40
test_multi_return_funcFunction · 0.40
newMethod · 0.40