You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix find_last_non_zero_bit, and align metadata address before converting 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.
0 commit comments