[llvm] [LLVM] [MC] Update frame layout & CFI generation to handle frames larger than 2gb (PR #99263)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 22 13:53:16 PDT 2024


================
@@ -1419,7 +1419,8 @@ class DarwinX86AsmBackend : public X86AsmBackend {
         unsigned Reg = *MRI.getLLVMRegNum(Inst.getRegister(), true);
         SavedRegs[SavedRegIdx++] = Reg;
         StackAdjust += OffsetSize;
-        MinAbsOffset = std::min(MinAbsOffset, abs(Inst.getOffset()));
+        MinAbsOffset =
+            std::min<int64_t>(MinAbsOffset, std::abs(Inst.getOffset()));
----------------
MaskRay wrote:

Prefer to cast the arguments instead of using `<int64_t>`

https://github.com/llvm/llvm-project/pull/99263


More information about the llvm-commits mailing list