[llvm] cf679e6 - SystemZ: Rename SystemZMCExpr::VK_ to SystemZ::S_
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 15 18:59:21 PDT 2025
Author: Fangrui Song
Date: 2025-06-15T18:59:16-07:00
New Revision: cf679e66fade71220535775cca895628bf7692af
URL: https://github.com/llvm/llvm-project/commit/cf679e66fade71220535775cca895628bf7692af
DIFF: https://github.com/llvm/llvm-project/commit/cf679e66fade71220535775cca895628bf7692af.diff
LOG: SystemZ: Rename SystemZMCExpr::VK_ to SystemZ::S_
Prepare for removing SystemZMCExpr. Adopt the newer naming convention
used by most other targets.
Added:
Modified:
llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
llvm/lib/Target/SystemZ/MCTargetDesc/SystemZELFObjectWriter.cpp
llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinterCommon.cpp
llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp
llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.h
llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCExpr.cpp
llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCExpr.h
llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
llvm/lib/Target/SystemZ/SystemZMCInstLower.cpp
llvm/lib/Target/SystemZ/SystemZTargetObjectFile.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp b/llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
index 83c74c8a976dc..74a8822a12ac7 100644
--- a/llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
+++ b/llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
@@ -1707,12 +1707,12 @@ ParseStatus SystemZAsmParser::parsePCRel(OperandVector &Operands,
if (Parser.getTok().isNot(AsmToken::Identifier))
return Error(Parser.getTok().getLoc(), "unexpected token");
- SystemZMCExpr::Specifier Kind = SystemZMCExpr::VK_None;
+ SystemZMCExpr::Specifier Kind = SystemZ::S_None;
StringRef Name = Parser.getTok().getString();
if (Name == "tls_gdcall")
- Kind = SystemZMCExpr::VK_TLSGD;
+ Kind = SystemZ::S_TLSGD;
else if (Name == "tls_ldcall")
- Kind = SystemZMCExpr::VK_TLSLDM;
+ Kind = SystemZ::S_TLSLDM;
else
return Error(Parser.getTok().getLoc(), "unknown TLS tag");
Parser.Lex();
diff --git a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZELFObjectWriter.cpp b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZELFObjectWriter.cpp
index b44859d75df0f..8b5587ab71255 100644
--- a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZELFObjectWriter.cpp
+++ b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZELFObjectWriter.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "MCTargetDesc/SystemZMCExpr.h"
+#include "MCTargetDesc/SystemZMCAsmInfo.h"
#include "MCTargetDesc/SystemZMCFixups.h"
#include "MCTargetDesc/SystemZMCTargetDesc.h"
#include "llvm/BinaryFormat/ELF.h"
@@ -103,14 +103,14 @@ unsigned SystemZELFObjectWriter::getRelocType(const MCFixup &Fixup,
bool IsPCRel) const {
SMLoc Loc = Fixup.getLoc();
unsigned Kind = Fixup.getKind();
- auto Specifier = SystemZMCExpr::Specifier(Target.getSpecifier());
+ auto Specifier = SystemZ::Specifier(Target.getSpecifier());
switch (Specifier) {
- case SystemZMCExpr::VK_INDNTPOFF:
- case SystemZMCExpr::VK_NTPOFF:
- case SystemZMCExpr::VK_TLSGD:
- case SystemZMCExpr::VK_TLSLD:
- case SystemZMCExpr::VK_TLSLDM:
- case SystemZMCExpr::VK_DTPOFF:
+ case SystemZ::S_INDNTPOFF:
+ case SystemZ::S_NTPOFF:
+ case SystemZ::S_TLSGD:
+ case SystemZ::S_TLSLD:
+ case SystemZ::S_TLSLDM:
+ case SystemZ::S_DTPOFF:
if (auto *SA = Target.getAddSym())
cast<MCSymbolELF>(SA)->setType(ELF::STT_TLS);
break;
@@ -119,12 +119,12 @@ unsigned SystemZELFObjectWriter::getRelocType(const MCFixup &Fixup,
}
switch (Specifier) {
- case SystemZMCExpr::VK_None:
+ case SystemZ::S_None:
if (IsPCRel)
return getPCRelReloc(Loc, Kind);
return getAbsoluteReloc(Loc, Kind);
- case SystemZMCExpr::VK_NTPOFF:
+ case SystemZ::S_NTPOFF:
assert(!IsPCRel && "NTPOFF shouldn't be PC-relative");
switch (Kind) {
case FK_Data_4:
@@ -135,14 +135,14 @@ unsigned SystemZELFObjectWriter::getRelocType(const MCFixup &Fixup,
reportError(Loc, "Unsupported thread-local address (local-exec)");
return 0;
- case SystemZMCExpr::VK_INDNTPOFF:
+ case SystemZ::S_INDNTPOFF:
if (IsPCRel && Kind == SystemZ::FK_390_PC32DBL)
return ELF::R_390_TLS_IEENT;
reportError(Loc,
"Only PC-relative INDNTPOFF accesses are supported for now");
return 0;
- case SystemZMCExpr::VK_DTPOFF:
+ case SystemZ::S_DTPOFF:
assert(!IsPCRel && "DTPOFF shouldn't be PC-relative");
switch (Kind) {
case FK_Data_4:
@@ -153,7 +153,7 @@ unsigned SystemZELFObjectWriter::getRelocType(const MCFixup &Fixup,
reportError(Loc, "Unsupported thread-local address (local-dynamic)");
return 0;
- case SystemZMCExpr::VK_TLSLDM:
+ case SystemZ::S_TLSLDM:
assert(!IsPCRel && "TLSLDM shouldn't be PC-relative");
switch (Kind) {
case FK_Data_4:
@@ -166,7 +166,7 @@ unsigned SystemZELFObjectWriter::getRelocType(const MCFixup &Fixup,
reportError(Loc, "Unsupported thread-local address (local-dynamic)");
return 0;
- case SystemZMCExpr::VK_TLSGD:
+ case SystemZ::S_TLSGD:
assert(!IsPCRel && "TLSGD shouldn't be PC-relative");
switch (Kind) {
case FK_Data_4:
@@ -179,14 +179,14 @@ unsigned SystemZELFObjectWriter::getRelocType(const MCFixup &Fixup,
reportError(Loc, "Unsupported thread-local address (general-dynamic)");
return 0;
- case SystemZMCExpr::VK_GOT:
- case SystemZMCExpr::VK_GOTENT:
+ case SystemZ::S_GOT:
+ case SystemZ::S_GOTENT:
if (IsPCRel && Kind == SystemZ::FK_390_PC32DBL)
return ELF::R_390_GOTENT;
reportError(Loc, "Only PC-relative GOT accesses are supported for now");
return 0;
- case SystemZMCExpr::VK_PLT:
+ case SystemZ::S_PLT:
assert(IsPCRel && "@PLT shouldn't be PC-relative");
switch (Kind) {
case SystemZ::FK_390_PC12DBL:
@@ -209,8 +209,8 @@ unsigned SystemZELFObjectWriter::getRelocType(const MCFixup &Fixup,
bool SystemZELFObjectWriter::needsRelocateWithSymbol(const MCValue &V,
unsigned Type) const {
switch (V.getSpecifier()) {
- case SystemZMCExpr::VK_GOT:
- case SystemZMCExpr::VK_PLT:
+ case SystemZ::S_GOT:
+ case SystemZ::S_PLT:
return true;
default:
return false;
diff --git a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinterCommon.cpp b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinterCommon.cpp
index 7fd1a1c2d801a..297fdc8325928 100644
--- a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinterCommon.cpp
+++ b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinterCommon.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "SystemZInstPrinterCommon.h"
-#include "MCTargetDesc/SystemZMCExpr.h"
+#include "MCTargetDesc/SystemZMCAsmInfo.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCRegister.h"
@@ -186,10 +186,10 @@ void SystemZInstPrinterCommon::printPCRelTLSOperand(const MCInst *MI,
const MCOperand &MO = MI->getOperand(OpNum + 1);
const MCSymbolRefExpr &refExp = cast<MCSymbolRefExpr>(*MO.getExpr());
switch (refExp.getSpecifier()) {
- case SystemZMCExpr::VK_TLSGD:
+ case SystemZ::S_TLSGD:
O << ":tls_gdcall:";
break;
- case SystemZMCExpr::VK_TLSLDM:
+ case SystemZ::S_TLSLDM:
O << ":tls_ldcall:";
break;
default:
diff --git a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp
index e9d387399bf30..0f7341e6d03bb 100644
--- a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp
+++ b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp
@@ -14,15 +14,11 @@
using namespace llvm;
const MCAsmInfo::VariantKindDesc variantKindDescs[] = {
- {SystemZMCExpr::VK_DTPOFF, "DTPOFF"},
- {SystemZMCExpr::VK_GOT, "GOT"},
- {SystemZMCExpr::VK_GOTENT, "GOTENT"},
- {SystemZMCExpr::VK_INDNTPOFF, "INDNTPOFF"},
- {SystemZMCExpr::VK_NTPOFF, "NTPOFF"},
- {SystemZMCExpr::VK_PLT, "PLT"},
- {SystemZMCExpr::VK_TLSGD, "TLSGD"},
- {SystemZMCExpr::VK_TLSLD, "TLSLD"},
- {SystemZMCExpr::VK_TLSLDM, "TLSLDM"},
+ {SystemZ::S_DTPOFF, "DTPOFF"}, {SystemZ::S_GOT, "GOT"},
+ {SystemZ::S_GOTENT, "GOTENT"}, {SystemZ::S_INDNTPOFF, "INDNTPOFF"},
+ {SystemZ::S_NTPOFF, "NTPOFF"}, {SystemZ::S_PLT, "PLT"},
+ {SystemZ::S_TLSGD, "TLSGD"}, {SystemZ::S_TLSLD, "TLSLD"},
+ {SystemZ::S_TLSLDM, "TLSLDM"},
};
SystemZMCAsmInfoELF::SystemZMCAsmInfoELF(const Triple &TT) {
diff --git a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.h b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.h
index 58b9a3dd652ef..6d7d669fa8e12 100644
--- a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.h
+++ b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.h
@@ -28,6 +28,28 @@ class SystemZMCAsmInfoGOFF : public MCAsmInfoGOFF {
bool isAcceptableChar(char C) const override;
};
+namespace SystemZ {
+using Specifier = uint16_t;
+enum {
+ S_None,
+
+ S_DTPOFF,
+ S_GOT,
+ S_GOTENT,
+ S_INDNTPOFF,
+ S_NTPOFF,
+ S_PLT,
+ S_TLSGD,
+ S_TLSLD,
+ S_TLSLDM,
+
+ // HLASM docs for address constants:
+ // https://www.ibm.com/docs/en/hla-and-tf/1.6?topic=value-address-constants
+ S_RCon, // Address of ADA of symbol.
+ S_VCon, // Address of external function symbol.
+};
+} // namespace SystemZ
+
} // end namespace llvm
#endif
diff --git a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCExpr.cpp b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCExpr.cpp
index 6dcca60dcedda..7b82c0cb6609c 100644
--- a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCExpr.cpp
+++ b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCExpr.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
#include "SystemZMCExpr.h"
+#include "SystemZMCAsmInfo.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
using namespace llvm;
@@ -20,11 +21,11 @@ const SystemZMCExpr *SystemZMCExpr::create(MCSpecifierExpr::Spec S,
StringRef SystemZMCExpr::getVariantKindName() const {
switch (getSpecifier()) {
- case VK_None:
+ case SystemZ::S_None:
return "A";
- case VK_SystemZ_RCon:
+ case SystemZ::S_RCon:
return "R";
- case VK_SystemZ_VCon:
+ case SystemZ::S_VCon:
return "V";
default:
llvm_unreachable("Invalid kind");
diff --git a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCExpr.h b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCExpr.h
index ac1de97ecf0a1..8e730e50ae9dd 100644
--- a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCExpr.h
+++ b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCExpr.h
@@ -18,24 +18,6 @@ namespace llvm {
class SystemZMCExpr : public MCSpecifierExpr {
public:
using Specifier = Spec;
- enum {
- VK_None,
-
- VK_DTPOFF = MCSymbolRefExpr::FirstTargetSpecifier,
- VK_GOT,
- VK_GOTENT,
- VK_INDNTPOFF,
- VK_NTPOFF,
- VK_PLT,
- VK_TLSGD,
- VK_TLSLD,
- VK_TLSLDM,
-
- // HLASM docs for address constants:
- // https://www.ibm.com/docs/en/hla-and-tf/1.6?topic=value-address-constants
- VK_SystemZ_RCon, // Address of ADA of symbol.
- VK_SystemZ_VCon, // Address of external function symbol.
- };
private:
explicit SystemZMCExpr(const MCExpr *Expr, Spec S)
diff --git a/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp b/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
index eb4b4c1647a13..d5e034b5a0096 100644
--- a/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
@@ -14,7 +14,7 @@
#include "SystemZAsmPrinter.h"
#include "MCTargetDesc/SystemZGNUInstPrinter.h"
#include "MCTargetDesc/SystemZHLASMInstPrinter.h"
-#include "MCTargetDesc/SystemZMCExpr.h"
+#include "MCTargetDesc/SystemZMCAsmInfo.h"
#include "MCTargetDesc/SystemZMCTargetDesc.h"
#include "SystemZConstantPoolValue.h"
#include "SystemZMCInstLower.h"
@@ -79,7 +79,7 @@ static MCInst lowerRIEfLow(const MachineInstr *MI, unsigned Opcode) {
static const MCSymbolRefExpr *getTLSGetOffset(MCContext &Context) {
StringRef Name = "__tls_get_offset";
return MCSymbolRefExpr::create(Context.getOrCreateSymbol(Name),
- SystemZMCExpr::VK_PLT, Context);
+ SystemZ::S_PLT, Context);
}
static const MCSymbolRefExpr *getGlobalOffsetTable(MCContext &Context) {
@@ -319,11 +319,10 @@ void SystemZAsmPrinter::emitInstruction(const MachineInstr *MI) {
break;
case SystemZ::CallBRASL_XPLINK64:
- EmitToStreamer(
- *OutStreamer,
- MCInstBuilder(SystemZ::BRASL)
- .addReg(SystemZ::R7D)
- .addExpr(Lower.getExpr(MI->getOperand(0), SystemZMCExpr::VK_PLT)));
+ EmitToStreamer(*OutStreamer, MCInstBuilder(SystemZ::BRASL)
+ .addReg(SystemZ::R7D)
+ .addExpr(Lower.getExpr(MI->getOperand(0),
+ SystemZ::S_PLT)));
emitCallInformation(CallType::BRASL7);
return;
@@ -380,10 +379,9 @@ void SystemZAsmPrinter::emitInstruction(const MachineInstr *MI) {
return;
}
case SystemZ::CallBRASL:
- LoweredMI =
- MCInstBuilder(SystemZ::BRASL)
- .addReg(SystemZ::R14D)
- .addExpr(Lower.getExpr(MI->getOperand(0), SystemZMCExpr::VK_PLT));
+ LoweredMI = MCInstBuilder(SystemZ::BRASL)
+ .addReg(SystemZ::R14D)
+ .addExpr(Lower.getExpr(MI->getOperand(0), SystemZ::S_PLT));
break;
case SystemZ::CallBASR:
@@ -393,17 +391,15 @@ void SystemZAsmPrinter::emitInstruction(const MachineInstr *MI) {
break;
case SystemZ::CallJG:
- LoweredMI =
- MCInstBuilder(SystemZ::JG)
- .addExpr(Lower.getExpr(MI->getOperand(0), SystemZMCExpr::VK_PLT));
+ LoweredMI = MCInstBuilder(SystemZ::JG)
+ .addExpr(Lower.getExpr(MI->getOperand(0), SystemZ::S_PLT));
break;
case SystemZ::CallBRCL:
- LoweredMI =
- MCInstBuilder(SystemZ::BRCL)
- .addImm(MI->getOperand(0).getImm())
- .addImm(MI->getOperand(1).getImm())
- .addExpr(Lower.getExpr(MI->getOperand(2), SystemZMCExpr::VK_PLT));
+ LoweredMI = MCInstBuilder(SystemZ::BRCL)
+ .addImm(MI->getOperand(0).getImm())
+ .addImm(MI->getOperand(1).getImm())
+ .addExpr(Lower.getExpr(MI->getOperand(2), SystemZ::S_PLT));
break;
case SystemZ::CallBR:
@@ -495,15 +491,15 @@ void SystemZAsmPrinter::emitInstruction(const MachineInstr *MI) {
MCInstBuilder(SystemZ::BRASL)
.addReg(SystemZ::R14D)
.addExpr(getTLSGetOffset(MF->getContext()))
- .addExpr(Lower.getExpr(MI->getOperand(0), SystemZMCExpr::VK_TLSGD));
+ .addExpr(Lower.getExpr(MI->getOperand(0), SystemZ::S_TLSGD));
break;
case SystemZ::TLS_LDCALL:
- LoweredMI = MCInstBuilder(SystemZ::BRASL)
- .addReg(SystemZ::R14D)
- .addExpr(getTLSGetOffset(MF->getContext()))
- .addExpr(Lower.getExpr(MI->getOperand(0),
- SystemZMCExpr::VK_TLSLDM));
+ LoweredMI =
+ MCInstBuilder(SystemZ::BRASL)
+ .addReg(SystemZ::R14D)
+ .addExpr(getTLSGetOffset(MF->getContext()))
+ .addExpr(Lower.getExpr(MI->getOperand(0), SystemZ::S_TLSLDM));
break;
case SystemZ::GOT:
@@ -798,7 +794,7 @@ void SystemZAsmPrinter::LowerFENTRY_CALL(const MachineInstr &MI,
MCSymbol *fentry = Ctx.getOrCreateSymbol("__fentry__");
const MCSymbolRefExpr *Op =
- MCSymbolRefExpr::create(fentry, SystemZMCExpr::VK_PLT, Ctx);
+ MCSymbolRefExpr::create(fentry, SystemZ::S_PLT, Ctx);
OutStreamer->emitInstruction(
MCInstBuilder(SystemZ::BRASL).addReg(SystemZ::R0D).addExpr(Op),
getSubtargetInfo());
@@ -880,7 +876,7 @@ void SystemZAsmPrinter::LowerPATCHPOINT(const MachineInstr &MI,
EncodedBytes += 2;
}
} else if (CalleeMO.isGlobal()) {
- const MCExpr *Expr = Lower.getExpr(CalleeMO, SystemZMCExpr::VK_PLT);
+ const MCExpr *Expr = Lower.getExpr(CalleeMO, SystemZ::S_PLT);
EmitToStreamer(*OutStreamer, MCInstBuilder(SystemZ::BRASL)
.addReg(SystemZ::R14D)
.addExpr(Expr));
@@ -923,11 +919,10 @@ void SystemZAsmPrinter::LowerPATCHABLE_FUNCTION_ENTER(
EmitNop(OutContext, *OutStreamer, 2, getSubtargetInfo());
EmitToStreamer(*OutStreamer,
MCInstBuilder(SystemZ::LLILF).addReg(SystemZ::R2D).addImm(0));
- EmitToStreamer(*OutStreamer,
- MCInstBuilder(SystemZ::BRASL)
- .addReg(SystemZ::R14D)
- .addExpr(MCSymbolRefExpr::create(
- FuncEntry, SystemZMCExpr::VK_PLT, OutContext)));
+ EmitToStreamer(*OutStreamer, MCInstBuilder(SystemZ::BRASL)
+ .addReg(SystemZ::R14D)
+ .addExpr(MCSymbolRefExpr::create(
+ FuncEntry, SystemZ::S_PLT, OutContext)));
OutStreamer->emitLabel(EndOfSled);
recordSled(BeginOfSled, MI, SledKind::FUNCTION_ENTER, 2);
}
@@ -967,10 +962,9 @@ void SystemZAsmPrinter::LowerPATCHABLE_RET(const MachineInstr &MI,
EmitNop(OutContext, *OutStreamer, 4, getSubtargetInfo());
EmitToStreamer(*OutStreamer,
MCInstBuilder(SystemZ::LLILF).addReg(SystemZ::R2D).addImm(0));
- EmitToStreamer(*OutStreamer,
- MCInstBuilder(SystemZ::J)
- .addExpr(MCSymbolRefExpr::create(
- FuncExit, SystemZMCExpr::VK_PLT, OutContext)));
+ EmitToStreamer(*OutStreamer, MCInstBuilder(SystemZ::J)
+ .addExpr(MCSymbolRefExpr::create(
+ FuncExit, SystemZ::S_PLT, OutContext)));
if (FallthroughLabel)
OutStreamer->emitLabel(FallthroughLabel);
recordSled(BeginOfSled, MI, SledKind::FUNCTION_EXIT, 2);
@@ -992,13 +986,13 @@ void SystemZAsmPrinter::emitAttributes(Module &M) {
static uint8_t getSpecifierFromModifier(SystemZCP::SystemZCPModifier Modifier) {
switch (Modifier) {
case SystemZCP::TLSGD:
- return SystemZMCExpr::VK_TLSGD;
+ return SystemZ::S_TLSGD;
case SystemZCP::TLSLDM:
- return SystemZMCExpr::VK_TLSLDM;
+ return SystemZ::S_TLSLDM;
case SystemZCP::DTPOFF:
- return SystemZMCExpr::VK_DTPOFF;
+ return SystemZ::S_DTPOFF;
case SystemZCP::NTPOFF:
- return SystemZMCExpr::VK_NTPOFF;
+ return SystemZ::S_NTPOFF;
}
llvm_unreachable("Invalid SystemCPModifier!");
}
@@ -1145,12 +1139,12 @@ void SystemZAsmPrinter::emitADASection() {
// imported functions, that are placed in the ADA to be 8 byte aligned.
EMIT_COMMENT("function descriptor of");
OutStreamer->emitValue(
- SystemZMCExpr::create(SystemZMCExpr::VK_SystemZ_RCon,
+ SystemZMCExpr::create(SystemZ::S_RCon,
MCSymbolRefExpr::create(Sym, OutContext),
OutContext),
PointerSize);
OutStreamer->emitValue(
- SystemZMCExpr::create(SystemZMCExpr::VK_SystemZ_VCon,
+ SystemZMCExpr::create(SystemZ::S_VCon,
MCSymbolRefExpr::create(Sym, OutContext),
OutContext),
PointerSize);
@@ -1159,7 +1153,7 @@ void SystemZAsmPrinter::emitADASection() {
case SystemZII::MO_ADA_DATA_SYMBOL_ADDR:
EMIT_COMMENT("pointer to data symbol");
OutStreamer->emitValue(
- SystemZMCExpr::create(SystemZMCExpr::VK_None,
+ SystemZMCExpr::create(SystemZ::S_None,
MCSymbolRefExpr::create(Sym, OutContext),
OutContext),
PointerSize);
@@ -1174,7 +1168,7 @@ void SystemZAsmPrinter::emitADASection() {
EMIT_COMMENT("pointer to function descriptor");
OutStreamer->emitValue(
- SystemZMCExpr::create(SystemZMCExpr::VK_SystemZ_VCon,
+ SystemZMCExpr::create(SystemZ::S_VCon,
MCSymbolRefExpr::create(Alias, OutContext),
OutContext),
PointerSize);
diff --git a/llvm/lib/Target/SystemZ/SystemZMCInstLower.cpp b/llvm/lib/Target/SystemZ/SystemZMCInstLower.cpp
index 1aa71618082fb..4a68c5d6462d7 100644
--- a/llvm/lib/Target/SystemZ/SystemZMCInstLower.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZMCInstLower.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "SystemZMCInstLower.h"
-#include "MCTargetDesc/SystemZMCExpr.h"
+#include "MCTargetDesc/SystemZMCAsmInfo.h"
#include "SystemZAsmPrinter.h"
#include "llvm/IR/Mangler.h"
#include "llvm/MC/MCExpr.h"
@@ -20,11 +20,11 @@ using namespace llvm;
static SystemZMCExpr::Specifier getSpecifierForTFlags(unsigned Flags) {
switch (Flags & SystemZII::MO_SYMBOL_MODIFIER) {
case 0:
- return SystemZMCExpr::VK_None;
+ return SystemZ::S_None;
case SystemZII::MO_GOT:
- return SystemZMCExpr::VK_GOT;
+ return SystemZ::S_GOT;
case SystemZII::MO_INDNTPOFF:
- return SystemZMCExpr::VK_INDNTPOFF;
+ return SystemZ::S_INDNTPOFF;
}
llvm_unreachable("Unrecognised MO_ACCESS_MODEL");
}
diff --git a/llvm/lib/Target/SystemZ/SystemZTargetObjectFile.cpp b/llvm/lib/Target/SystemZ/SystemZTargetObjectFile.cpp
index 7d22c26ff9a86..ae90c51432fe9 100644
--- a/llvm/lib/Target/SystemZ/SystemZTargetObjectFile.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZTargetObjectFile.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "SystemZTargetObjectFile.h"
-#include "MCTargetDesc/SystemZMCExpr.h"
+#include "MCTargetDesc/SystemZMCAsmInfo.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/Target/TargetMachine.h"
@@ -15,5 +15,5 @@ using namespace llvm;
const MCExpr *SystemZELFTargetObjectFile::getDebugThreadLocalSymbol(
const MCSymbol *Sym) const {
- return MCSymbolRefExpr::create(Sym, SystemZMCExpr::VK_DTPOFF, getContext());
+ return MCSymbolRefExpr::create(Sym, SystemZ::S_DTPOFF, getContext());
}
More information about the llvm-commits
mailing list