Optional<PerformedReloc> rel2 = findReloc(hint.offset0 + hint.delta[0]);
if (!rel1 || !rel2)
return;
- if (ldr.offset != (rel1->referentVA & 0xfff))
+ if (ldr.offset != static_cast<int64_t>(rel1->referentVA & 0xfff))
return;
ldr.offset = rel1->referentVA - rel2->rel.offset - isec->getVA();
if (!isLiteralLdrEligible(ldr))
// of the unwind info's unwind address, two functions that have identical
// unwind info can't be folded if it's using this encoding since both
// entries need unique addresses.
- static_assert(UNWIND_X86_64_MODE_MASK == UNWIND_X86_MODE_MASK, "");
- static_assert(UNWIND_X86_64_MODE_STACK_IND == UNWIND_X86_MODE_STACK_IND, "");
+ static_assert(static_cast<uint32_t>(UNWIND_X86_64_MODE_MASK) ==
+ static_cast<uint32_t>(UNWIND_X86_MODE_MASK),
+ "");
+ static_assert(static_cast<uint32_t>(UNWIND_X86_64_MODE_STACK_IND) ==
+ static_cast<uint32_t>(UNWIND_X86_MODE_STACK_IND),
+ "");
if ((target->cpuType == CPU_TYPE_X86_64 || target->cpuType == CPU_TYPE_X86) &&
(encoding & UNWIND_X86_64_MODE_MASK) == UNWIND_X86_64_MODE_STACK_IND) {
// FIXME: Consider passing in the two function addresses and getting