Avoid subtraction overflow in test_mm_store{,1,r}_ps functions
This overflow was found while testing core_arch with miri
This commit is contained in:
parent
fe8004cd5e
commit
b8b79f2e7a
1 changed files with 3 additions and 3 deletions
|
|
@ -3153,7 +3153,7 @@ mod tests {
|
|||
let mut p = vals.as_mut_ptr();
|
||||
|
||||
if (p as usize) & 0xf != 0 {
|
||||
ofs = ((16 - (p as usize)) & 0xf) >> 2;
|
||||
ofs = (16 - ((p as usize) & 0xf)) >> 2;
|
||||
p = p.add(ofs);
|
||||
}
|
||||
|
||||
|
|
@ -3179,7 +3179,7 @@ mod tests {
|
|||
|
||||
// Align p to 16-byte boundary
|
||||
if (p as usize) & 0xf != 0 {
|
||||
ofs = ((16 - (p as usize)) & 0xf) >> 2;
|
||||
ofs = (16 - ((p as usize) & 0xf)) >> 2;
|
||||
p = p.add(ofs);
|
||||
}
|
||||
|
||||
|
|
@ -3205,7 +3205,7 @@ mod tests {
|
|||
|
||||
// Align p to 16-byte boundary
|
||||
if (p as usize) & 0xf != 0 {
|
||||
ofs = ((16 - (p as usize)) & 0xf) >> 2;
|
||||
ofs = (16 - ((p as usize) & 0xf)) >> 2;
|
||||
p = p.add(ofs);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue