[Bug middle-end/119279] Specifying frame pointer dependency in inline asm

2025-03-14 Thread peterz at infradead dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119279 --- Comment #10 from peterz at infradead dot org --- On Fri, Mar 14, 2025 at 09:41:07AM +, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119279 > > --- Comment #9 from Jakub Jelinek --- > (In reply to peterz

[Bug middle-end/119279] Specifying frame pointer dependency in inline asm

2025-03-14 Thread peterz at infradead dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119279 --- Comment #8 from peterz at infradead dot org --- On Fri, Mar 14, 2025 at 08:44:19AM +, torva...@linux-foundation.org wrote: > Now, I agree that the kernel could likely solve issues by just "don't check so > much, then". But our build-time

[Bug middle-end/119279] Specifying frame pointer dependency in inline asm

2025-03-14 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119279 --- Comment #9 from Jakub Jelinek --- (In reply to peterz from comment #8) > There is the additional constraint that as long as the frame pointer > unwinder does not have to guess, it is assumed to be 100% correct. > > By having calls before fr

[Bug middle-end/119279] Specifying frame pointer dependency in inline asm

2025-03-14 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119279 --- Comment #7 from Jakub Jelinek --- In any case, I agree with Richi that __builtin_frame_address_(0) is the right thing, even when the inline asm doesn't use itself %rbp, the dependency on %rbp is what is needed in the compiler so that post-pr

[Bug middle-end/119279] Specifying frame pointer dependency in inline asm

2025-03-14 Thread torvalds--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119279 --- Comment #6 from Linus Torvalds --- (In reply to Jakub Jelinek from comment #5) > Call instructions are normally valid anywhere in the function, including > prologue and epilogue, even with frame pointers. Sure, the call instruction actually

[Bug middle-end/119279] Specifying frame pointer dependency in inline asm

2025-03-14 Thread torvalds--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119279 --- Comment #4 from Linus Torvalds --- (In reply to Richard Biener from comment #3) > I think > > asm ("" : : "g" (__builtin_frame_address_(0))) > > and using that input as frame pointer looks spot-on semantically, is that > what you are actua

[Bug middle-end/119279] Specifying frame pointer dependency in inline asm

2025-03-14 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119279 --- Comment #5 from Jakub Jelinek --- Call instructions are normally valid anywhere in the function, including prologue and epilogue, even with frame pointers. E.g. for void bar (char *); void foo (void) { char a[1024]; bar (a); bar (a); }

[Bug middle-end/119279] Specifying frame pointer dependency in inline asm

2025-03-14 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119279 --- Comment #3 from Richard Biener --- I think asm ("" : : "g" (__builtin_frame_address_(0))) and using that input as frame pointer looks spot-on semantically, is that what you are actually using or are you then using %rbp anyway in the assemb

[Bug middle-end/119279] Specifying frame pointer dependency in inline asm

2025-03-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119279 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2025-03-13 Status|UNCONFIRM

[Bug middle-end/119279] Specifying frame pointer dependency in inline asm

2025-03-13 Thread torvalds--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119279 --- Comment #2 from Linus Torvalds --- (In reply to Andrew Pinski from comment #1) > > Why is the call needs to be done in the inline-asm? Typically it's the fallback alternative for when the primary inline asm doesn't work Ie the "real" asm