-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement new interrupt calling conventions in the llvm backend #21807
base: master
Are you sure you want to change the base?
Conversation
#16635 can maybe also be closed? Though not as a result of this PR specifically. |
.value = .empty, | ||
} }, &o.builder); | ||
}, | ||
.csky_interrupt => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you could merge this with the prong above? Doesn't really matter though.
std.builtin.CallingConvention.X86RegparmOptions => .{ pl.incoming_stack_alignment, pl.register_params }, | ||
else => unreachable, | ||
else => @compileError("TODO: toLlvmCallConv" ++ @tagName(pl)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: don't try and be too fancy, comptime unreachable
is fine :^)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah fair enough, I just needed to see which callconv was the one I hadn't handled yet and I'm lazy. would you like me to use comptime unreachable
here instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to change it, but it's not a problem, just thought I'd mention
inline .avr_interrupt, .avr_signal => |_, tag| { | ||
try attributes.addFnAttr(.{ .string = .{ | ||
.kind = try o.builder.string(switch (tag) { | ||
.avr_interrupt => "interrupt", | ||
.avr_signal => "signal", | ||
else => unreachable, | ||
}), | ||
.value = .empty, | ||
} }, &o.builder); | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use inline
unnecessarily:
inline .avr_interrupt, .avr_signal => |_, tag| { | |
try attributes.addFnAttr(.{ .string = .{ | |
.kind = try o.builder.string(switch (tag) { | |
.avr_interrupt => "interrupt", | |
.avr_signal => "signal", | |
else => unreachable, | |
}), | |
.value = .empty, | |
} }, &o.builder); | |
}, | |
.avr_interrupt, .avr_signal => { | |
try attributes.addFnAttr(.{ .string = .{ | |
.kind = try o.builder.string(switch (fn_info.cc) { | |
.avr_interrupt => "interrupt", | |
.avr_signal => "signal", | |
else => unreachable, | |
}), | |
.value = .empty, | |
} }, &o.builder); | |
}, |
closes #20671
closes #21805
anyone know of other issues this closes?
adds support for:
riscv64_interrupt
riscv32_interrupt
mips_interrupt
mips64_interrupt
arm_interrupt
csky_interrupt