Skip to content
Snippets Groups Projects
Commit 1a656bb9 authored by Florian Schmaus's avatar Florian Schmaus
Browse files

[Continuation] Fix GCC 14 builds by adding __attribute__(noipa)

Turns out, 410cd9d1 ("[Continuation] Fix setJmp() by adding 'rax'
to clobber list") was not enough for GCC 14 (probably newer
ones). This time, the compiler (GCC 14.2.0) also failed to re-load
%rax after the setJmp() and also seemed to perform optimizations based
on the assumption that setJmp() would *always* return 0.

It appears

asm("nop" ::: "rax", "rbx", "r12", "r13", "r14", "r15", "memory");

in Continuation::setJmp() is now, after we added the 'noipa'
attribute, also no longer necessary. But we keep it for now.
parent 36dafd0d
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ class Continuation {
};
inline __attribute__((always_inline, returns_twice)) uintptr_t setJmp() {
auto set_rip = [](Continuation *c) __attribute__((noinline, hot, optimize(3))) {
auto set_rip = [](Continuation *c) __attribute__((noipa, noinline, hot, optimize(3))) {
c->ip = __builtin_return_address(0);
return 0;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment