Skip to content

[PowerPC] uses @llvm.stackrestore() to set the stack pointer #123389

@tankf33der

Description

@tankf33der

hi,

I have a question or new bug.

I have LLVM-IR code which uses @llvm.stackrestore() to set the stack pointer.
On PowerPC the LLVM backend generates instructions like "mr 1, 3" (which is correct), but then also instructions like "std 4, 0(1)" which (incorrectly in my view) write into the stack space above the newly set stack pointer, causing a crash.

Is this a known problem? If so, is there a solution?

p.s. PicoLisp crashes on LLVM14-LLVM19.1.7. on ppc64le.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend:PowerPCquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions