arm64 & arm: fix some warnings

This commit is contained in:
Nguyen Anh Quynh 2019-04-10 17:33:41 +08:00
parent e0f960e3e7
commit f0a5df2504
2 changed files with 6 additions and 6 deletions

View File

@ -895,7 +895,9 @@ static inline bool AArch64_AM_isSVEMoveMaskPreferredLogicalImmediate(int64_t Imm
inline static bool isAnyMOVZMovAlias(uint64_t Value, int RegWidth)
{
for (int Shift = 0; Shift <= RegWidth - 16; Shift += 16)
int Shift;
for (Shift = 0; Shift <= RegWidth - 16; Shift += 16)
if ((Value & ~(0xffffULL << Shift)) == 0)
return true;

View File

@ -15056,8 +15056,7 @@ static DecodeStatus fname(const uint8_t DecodeTable[], MCInst *MI, \
{ \
unsigned Start, Len, NumToSkip, PIdx, Opc, DecodeIdx; \
InsnType Val, FieldValue, PositiveMask, NegativeMask; \
MCInst TmpMI; \
bool Pred, Fail, DecodeComplete; \
bool Pred, Fail, DecodeComplete = true; \
uint32_t ExpectedValue; \
const uint8_t *Ptr = DecodeTable; \
uint32_t CurFieldValue = 0; \
@ -15140,11 +15139,10 @@ static DecodeStatus fname(const uint8_t DecodeTable[], MCInst *MI, \
NumToSkip |= (*Ptr++) << 8; \
NumToSkip |= (*Ptr++) << 16; \
/* Perform the decode operation. */ \
MCInst_setOpcode(&TmpMI, Opc); \
S = decoder(S, DecodeIdx, insn, &TmpMI, Address, &DecodeComplete); \
MCInst_setOpcode(MI, Opc); \
S = decoder(S, DecodeIdx, insn, MI, Address, &DecodeComplete); \
if (DecodeComplete) { \
/* Decoding complete. */ \
MI = &TmpMI; \
return S; \
} else { \
/* assert(S == MCDisassembler_Fail); */ \