Skip to content

Commit 4e12b6c

Browse files
committed
Remove use of S_PLT
1 parent 6e9cf96 commit 4e12b6c

File tree

8 files changed

+17
-16
lines changed

8 files changed

+17
-16
lines changed

llvm/include/llvm/MC/MCGOFFObjectWriter.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ class MCGOFFObjectTargetWriter : public MCObjectTargetWriter {
2727

2828
public:
2929
enum RLDRelocationType {
30-
Reloc_Type_ACon = 0x1, // General address.
31-
Reloc_Type_RelImm = 0x2, // Relative-immediate address.
32-
Reloc_Type_QCon = 0x3, // Offset of symbol in class.
33-
Reloc_Type_VCon = 0x4, // Address of external symbol.
34-
Reloc_Type_RCon = 0x5, // PSECT of symbol.
30+
Reloc_Type_ACon = 0x1, // General address.
31+
Reloc_Type_RICon = 0x2, // Relative-immediate address.
32+
Reloc_Type_QCon = 0x3, // Offset of symbol in class.
33+
Reloc_Type_VCon = 0x4, // Address of external symbol.
34+
Reloc_Type_RCon = 0x5, // PSECT of symbol.
3535
};
3636

3737
~MCGOFFObjectTargetWriter() override = default;

llvm/lib/MC/GOFFObjectWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ void GOFFObjectWriter::recordRelocation(const MCFragment &F,
692692
const MCSectionGOFF *PSection = static_cast<MCSectionGOFF *>(F.getParent());
693693
const auto &A = *static_cast<const MCSymbolGOFF *>(Target.getAddSym());
694694
const MCSymbolGOFF *B = static_cast<const MCSymbolGOFF *>(Target.getSubSym());
695-
if (RelocType == MCGOFFObjectTargetWriter::Reloc_Type_RelImm) {
695+
if (RelocType == MCGOFFObjectTargetWriter::Reloc_Type_RICon) {
696696
if (A.isUndefined()) {
697697
Asm->reportError(
698698
Fixup.getLoc(),

llvm/lib/Target/SystemZ/MCTargetDesc/SystemZGOFFObjectWriter.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ SystemZGOFFObjectWriter::SystemZGOFFObjectWriter()
2929
unsigned SystemZGOFFObjectWriter::getRelocType(const MCValue &Target,
3030
const MCFixup &Fixup) const {
3131
switch (Target.getSpecifier()) {
32-
case SystemZ::S_PLT: // TODO This doen't make sense.
33-
return Reloc_Type_RelImm;
3432
case SystemZ::S_RCon:
3533
return Reloc_Type_RCon;
3634
case SystemZ::S_VCon:
@@ -39,7 +37,7 @@ unsigned SystemZGOFFObjectWriter::getRelocType(const MCValue &Target,
3937
return Reloc_Type_QCon;
4038
case SystemZ::S_None:
4139
if (Fixup.isPCRel())
42-
return Reloc_Type_RelImm;
40+
return Reloc_Type_RICon;
4341
return Reloc_Type_ACon;
4442
}
4543
llvm_unreachable("Modifier not supported");

llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ void SystemZMCAsmInfoGOFF::printSpecifierExpr(
6565
case SystemZ::S_None:
6666
OS << "A";
6767
break;
68+
case SystemZ::S_QCon:
69+
OS << "Q";
70+
break;
6871
case SystemZ::S_RCon:
6972
OS << "R";
7073
break;

llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ enum {
4949

5050
// HLASM docs for address constants:
5151
// https://www.ibm.com/docs/en/hla-and-tf/1.6?topic=value-address-constants
52-
S_RCon, // Address of ADA of symbol.
53-
S_VCon, // Address of external function symbol.
54-
S_QCon, // Class-based offset.
52+
S_RCon, // Address of ADA of symbol.
53+
S_VCon, // Address of external function symbol.
54+
S_QCon, // Class-based offset.
5555
};
5656
} // namespace SystemZ
5757

llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ void SystemZAsmPrinter::emitInstruction(const MachineInstr *MI) {
325325
EmitToStreamer(*OutStreamer, MCInstBuilder(SystemZ::BRASL)
326326
.addReg(SystemZ::R7D)
327327
.addExpr(Lower.getExpr(MI->getOperand(0),
328-
SystemZ::S_PLT)));
328+
SystemZ::S_None)));
329329
emitCallInformation(CallType::BRASL7);
330330
return;
331331

llvm/test/CodeGen/SystemZ/call-zos-02.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ entry:
99
define hidden signext i32 @caller2() {
1010
entry:
1111
; CHECK-LABEL: caller2:
12-
; CHECK: brasl 7,caller@PLT * encoding: [0xc0,0x75,A,A,A,A]
13-
; CHECK-NEXT: * fixup A - offset: 2, value: caller@PLT+2, kind: FK_390_PC32DBL
12+
; CHECK: brasl 7,caller * encoding: [0xc0,0x75,A,A,A,A]
13+
; CHECK-NEXT: * fixup A - offset: 2, value: caller+2, kind: FK_390_PC32DBL
1414
; CHECK-NEXT: bcr 0,3 * encoding: [0x07,0x03]
1515
%call = call signext i32 @caller()
1616
ret i32 %call

llvm/test/CodeGen/SystemZ/zos-ada.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
; CHECK: stmg 6,8,1872(4)
77
; CHECK-NEXT: aghi 4,-192
88
; CHECK-NEXT: lgr 8,5
9-
; CHECK-NEXT: brasl 7,callee_internal@PLT
9+
; CHECK-NEXT: brasl 7,callee_internal
1010
; CHECK-NEXT: bcr 0,3
1111
; CHECK-NEXT: lg 6,8(8)
1212
; CHECK-NEXT: lg 5,0(8)

0 commit comments

Comments
 (0)