[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-06-25 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,106 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-06-25 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,106 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Emit symbols for functions. (PR #144437)

2025-06-17 Thread Kai Nacke via llvm-branch-commits
https://github.com/redstar updated https://github.com/llvm/llvm-project/pull/144437 >From 2b99eb315cea3e75a6ecc49571d75d9371669116 Mon Sep 17 00:00:00 2001 From: Kai Nacke Date: Mon, 16 Jun 2025 17:27:16 -0400 Subject: [PATCH 1/2] [GOFF] Emit symbols for functions. A function entry is mapped t

[llvm-branch-commits] [llvm] [GOFF] Add writing of text records (PR #137235)

2025-06-16 Thread Kai Nacke via llvm-branch-commits
https://github.com/redstar updated https://github.com/llvm/llvm-project/pull/137235 >From c9b5b19f6f6cb74f0aaf5eac950158342d3a3ada Mon Sep 17 00:00:00 2001 From: Kai Nacke Date: Wed, 9 Apr 2025 15:08:52 -0400 Subject: [PATCH 1/6] [GOFF] Add writing of text records Sections which are not allowe

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-06-16 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of text records (PR #137235)

2025-05-09 Thread Kai Nacke via llvm-branch-commits
@@ -50,26 +53,26 @@ class MCSectionGOFF final : public MCSection { friend class MCContext; friend class MCSymbolGOFF; - MCSectionGOFF(StringRef Name, SectionKind K, GOFF::SDAttr SDAttributes, -MCSectionGOFF *Parent) - : MCSection(SV_GOFF, Name, K.isTe

[llvm-branch-commits] [llvm] [GOFF] Add writing of text records (PR #137235)

2025-05-08 Thread Kai Nacke via llvm-branch-commits
@@ -571,7 +571,6 @@ void MCObjectFileInfo::initGOFFMCObjectFileInfo(const Triple &T) { GOFF::ESD_LB_Initial, GOFF::ESD_RQ_0, GOFF::ESD_ALIGN_Doubleword, 0}, RootSDSection); - redstar wrote: Fixed. https://github.co

[llvm-branch-commits] [llvm] [GOFF] Add writing of text records (PR #137235)

2025-05-08 Thread Kai Nacke via llvm-branch-commits
https://github.com/redstar updated https://github.com/llvm/llvm-project/pull/137235 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[llvm-branch-commits] [llvm] [GOFF] Add writing of text records (PR #137235)

2025-05-06 Thread Kai Nacke via llvm-branch-commits
@@ -688,28 +689,32 @@ MCSectionGOFF *MCContext::getGOFFSection(SectionKind Kind, StringRef Name, return Iter->second; StringRef CachedName = StringRef(Iter->first.c_str(), Name.size()); - MCSectionGOFF *GOFFSection = new (GOFFAllocator.Allocate()) MCSectionGOFF( -

[llvm-branch-commits] [llvm] [GOFF] Add writing of text records (PR #137235)

2025-05-06 Thread Kai Nacke via llvm-branch-commits
https://github.com/redstar updated https://github.com/llvm/llvm-project/pull/137235 >From c9b5b19f6f6cb74f0aaf5eac950158342d3a3ada Mon Sep 17 00:00:00 2001 From: Kai Nacke Date: Wed, 9 Apr 2025 15:08:52 -0400 Subject: [PATCH 1/4] [GOFF] Add writing of text records Sections which are not allowe

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-05-06 Thread Kai Nacke via llvm-branch-commits
redstar wrote: @MaskRay Sorry, your comment is basically empty. I guess a GitHub problem? https://github.com/llvm/llvm-project/pull/133799 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[llvm-branch-commits] [llvm] [GOFF] Add writing of text records (PR #137235)

2025-04-30 Thread Kai Nacke via llvm-branch-commits
redstar wrote: I had to force-push to get the fixed test cases. https://github.com/llvm/llvm-project/pull/137235 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [GOFF] Add writing of text records (PR #137235)

2025-04-30 Thread Kai Nacke via llvm-branch-commits
https://github.com/redstar updated https://github.com/llvm/llvm-project/pull/137235 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-29 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-29 Thread Kai Nacke via llvm-branch-commits
@@ -223,13 +197,95 @@ void GOFFOstream::finalizeRecord() { } namespace { +// A GOFFSymbol holds all the data required for writing an ESD record. +class GOFFSymbol { +public: + std::string Name; + uint32_t EsdId; + uint32_t ParentEsdId; + uint64_t Offset = 0; // Offset of t

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-29 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,145 @@ +//===- MCSectionGOFF.cpp - GOFF Code Section Representation ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-29 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,106 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of text records (PR #137235)

2025-04-29 Thread Kai Nacke via llvm-branch-commits
redstar wrote: > Also, the new tests seem to be failing in CI. It's also failing in the base PR. Looks like I made a mistake with my last update. https://github.com/llvm/llvm-project/pull/137235 ___ llvm-branch-commits mailing list llvm-branch-commit

[llvm-branch-commits] [llvm] [GOFF] Add writing of text records (PR #137235)

2025-04-29 Thread Kai Nacke via llvm-branch-commits
redstar wrote: > Why do we need all that "virtual section" stuff? Wouldn't it suffice to exit > early from ::writeText if the section length is zero? A virtual sections cannot contain data, and the MC layer checks that this is the case. This is the benefit I see in using a virtual sections. Bu

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-29 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,106 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of text records (PR #137235)

2025-04-24 Thread Kai Nacke via llvm-branch-commits
https://github.com/redstar updated https://github.com/llvm/llvm-project/pull/137235 >From 0e5c36a691fcbaa6f63c46f4cf86fa16857e137c Mon Sep 17 00:00:00 2001 From: Kai Nacke Date: Wed, 9 Apr 2025 15:08:52 -0400 Subject: [PATCH 1/2] [GOFF] Add writing of text records Sections which are not allowe

[llvm-branch-commits] [llvm] [GOFF] Add writing of text records (PR #137235)

2025-04-24 Thread Kai Nacke via llvm-branch-commits
https://github.com/redstar created https://github.com/llvm/llvm-project/pull/137235 Sections which are not allowed to carry data are marked as virtual. Only complication when writing out the text is that it must be written in chunks of 32k-1 bytes, which is done by having a wrapper stream writ

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-23 Thread Kai Nacke via llvm-branch-commits
redstar wrote: @uweigand I made all the suggested changes. https://github.com/llvm/llvm-project/pull/133799 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-21 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
https://github.com/redstar edited https://github.com/llvm/llvm-project/pull/133799 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,112 @@ +; RUN: llc <%s --mtriple s390x-ibm-zos --filetype=obj -o - | \ redstar wrote: Moved the tests. https://github.com/llvm/llvm-project/pull/133799 ___ llvm-branch-commits mailing list llvm-branch-commit

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,141 @@ +//===- MCSectionGOFF.cpp - GOFF Code Section Representation ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -26,6 +27,23 @@ GOFFObjectWriter &MCGOFFStreamer::getWriter() { return static_cast(getAssembler().getWriter()); } +namespace { +// Make sure that all section are registered in the correct order. +void registerSectionHierarchy(MCAssembler &Asm, MCSectionGOFF *Section) { --

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -26,6 +27,23 @@ GOFFObjectWriter &MCGOFFStreamer::getWriter() { return static_cast(getAssembler().getWriter()); } +namespace { +// Make sure that all section are registered in the correct order. +void registerSectionHierarchy(MCAssembler &Asm, MCSectionGOFF *Section) { --

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -599,8 +600,18 @@ class MCContext { unsigned Flags, unsigned EntrySize); - MCSectionGOFF *getGOFFSection(StringRef Section, SectionKind Kind, -

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,145 @@ +//===- MCSectionGOFF.cpp - GOFF Code Section Representation ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,145 @@ +//===- MCSectionGOFF.cpp - GOFF Code Section Representation ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
https://github.com/redstar edited https://github.com/llvm/llvm-project/pull/133799 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,145 @@ +//===- MCSectionGOFF.cpp - GOFF Code Section Representation ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,145 @@ +//===- MCSectionGOFF.cpp - GOFF Code Section Representation ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-14 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-14 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,145 @@ +//===- MCSectionGOFF.cpp - GOFF Code Section Representation ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-14 Thread Kai Nacke via llvm-branch-commits
@@ -2759,6 +2762,29 @@ MCSection *TargetLoweringObjectFileXCOFF::getSectionForLSDA( //===--===// TargetLoweringObjectFileGOFF::TargetLoweringObjectFileGOFF() = default; +void TargetLoweringObjectFileGOFF::ge

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-14 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-14 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-14 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-11 Thread Kai Nacke via llvm-branch-commits
@@ -223,13 +197,95 @@ void GOFFOstream::finalizeRecord() { } namespace { +// A GOFFSymbol holds all the data required for writing an ESD record. +class GOFFSymbol { +public: + std::string Name; + uint32_t EsdId; + uint32_t ParentEsdId; + uint64_t Offset = 0; // Offset of t

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-11 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-11 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Kai Nacke via llvm-branch-commits
@@ -16,34 +16,95 @@ #define LLVM_MC_MCSECTIONGOFF_H #include "llvm/BinaryFormat/GOFF.h" +#include "llvm/MC/MCGOFFAttributes.h" #include "llvm/MC/MCSection.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" namespace llvm { class MCExpr;

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Kai Nacke via llvm-branch-commits
@@ -239,6 +298,63 @@ class GOFFWriter { GOFFWriter::GOFFWriter(raw_pwrite_stream &OS, MCAssembler &Asm) : OS(OS), Asm(Asm) {} +void GOFFWriter::defineSectionSymbols(const MCSectionGOFF &Section) { + if (Section.isSD()) { +GOFFSymbol SD(Section.getName(), Section.getId

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Kai Nacke via llvm-branch-commits
@@ -2759,6 +2762,29 @@ MCSection *TargetLoweringObjectFileXCOFF::getSectionForLSDA( //===--===// TargetLoweringObjectFileGOFF::TargetLoweringObjectFileGOFF() = default; +void TargetLoweringObjectFileGOFF::ge

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-09 Thread Kai Nacke via llvm-branch-commits
@@ -239,6 +298,63 @@ class GOFFWriter { GOFFWriter::GOFFWriter(raw_pwrite_stream &OS, MCAssembler &Asm) : OS(OS), Asm(Asm) {} +void GOFFWriter::defineSectionSymbols(const MCSectionGOFF &Section) { + if (Section.isSD()) { +GOFFSymbol SD(Section.getName(), Section.getId

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-08 Thread Kai Nacke via llvm-branch-commits
@@ -2759,6 +2760,12 @@ MCSection *TargetLoweringObjectFileXCOFF::getSectionForLSDA( //===--===// TargetLoweringObjectFileGOFF::TargetLoweringObjectFileGOFF() = default; +void TargetLoweringObjectFileGOFF::ge

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-08 Thread Kai Nacke via llvm-branch-commits
@@ -230,10 +230,11 @@ class MCObjectFileInfo { MCSection *GLJMPSection = nullptr; // GOFF specific sections. - MCSection *PPA1Section = nullptr; - MCSection *PPA2Section = nullptr; - MCSection *PPA2ListSection = nullptr; - MCSection *ADASection = nullptr; + MCSection

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-08 Thread Kai Nacke via llvm-branch-commits
@@ -239,6 +298,63 @@ class GOFFWriter { GOFFWriter::GOFFWriter(raw_pwrite_stream &OS, MCAssembler &Asm) : OS(OS), Asm(Asm) {} +void GOFFWriter::defineSectionSymbols(const MCSectionGOFF &Section) { + if (Section.isSD()) { +GOFFSymbol SD(Section.getName(), Section.getId

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-08 Thread Kai Nacke via llvm-branch-commits
@@ -26,6 +27,29 @@ GOFFObjectWriter &MCGOFFStreamer::getWriter() { return static_cast(getAssembler().getWriter()); } +void MCGOFFStreamer::initSections(bool /*NoExecStack*/, + const MCSubtargetInfo &STI) { + MCContext &Ctx = getContext(); +

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-08 Thread Kai Nacke via llvm-branch-commits
redstar wrote: > > I use the ordinal number +1 of the section as the section number, but still > > need a counter for the symbols. > > Can't we just set the ordinal to the correct value to begin with? ELF sets > the ordinals while writing out the sections; I think we might as well do the > sa

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-08 Thread Kai Nacke via llvm-branch-commits
@@ -16,34 +16,95 @@ #define LLVM_MC_MCSECTIONGOFF_H #include "llvm/BinaryFormat/GOFF.h" +#include "llvm/MC/MCGOFFAttributes.h" #include "llvm/MC/MCSection.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" namespace llvm { class MCExpr;

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-08 Thread Kai Nacke via llvm-branch-commits
@@ -230,10 +230,11 @@ class MCObjectFileInfo { MCSection *GLJMPSection = nullptr; // GOFF specific sections. - MCSection *PPA1Section = nullptr; - MCSection *PPA2Section = nullptr; - MCSection *PPA2ListSection = nullptr; - MCSection *ADASection = nullptr; + MCSection

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-07 Thread Kai Nacke via llvm-branch-commits
@@ -239,6 +298,63 @@ class GOFFWriter { GOFFWriter::GOFFWriter(raw_pwrite_stream &OS, MCAssembler &Asm) : OS(OS), Asm(Asm) {} +void GOFFWriter::defineSectionSymbols(const MCSectionGOFF &Section) { + if (Section.isSD()) { +GOFFSymbol SD(Section.getName(), Section.getId

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-07 Thread Kai Nacke via llvm-branch-commits
@@ -16,34 +16,94 @@ #define LLVM_MC_MCSECTIONGOFF_H #include "llvm/BinaryFormat/GOFF.h" +#include "llvm/MC/MCGOFFAttributes.h" #include "llvm/MC/MCSection.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" namespace llvm { class MCExpr;

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-07 Thread Kai Nacke via llvm-branch-commits
@@ -239,6 +298,63 @@ class GOFFWriter { GOFFWriter::GOFFWriter(raw_pwrite_stream &OS, MCAssembler &Asm) : OS(OS), Asm(Asm) {} +void GOFFWriter::defineSectionSymbols(const MCSectionGOFF &Section) { + if (Section.isSD()) { +GOFFSymbol SD(Section.getName(), Section.getId

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-07 Thread Kai Nacke via llvm-branch-commits
@@ -26,6 +27,29 @@ GOFFObjectWriter &MCGOFFStreamer::getWriter() { return static_cast(getAssembler().getWriter()); } +void MCGOFFStreamer::initSections(bool /*NoExecStack*/, + const MCSubtargetInfo &STI) { + MCContext &Ctx = getContext(); +

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-07 Thread Kai Nacke via llvm-branch-commits
@@ -239,6 +298,63 @@ class GOFFWriter { GOFFWriter::GOFFWriter(raw_pwrite_stream &OS, MCAssembler &Asm) : OS(OS), Asm(Asm) {} +void GOFFWriter::defineSectionSymbols(const MCSectionGOFF &Section) { + if (Section.isSD()) { +GOFFSymbol SD(Section.getName(), Section.getId

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-05 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,73 @@ +; RUN: llc <%s --mtriple s390x-ibm-zos --filetype=obj -o - | \ +; RUN: od -Ax -tx1 -v | FileCheck --ignore-case %s +; REQUIRES: systemz-registered-target redstar wrote: Removed. https://github.com/llvm/llvm-project/pull/133799 ___

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-05 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,148 @@ +//===- MCGOFFSymbolMapper.h - Maps MC section/symbol to GOFF symbols --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-05 Thread Kai Nacke via llvm-branch-commits
@@ -169,6 +169,91 @@ enum SubsectionKind : uint8_t { SK_PPA1 = 2, SK_PPA2 = 4, }; + +// The standard System/390 convention is to name the high-order (leftmost) bit +// in a byte as bit zero. The Flags type helps to set bits in byte according +// to this numeration order. +c

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-05 Thread Kai Nacke via llvm-branch-commits
redstar wrote: I implemented the suggestion from @uweigand. The GOFF attributes are set directly at the `MCSectionGOFF`, and the `GOFFSymbolMapper` is gone. I still need to update a couple of tests, since now the section names have changed. https://github.com/llvm/llvm-project/pull/133799

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-04 Thread Kai Nacke via llvm-branch-commits
redstar wrote: I refactored the code in the suggested way. Some notes: - I section to emit the code/data is either the ED or the PR. The other sections are linked via the `Parent` pointer. `MCGOFFStreamer::changeSection()` makes sure that all sections are registered in the correct order. - I u

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-04 Thread Kai Nacke via llvm-branch-commits
redstar wrote: > Thinking a bit more about this, it looks to me that we should treat SD/ED/PR > on the one hand differently from LD (and ER) on the other. The former > identify a range of address space and may hold contents of those ranges in > the form of text records; the latter identify a s

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-03 Thread Kai Nacke via llvm-branch-commits
@@ -2767,15 +2774,55 @@ MCSection *TargetLoweringObjectFileGOFF::getExplicitSectionGlobal( MCSection *TargetLoweringObjectFileGOFF::getSectionForLSDA( const Function &F, const MCSymbol &FnSym, const TargetMachine &TM) const { std::string Name = ".gcc_exception_table." +

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-03 Thread Kai Nacke via llvm-branch-commits
@@ -19,7 +19,7 @@ ; CHECK:.quad L#PPA2-CELQSTRT * A(PPA2-CELQSTRT) ; CHECK: L#PPA1_void_test_0: ; CHECK:.long L#PPA2-L#PPA1_void_test_0 * Offset to PPA2 -; CHECK:.section"B_IDRL" +; CHECK:.section".idrl" redstar

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-03 Thread Kai Nacke via llvm-branch-commits
@@ -223,21 +196,222 @@ void GOFFOstream::finalizeRecord() { } namespace { +// A GOFFSymbol holds all the data required for writing an ESD record. +class GOFFSymbol { +public: + std::string Name; + uint32_t EsdId; + uint32_t ParentEsdId; + uint64_t Offset = 0; // Offset of

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-03 Thread Kai Nacke via llvm-branch-commits
@@ -239,6 +309,102 @@ class GOFFWriter { GOFFWriter::GOFFWriter(raw_pwrite_stream &OS, MCAssembler &Asm) : OS(OS), Asm(Asm) {} +GOFFSymbol GOFFWriter::createGOFFSymbol(StringRef Name, const GOFF::SDAttr &Attr) { + return GOFFSymbol(Name, ++EsdIdCounter, Attr); +} + +GOFF

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-03 Thread Kai Nacke via llvm-branch-commits
redstar wrote: > Does this make sense or am I missing something here? I think that splitting the SD/ED/LD into 3 "section"s implies that a MCSectionGOFF has a fundamentally different semantic than the other MCSectionXXX. This is something I would like to avoid. On the other hand, the SD/ED pa

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-03 Thread Kai Nacke via llvm-branch-commits
@@ -239,6 +309,102 @@ class GOFFWriter { GOFFWriter::GOFFWriter(raw_pwrite_stream &OS, MCAssembler &Asm) : OS(OS), Asm(Asm) {} +GOFFSymbol GOFFWriter::createGOFFSymbol(StringRef Name, const GOFF::SDAttr &Attr) { + return GOFFSymbol(Name, ++EsdIdCounter, Attr); +} + +GOFF

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-03 Thread Kai Nacke via llvm-branch-commits
https://github.com/redstar edited https://github.com/llvm/llvm-project/pull/133799 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-03 Thread Kai Nacke via llvm-branch-commits
@@ -2767,15 +2774,55 @@ MCSection *TargetLoweringObjectFileGOFF::getExplicitSectionGlobal( MCSection *TargetLoweringObjectFileGOFF::getSectionForLSDA( const Function &F, const MCSymbol &FnSym, const TargetMachine &TM) const { std::string Name = ".gcc_exception_table." +

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-02 Thread Kai Nacke via llvm-branch-commits
https://github.com/redstar updated https://github.com/llvm/llvm-project/pull/133799 >From 77c230f82a61769714bee98b2e848820850d9cb5 Mon Sep 17 00:00:00 2001 From: Kai Nacke Date: Mon, 24 Mar 2025 16:26:19 -0400 Subject: [PATCH 1/6] [GOFF] Add writing of section symbols The GOFF format uses symb

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-02 Thread Kai Nacke via llvm-branch-commits
https://github.com/redstar updated https://github.com/llvm/llvm-project/pull/133799 >From 77c230f82a61769714bee98b2e848820850d9cb5 Mon Sep 17 00:00:00 2001 From: Kai Nacke Date: Mon, 24 Mar 2025 16:26:19 -0400 Subject: [PATCH 1/7] [GOFF] Add writing of section symbols The GOFF format uses symb

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-02 Thread Kai Nacke via llvm-branch-commits
@@ -169,6 +169,91 @@ enum SubsectionKind : uint8_t { SK_PPA1 = 2, SK_PPA2 = 4, }; + +// The standard System/390 convention is to name the high-order (leftmost) bit +// in a byte as bit zero. The Flags type helps to set bits in byte according +// to this numeration order. +c

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-02 Thread Kai Nacke via llvm-branch-commits
@@ -169,6 +169,91 @@ enum SubsectionKind : uint8_t { SK_PPA1 = 2, SK_PPA2 = 4, }; + +// The standard System/390 convention is to name the high-order (leftmost) bit +// in a byte as bit zero. The Flags type helps to set bits in byte according +// to this numeration order. +c

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-02 Thread Kai Nacke via llvm-branch-commits
https://github.com/redstar updated https://github.com/llvm/llvm-project/pull/133799 >From 77c230f82a61769714bee98b2e848820850d9cb5 Mon Sep 17 00:00:00 2001 From: Kai Nacke Date: Mon, 24 Mar 2025 16:26:19 -0400 Subject: [PATCH 1/5] [GOFF] Add writing of section symbols The GOFF format uses symb

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-02 Thread Kai Nacke via llvm-branch-commits
@@ -223,21 +196,222 @@ void GOFFOstream::finalizeRecord() { } namespace { +// A GOFFSymbol holds all the data required for writing an ESD record. +class GOFFSymbol { +public: + std::string Name; + uint32_t EsdId; + uint32_t ParentEsdId; + uint64_t Offset = 0; // Offset of

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-02 Thread Kai Nacke via llvm-branch-commits
https://github.com/redstar updated https://github.com/llvm/llvm-project/pull/133799 >From 77c230f82a61769714bee98b2e848820850d9cb5 Mon Sep 17 00:00:00 2001 From: Kai Nacke Date: Mon, 24 Mar 2025 16:26:19 -0400 Subject: [PATCH 1/4] [GOFF] Add writing of section symbols The GOFF format uses symb

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-02 Thread Kai Nacke via llvm-branch-commits
https://github.com/redstar updated https://github.com/llvm/llvm-project/pull/133799 >From 77c230f82a61769714bee98b2e848820850d9cb5 Mon Sep 17 00:00:00 2001 From: Kai Nacke Date: Mon, 24 Mar 2025 16:26:19 -0400 Subject: [PATCH 1/3] [GOFF] Add writing of section symbols The GOFF format uses symb

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-02 Thread Kai Nacke via llvm-branch-commits
https://github.com/redstar updated https://github.com/llvm/llvm-project/pull/133799 >From 77c230f82a61769714bee98b2e848820850d9cb5 Mon Sep 17 00:00:00 2001 From: Kai Nacke Date: Mon, 24 Mar 2025 16:26:19 -0400 Subject: [PATCH 1/2] [GOFF] Add writing of section symbols The GOFF format uses symb

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-02 Thread Kai Nacke via llvm-branch-commits
@@ -169,6 +169,91 @@ enum SubsectionKind : uint8_t { SK_PPA1 = 2, SK_PPA2 = 4, }; + +// The standard System/390 convention is to name the high-order (leftmost) bit +// in a byte as bit zero. The Flags type helps to set bits in byte according +// to this numeration order. +c

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-03-31 Thread Kai Nacke via llvm-branch-commits
https://github.com/redstar created https://github.com/llvm/llvm-project/pull/133799 The GOFF format uses symbol definitions to represent sections and symbols. Introducing a section can require up to 3 symbol definitions. However, most of these details are not needed by the AsmPrinter. To mappe

[llvm-branch-commits] [llvm] [PowerPC][GlobalMerge] Enable GlobalMerge by default on AIX (PR #101226)

2024-08-02 Thread Kai Nacke via llvm-branch-commits
@@ -500,7 +500,10 @@ void PPCPassConfig::addIRPasses() { } bool PPCPassConfig::addPreISel() { - if (EnableGlobalMerge) + if ((EnableGlobalMerge.getNumOccurrences() > 0) + ? EnableGlobalMerge + : (TM->getTargetTriple().isOSAIX() && + getOptLevel(

[llvm-branch-commits] [llvm] [PowerPC][GlobalMerge] Reduce TOC usage by merging internal and private global data (PR #101224)

2024-08-02 Thread Kai Nacke via llvm-branch-commits
https://github.com/redstar approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/101224 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [PowerPC][GlobalMerge] Reduce TOC usage by merging internal and private global data (PR #101224)

2024-07-30 Thread Kai Nacke via llvm-branch-commits
@@ -720,8 +731,14 @@ bool GlobalMergeImpl::run(Module &M) { Pass *llvm::createGlobalMergePass(const TargetMachine *TM, unsigned Offset, bool OnlyOptimizeForSize, - bool MergeExternalByDefault) { +

[llvm-branch-commits] [llvm] [PowerPC][GlobalMerge] Enable GlobalMerge by default on AIX (PR #101226)

2024-07-30 Thread Kai Nacke via llvm-branch-commits
@@ -500,7 +500,10 @@ void PPCPassConfig::addIRPasses() { } bool PPCPassConfig::addPreISel() { - if (EnableGlobalMerge) + if ((EnableGlobalMerge.getNumOccurrences() > 0) + ? EnableGlobalMerge + : (TM->getTargetTriple().isOSAIX() && + getOptLevel(

[llvm-branch-commits] [llvm] ff99f3a - [SystemZ/z/OS] Add alias for XPLINK return

2022-02-12 Thread Kai Nacke via llvm-branch-commits
Author: Kai Nacke Date: 2022-02-11T11:52:25-05:00 New Revision: ff99f3a5c0b36d49f4be1b990cc7509e897d48c7 URL: https://github.com/llvm/llvm-project/commit/ff99f3a5c0b36d49f4be1b990cc7509e897d48c7 DIFF: https://github.com/llvm/llvm-project/commit/ff99f3a5c0b36d49f4be1b990cc7509e897d48c7.diff LOG

[llvm-branch-commits] [llvm] 9399681 - [Doc] Fix example in codegen doc.

2021-01-18 Thread Kai Nacke via llvm-branch-commits
Author: Kai Nacke Date: 2021-01-18T08:24:10-05:00 New Revision: 9399681a57cef143dc4d087706947a03af819ef5 URL: https://github.com/llvm/llvm-project/commit/9399681a57cef143dc4d087706947a03af819ef5 DIFF: https://github.com/llvm/llvm-project/commit/9399681a57cef143dc4d087706947a03af819ef5.diff LOG

[llvm-branch-commits] [llvm] e2e86f4 - [Doc][SystemZ] Add Linux/SystemZ to Getting Started guide.

2020-12-16 Thread Kai Nacke via llvm-branch-commits
Author: Kai Nacke Date: 2020-12-16T10:46:05-05:00 New Revision: e2e86f4e77ec2fd79743f4d0e94689e9668600ad URL: https://github.com/llvm/llvm-project/commit/e2e86f4e77ec2fd79743f4d0e94689e9668600ad DIFF: https://github.com/llvm/llvm-project/commit/e2e86f4e77ec2fd79743f4d0e94689e9668600ad.diff LOG

[llvm-branch-commits] [llvm] f03c21d - [SystemZ] Adding extra extended mnemonics for SystemZ target

2020-12-02 Thread Kai Nacke via llvm-branch-commits
Author: Anirudh Prasad Date: 2020-12-02T08:25:31-05:00 New Revision: f03c21df7b845e2ffcef42f242764f36603fdbb4 URL: https://github.com/llvm/llvm-project/commit/f03c21df7b845e2ffcef42f242764f36603fdbb4 DIFF: https://github.com/llvm/llvm-project/commit/f03c21df7b845e2ffcef42f242764f36603fdbb4.diff

[llvm-branch-commits] [llvm-branch] r372167 - Add external project LDC to release notes.

2019-09-17 Thread Kai Nacke via llvm-branch-commits
Author: redstar Date: Tue Sep 17 12:16:16 2019 New Revision: 372167 URL: http://llvm.org/viewvc/llvm-project?rev=372167&view=rev Log: Add external project LDC to release notes. LDC, the LLVM-based D compiler, is already ready for LLVM 9.0.0. Modified: llvm/branches/release_90/docs/ReleaseNot

[llvm-branch-commits] [llvm-branch] r353466 - Add external project LDC to release notes.

2019-02-07 Thread Kai Nacke via llvm-branch-commits
Author: redstar Date: Thu Feb 7 13:09:53 2019 New Revision: 353466 URL: http://llvm.org/viewvc/llvm-project?rev=353466&view=rev Log: Add external project LDC to release notes. LDC, the LLVM-based D compiler, is already ready for LLVM 8.0.0. Modified: llvm/branches/release_80/docs/ReleaseNot

[llvm-branch-commits] [llvm-branch] r323186 - Add external project LDC to release notes.

2018-01-23 Thread Kai Nacke via llvm-branch-commits
Author: redstar Date: Tue Jan 23 03:03:55 2018 New Revision: 323186 URL: http://llvm.org/viewvc/llvm-project?rev=323186&view=rev Log: Add external project LDC to release notes. LDC, the LLVM-based D compiler, is already ready for LLVM 6.0.0. Modified: llvm/branches/release_60/docs/ReleaseNot

  1   2   >