diff --git a/lib/Target/X86/X86CodeEmitter.cpp b/lib/Target/X86/X86CodeEmitter.cpp index eef01adfb0c..98cd863f430 100644 --- a/lib/Target/X86/X86CodeEmitter.cpp +++ b/lib/Target/X86/X86CodeEmitter.cpp @@ -61,11 +61,11 @@ namespace { void *X86JITInfo::getJITStubForFunction(Function *F, MachineCodeEmitter &MCE) { - return (void*)((unsigned long)getResolver(MCE).getLazyResolver(F)); + return (void*)(intptr_t)getResolver(MCE).getLazyResolver(F); } void X86JITInfo::replaceMachineCodeForFunction (void *Old, void *New) { - char *OldByte = (char *) Old; + unsigned char *OldByte = (char *) Old; *OldByte++ = 0xE9; // Emit JMP opcode. int32_t *OldWord = (int32_t *) OldByte; int32_t NewAddr = (intptr_t) New; diff --git a/utils/TableGen/InstrSelectorEmitter.cpp b/utils/TableGen/InstrSelectorEmitter.cpp index 9a2ce4a6e87..e9c63441aea 100644 --- a/utils/TableGen/InstrSelectorEmitter.cpp +++ b/utils/TableGen/InstrSelectorEmitter.cpp @@ -344,7 +344,7 @@ bool Pattern::InferTypes(TreePatternNode *N, bool &MadeChange) { break; } - return AnyUnset | N->getType() == MVT::Other; + return AnyUnset | (N->getType() == MVT::Other); } /// clone - This method is used to make an exact copy of the current pattern, diff --git a/utils/TableGen/Record.cpp b/utils/TableGen/Record.cpp index 38e1dff89fd..8c8e7b97f7b 100644 --- a/utils/TableGen/Record.cpp +++ b/utils/TableGen/Record.cpp @@ -67,7 +67,7 @@ Init *BitsRecTy::convertValue(IntInit *II) { if (Value & ~((1LL << Size)-1)) return 0; } else { - if ((Value >> Size) != -1 || ((Value & (1 << Size-1)) == 0)) + if ((Value >> Size) != -1 || ((Value & (1 << (Size-1))) == 0)) return 0; }