Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix find_last_non_zero_bit, and align metadata address before convert…
…ing to data address. (#1188) This PR fixes some bugs in finding base references for internal references. Prominently two bugs: 1. The way we find the last non zero bit was wrong. We used to to use `trailing_zeroes` and compare the result with the given range of the starting and ending bits. This was simply wrong. Now we do a mask first to extract the value between the starting and the ending bits, and then use `leading_zeroes`. Performance-wise, the new code has similar performnace. 2. When we convert a metadata bit (address + bit offset) back to the data address, the metadata bit needs to be the start of the metadata value. If it is the middle of the metadata value, then the computed data address will be incorrect. This PR adds `align_metadata_address`. This PR skips some tests for LOS in plans that do not use LOS.
- Loading branch information