[llvm] 1a6d770 - [Hexagon] Pass Hexagon::PC to InitializeHexagonMCRegisterInfo

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 13 12:46:38 PST 2022


Author: Krzysztof Parzyszek
Date: 2022-11-13T14:35:11-06:00
New Revision: 1a6d770447c57222470ca0f2d029f31ed7ed750e

URL: https://github.com/llvm/llvm-project/commit/1a6d770447c57222470ca0f2d029f31ed7ed750e
DIFF: https://github.com/llvm/llvm-project/commit/1a6d770447c57222470ca0f2d029f31ed7ed750e.diff

LOG: [Hexagon] Pass Hexagon::PC to InitializeHexagonMCRegisterInfo

That will make MCRegisterInfo::getProgramCounter return the right thing.

Added: 
    

Modified: 
    llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp b/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp
index 3fd69a1b97602..8ee53624aeba8 100644
--- a/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp
+++ b/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp
@@ -297,7 +297,8 @@ llvm::MCInstrInfo *llvm::createHexagonMCInstrInfo() {
 
 static MCRegisterInfo *createHexagonMCRegisterInfo(const Triple &TT) {
   MCRegisterInfo *X = new MCRegisterInfo();
-  InitHexagonMCRegisterInfo(X, Hexagon::R31);
+  InitHexagonMCRegisterInfo(X, Hexagon::R31, /*DwarfFlavour=*/0,
+                            /*EHFlavour=*/0, /*PC=*/Hexagon::PC);
   return X;
 }
 


        


More information about the llvm-commits mailing list