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

Function test_any_gpr

winch/codegen/src/regset.rs:153–164  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

151
152 #[test]
153 fn test_any_gpr() {
154 let bitset = RegBitSet::int(UNIVERSE, !UNIVERSE, MAX);
155 let zero = RegBitSet::float(0, 0, MAX);
156 let mut set = RegSet::new(bitset, zero);
157 for _ in 0..16 {
158 let gpr = set.reg_for_class(RegClass::Int);
159 assert!(gpr.is_some())
160 }
161
162 assert!(!set.available(RegClass::Int));
163 assert!(set.reg_for_class(RegClass::Int).is_none())
164 }
165
166 #[test]
167 fn test_gpr() {

Callers

nothing calls this directly

Calls 2

newFunction · 0.50
reg_for_classMethod · 0.45

Tested by

no test coverage detected