Skip to content

Conversation

alexrp
Copy link
Member

@alexrp alexrp commented Oct 3, 2025

No description provided.

alexrp added 4 commits October 3, 2025 03:29
…er option

This is a little different from how C/C++ compilers do this, but I think it's
justified because it's what users actually *mean* when the use frame pointer
options.

This is another one of those LLVM "CPU" features that have nothing to do with
CPU at all and should really be a TargetMachine option or something. One day
we'll figure out a better way of dealing with these...
The old one was correct in terms of layout but very user-hostile.
Copy link
Contributor

@rootbeer rootbeer 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 that I know anything about the s390), but I just had to comment on the dwarfRegisterBytes floating point mapping ... :)

pub fn dwarfRegisterBytes(ctx: *S390x, register_num: u16) DwarfRegisterError![]u8 {
switch (register_num) {
0...15 => return @ptrCast(&ctx.r[register_num]),
// Why???
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is really underselling the mess below! Its floating point registers, but also they're not stored in DWARF order? Its some haphazard index remapping? 28 => 9?!

Copy link
Member Author

Choose a reason for hiding this comment

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

Well it's the DWARF order that's out of whack. It's easier to handle that here than in both current and fromPosixSignalContext.

@alexrp alexrp merged commit 1f083e9 into ziglang:master Oct 3, 2025
9 checks passed
@alexrp alexrp deleted the s390x-unwind branch October 3, 2025 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants