Skip to content
Snippets Groups Projects
Commit 95e7964b authored by Peter Trommler's avatar Peter Trommler :drum: Committed by Marge Bot
Browse files

Fix T20638 on big-endian architectures

The test reads a 16 bit value from an array of 8 bit values. Naturally,
that leads to different values read on big-endian architectures than
on little-endian. In this case the value read is 0x8081 on big-endian
and 0x8180 on little endian. This patch changes the argument of the `and`
machop to mask bit 7 which is the only bit different. The test still checks
that bit 15 is zero, which was the original issue in #20638.

Fixes #20906.
parent 21510698
No related branches found
No related tags found
No related merge requests found
test(bits64 buffer) { test(bits64 buffer) {
return (%zx64(%shrl(bits16[buffer + (128 :: bits64)], (1 :: bits64))) & (64711 :: bits64)); return (%zx64(%shrl(bits16[buffer + (128 :: bits64)], (1 :: bits64))) & (65407 :: bits64));
} }
16576 16448
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment