| 466 | #[inline] |
| 467 | #[must_use] |
| 468 | pub fn kind(self) -> OperandKind { |
| 469 | let value = Value::new(self.kind as usize & (MAX_VALUES - 1)); |
| 470 | let group = ValueGroup::new(self.kind as usize & (MAX_VALUES - 1)); |
| 471 | match (self.kind >> 29) & 7 { |
| 472 | 0 => OperandKind::Def(value), |
| 473 | 1 => OperandKind::Use(value), |
| 474 | 2 => OperandKind::EarlyDef(value), |
| 475 | 3 => OperandKind::DefGroup(group), |
| 476 | 4 => OperandKind::UseGroup(group), |
| 477 | 5 => OperandKind::EarlyDefGroup(group), |
| 478 | 6 => OperandKind::NonAllocatable, |
| 479 | _ => unreachable!(), |
| 480 | } |
| 481 | } |
| 482 | |
| 483 | /// Returns the constraint on this operand which describes the requirements |
| 484 | /// for the `Allocation` it will be assigned to. |