Request a specific register.
(&mut self, reg: Reg)
| 95 | |
| 96 | /// Request a specific register. |
| 97 | pub fn reg(&mut self, reg: Reg) -> Option<Reg> { |
| 98 | let index = reg.hw_enc(); |
| 99 | self.named_reg_available(reg).then(|| { |
| 100 | self.allocate(reg.class(), index.try_into().unwrap()); |
| 101 | reg |
| 102 | }) |
| 103 | } |
| 104 | |
| 105 | /// Marks the specified register as available, utilizing the |
| 106 | /// register class to determine the bitset that requires updating. |