Skip to content

Amiga: add experimental stack swap support.#88

Draft
AliceLR wants to merge 1 commit intolibxmp:masterfrom
AliceLR:add-amiga-stackswap
Draft

Amiga: add experimental stack swap support.#88
AliceLR wants to merge 1 commit intolibxmp:masterfrom
AliceLR:add-amiga-stackswap

Conversation

@AliceLR
Copy link
Copy Markdown
Contributor

@AliceLR AliceLR commented Mar 20, 2026

Closes #87.

This is an updated version of the patch, but still very much needs testing. It works fine for me with both m68k toolchains I have set up + libnix for Workbench 2.

@AliceLR AliceLR added this to the 4.3.0 milestone Mar 20, 2026
@AliceLR AliceLR marked this pull request as draft March 20, 2026 01:42
@AliceLR AliceLR force-pushed the add-amiga-stackswap branch from 4302291 to bf5e2b0 Compare March 20, 2026 21:17
@AliceLR
Copy link
Copy Markdown
Contributor Author

AliceLR commented Mar 20, 2026

Updated to borrow the relevant parts from codesets.library, as it has a hand-written inline assembly routine which should be far safer than attempting to use StackSwap in C.

* Workbench 2.04 onward: use StackSwap (inline ASM borrowed from
  codesets.library, LGPL 2.1).
* AROS: use NewStackSwap.
* MorphOS: use NewPPCStackSwap.
* AmigaOS 3.2, 4.x: use a stack cookie.
@AliceLR AliceLR force-pushed the add-amiga-stackswap branch from bf5e2b0 to 7d6b8ad Compare March 25, 2026 10:01
@AliceLR
Copy link
Copy Markdown
Contributor Author

AliceLR commented Mar 26, 2026

MorphOS tested, works.

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.

Amiga: automatically set stack size?

1 participant