diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/MC/MachObjectWriter.cpp | 4 | ||||
-rw-r--r-- | lib/Support/regengine.inc | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/MC/MachObjectWriter.cpp b/lib/MC/MachObjectWriter.cpp index fc35c36554..a533ccfdc6 100644 --- a/lib/MC/MachObjectWriter.cpp +++ b/lib/MC/MachObjectWriter.cpp @@ -477,7 +477,7 @@ public: // actual expression addend without the PCrel bias. However, instructions // with data following the relocation are not accomodated for (see comment // below regarding SIGNED{1,2,4}), so it isn't exactly that either. - Value += 1 << Log2Size; + Value += 1LL << Log2Size; } if (Target.isAbsolute()) { // constant @@ -605,7 +605,7 @@ public: // well based on the actual encoded instruction (the additional bias), // but instead appear to just look at the final offset. if (IsRIPRel) { - switch (-(Target.getConstant() + (1 << Log2Size))) { + switch (-(Target.getConstant() + (1LL << Log2Size))) { case 1: Type = RIT_X86_64_Signed1; break; case 2: Type = RIT_X86_64_Signed2; break; case 4: Type = RIT_X86_64_Signed4; break; diff --git a/lib/Support/regengine.inc b/lib/Support/regengine.inc index bf55543dab..7e41f96f35 100644 --- a/lib/Support/regengine.inc +++ b/lib/Support/regengine.inc @@ -185,7 +185,7 @@ matcher(struct re_guts *g, const char *string, size_t nmatch, endp = fast(m, start, stop, gf, gl); if (endp == NULL) { /* a miss */ free(m->pmatch); - free(m->lastpos); + free((void*)m->lastpos); STATETEARDOWN(m); return(REG_NOMATCH); } |