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

Wesley Wiser via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 22 19:51:46 PDT 2024


================
@@ -619,44 +619,44 @@ class MCCFIInstruction {
 
   /// .cfi_window_save SPARC register window is saved.
   static MCCFIInstruction createWindowSave(MCSymbol *L, SMLoc Loc = {}) {
-    return MCCFIInstruction(OpWindowSave, L, 0, 0, Loc);
+    return MCCFIInstruction(OpWindowSave, L, 0, INT64_C(0), Loc);
----------------
wesleywiser wrote:

Just `0` results in 

```
llvm/include/llvm/MC/MCDwarf.h:622:55: error: call of overloaded ‘MCCFIInstruction(llvm::MCCFIInstruction::OpType, llvm::MCSymbol*&, int, int, llvm::SMLoc&)’ is ambiguous
  622 |     return MCCFIInstruction(OpWindowSave, L, 0, 0, Loc);
      |                                                       ^
llvm/include/llvm/MC/MCDwarf.h:537:3: note: candidate: ‘llvm::MCCFIInstruction::MCCFIInstruction(llvm::MCCFIInstruction::OpType, llvm::MCSymbol*, unsigned int, unsigned int, llvm::SMLoc)’
  537 |   MCCFIInstruction(OpType Op, MCSymbol *L, unsigned R1, unsigned R2, SMLoc Loc)
      |   ^~~~~~~~~~~~~~~~
llvm/include/llvm/MC/MCDwarf.h:530:3: note: candidate: ‘llvm::MCCFIInstruction::MCCFIInstruction(llvm::MCCFIInstruction::OpType, llvm::MCSymbol*, unsigned int, int64_t, llvm::SMLoc, llvm::StringRef, llvm::StringRef)’
  530 |   MCCFIInstruction(OpType Op, MCSymbol *L, unsigned R, int64_t O, SMLoc Loc,
      |   ^~~~~~~~~~~~~~~~
```

is `0L` preferred over `INT64_C(0)`? 

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


More information about the llvm-commits mailing list