Skip to content

Conversation

@resistor
Copy link
Collaborator

@resistor resistor commented Dec 9, 2025

No in-tree target exercises this, but it's needed for CHERI, and I believe its correctness is verifiable by inspection.

Co-authored-by: Alex Richardson [email protected]

…ables.

No in-tree target exercises this, but it's needed for CHERI, and I believe its correctness is verifiable by inspection.

Co-authored-by: Alex Richardson <[email protected]>
@resistor resistor marked this pull request as ready for review December 9, 2025 03:39
@resistor
Copy link
Collaborator Author

resistor commented Dec 9, 2025

@arichardson @jrtc27 for awareness

Copy link
Member

@arichardson arichardson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Not sure if it's easy to add a test for this.

@@ -3473,7 +3473,7 @@ void AsmPrinter::emitXXStructorList(const DataLayout &DL, const Constant *List,
if (!TM.Options.UseInitArray)
std::reverse(Structors.begin(), Structors.end());

const Align Align = DL.getPointerPrefAlignment();
const Align Align = DL.getPointerPrefAlignment(DL.getProgramAddressSpace());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the only target with non-zero program address space is AVR, but not sure if it's possible to create a minimal test case there.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I honestly don't know enough about AVR to tell.

@resistor resistor merged commit ba3208e into llvm:main Dec 9, 2025
14 checks passed
honeygoyal pushed a commit to honeygoyal/llvm-project that referenced this pull request Dec 9, 2025
…ables. (llvm#171247)

No in-tree target exercises this, but it's needed for CHERI, and I
believe its correctness is verifiable by inspection.

Co-authored-by: Alex Richardson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants