diff --git a/src/mapleall/maple_be/src/cg/aarch64/aarch64_cgfunc.cpp b/src/mapleall/maple_be/src/cg/aarch64/aarch64_cgfunc.cpp index d10467c8a542633d0c60e641133058c8b84dade0..5eee49da8f517b481ed2022649b9b58efa2928aa 100644 --- a/src/mapleall/maple_be/src/cg/aarch64/aarch64_cgfunc.cpp +++ b/src/mapleall/maple_be/src/cg/aarch64/aarch64_cgfunc.cpp @@ -3896,9 +3896,9 @@ void AArch64CGFunc::SelectCvtInt2Int(const BaseNode *parent, Operand *&resOpnd, if (fsize > tsize) { if (IsSignedInteger(toType)) { if (origValue < 0) { - signValue = 0xFFFFFFFFFFFFFFFF & (1ULL << static_cast(tsize)); + signValue = 0xFFFFFFFFFFFFFFFFLL & (1ULL << static_cast(tsize)); } - newValue = static_cast(origValue) & ((1ULL << static_cast(tsize)) - 1u) & + newValue = (static_cast(origValue) & ((1ULL << static_cast(tsize)) - 1u)) | static_cast(signValue); } else { newValue = static_cast(origValue) & ((1ULL << static_cast(tsize)) - 1u);