From 769ef543a0a1a4ef010b702134ac03c5a9094ad6 Mon Sep 17 00:00:00 2001 From: Alfred Huang Date: Fri, 2 Apr 2021 14:44:06 -0700 Subject: [PATCH] Fixed OAC's typo in SelectCvtInt2Int --- src/mapleall/maple_be/src/cg/aarch64/aarch64_cgfunc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 d10467c8a5..5eee49da8f 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); -- Gitee