about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/osstring-to-string.js
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-12-09 06:34:35 +0000
committerbors <bors@rust-lang.org>2023-12-09 06:34:35 +0000
commitaa7afff8c619fc9c04515b7cef57d72dc3c7e51e (patch)
tree068bfacc8fa23c7b63860366ab60617980a0e98e /tests/rustdoc-js-std/osstring-to-string.js
parent57935c35aac3f389eb406ac5d33b7953daeba7d1 (diff)
parentd57125632e78474e2623697fd77b5762df5b5454 (diff)
downloadrust-aa7afff8c619fc9c04515b7cef57d72dc3c7e51e.tar.gz
rust-aa7afff8c619fc9c04515b7cef57d72dc3c7e51e.zip
Auto merge of #3216 - eduardosm:fix-ptestnzc, r=RalfJung
Fix x86 SSE4.1 ptestnzc

Fixes ptestnzc by bringing back the original implementation of https://github.com/rust-lang/miri/pull/3214.

`(op & mask) != 0 && (op & mask) == !ask` need to be calculated for the whole vector. It cannot be calculated for each element and then folded.

For example, given
* `op = [0b100, 0b010]`
* `mask = [0b100, 0b110]`

The correct result would be:
* `op & mask = [0b100, 0b010]`
Comparisons are done on the vector as a whole:
* `all_zero = (op & mask) == [0, 0] = false`
* `masked_set = (op & mask) == mask = false`
* `!all_zero && !masked_set = true` correct result

The previous method:
* `op & mask = [0b100, 0b010]`
Comparisons are done element-wise:
* `all_zero = (op & mask) == [0, 0] = [true, true]`
* `masked_set = (op & mask) == mask = [true, false]`
* `!all_zero && !masked_set = [true, false]`
 After folding with AND, the final result would be `false`, which is incorrect.
Diffstat (limited to 'tests/rustdoc-js-std/osstring-to-string.js')
0 files changed, 0 insertions, 0 deletions