Return the location of the operand that uses memory, if any; return `None` otherwise.
(&self)
| 146 | /// Return the location of the operand that uses memory, if any; return |
| 147 | /// `None` otherwise. |
| 148 | pub fn uses_memory(&self) -> Option<Location> { |
| 149 | debug_assert!( |
| 150 | self.locations() |
| 151 | .copied() |
| 152 | .filter(Location::uses_memory) |
| 153 | .count() |
| 154 | <= 1 |
| 155 | ); |
| 156 | self.locations().copied().find(Location::uses_memory) |
| 157 | } |
| 158 | |
| 159 | /// Return `true` if any of the operands accepts a register (i.e., not an |
| 160 | /// immediate); return `false` otherwise. |
no test coverage detected