From bb203429c614a74251eeed1cab6c63dff600f683 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Thu, 4 Jun 2020 20:33:46 +0100 Subject: [PATCH] crc32: Remove unnecessary masking --- src/frontend/A32/translate/impl/crc32.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/frontend/A32/translate/impl/crc32.cpp b/src/frontend/A32/translate/impl/crc32.cpp index 9afbde89..7a5e75c0 100644 --- a/src/frontend/A32/translate/impl/crc32.cpp +++ b/src/frontend/A32/translate/impl/crc32.cpp @@ -57,18 +57,18 @@ bool CRC32Variant(ArmTranslatorVisitor& v, Cond cond, Imm<2> sz, Reg n, Reg d, R if (type == CRCType::ISO) { switch (sz.ZeroExtend()) { case 0b00: - return v.ir.CRC32ISO8(accumulator, v.ir.And(data, v.ir.Imm32(0xFF))); + return v.ir.CRC32ISO8(accumulator, data); case 0b01: - return v.ir.CRC32ISO16(accumulator, v.ir.And(data, v.ir.Imm32(0xFFFF))); + return v.ir.CRC32ISO16(accumulator, data); case 0b10: return v.ir.CRC32ISO32(accumulator, data); } } else { switch (sz.ZeroExtend()) { case 0b00: - return v.ir.CRC32Castagnoli8(accumulator, v.ir.And(data, v.ir.Imm32(0xFF))); + return v.ir.CRC32Castagnoli8(accumulator, data); case 0b01: - return v.ir.CRC32Castagnoli16(accumulator, v.ir.And(data, v.ir.Imm32(0xFFFF))); + return v.ir.CRC32Castagnoli16(accumulator, data); case 0b10: return v.ir.CRC32Castagnoli32(accumulator, data); }