From 097f6a83da1f93a6680ab6276ad2a21a9bbd18cf Mon Sep 17 00:00:00 2001 From: MerryMage Date: Tue, 20 Dec 2016 22:06:14 +0000 Subject: [PATCH] emit_x64: Document ExtractAndDuplicateMostSignificantBitFromPackedWords --- src/backend_x64/emit_x64.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/backend_x64/emit_x64.cpp b/src/backend_x64/emit_x64.cpp index 8ffd57e9..fcba85b0 100644 --- a/src/backend_x64/emit_x64.cpp +++ b/src/backend_x64/emit_x64.cpp @@ -1369,6 +1369,14 @@ static void ExtractMostSignificantBitFromPackedBytes(const Xbyak::util::Cpu& cpu } } +/** + * Extracts the most significant bits from each of the packed words, duplicates them, and packs them together. + * + * value before: a---------------b--------------- + * value after: 0000000000000000000000000000aabb + * + * @param value The register containing the value to operate on. Result will be stored in the same register. + */ static void ExtractAndDuplicateMostSignificantBitFromPackedWords(BlockOfCode* code, Xbyak::Reg32 value) { code->and_(value, 0x80008000); code->shr(value, 1);