Support far/banked memory model for S12/S12X (PPAGE/GPAGE, __far, @address) #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
CodeWarrior handles S12/S12X parts larger than 64 KB with its memory model support. This repo's GCC backend cannot address data or code beyond the 64 KB flat space: it has no
__farkeyword, no@addressplacement syntax, and no automatic PPAGE (S12) / GPAGE (S12X) banking with linker-generated paged call stubs. This blocks use of large S12X parts, which is the primary reason anyone would reach for a CodeWarrior replacement.Motivation
__far,@address,#pragma CODE_SEG), and-m9s12xsupport this repo already has.Current state
-m68hc11/-m68hc12/-m9s12xISA flags and multilibs exist (patches/gcc-4.3.6-s12x.patch).-mlong-callsgeneratescall/rtc(far code) and is verified working;patches/gcc-4.3.6-ldivmod-s12x.asmhonors__USE_RTC__.-mshortand-mlong;__faris rejected by the compiler (error: '__far' declared as function returning a function).-mrelaxonly affects soft-register direct addressing.Proposed scope
__farqualifier and a 32-bit far pointer type.@addressplacement for variables/functions.call/rtc(and the GPAGE prefix addressing on S12X) for far code, with far data access through the appropriate window.ldscripts/emulation for banked sections and paged windows.__framehandling in paged memory.Acceptance criteria
-m9s12xwithout manual page management.call/rtcis exercised in thegdb-simtest corpus (tests/), byte-diff verified.__farvariables and far function pointers compile to the expected paged instructions.References
pkgs/gcc-4.3.6.nix(build, multilib wiring)patches/gcc-4.3.6-s12x.patchpatches/gcc-4.3.6-ldivmod-s12x.asmtests/run-tests.sh,tests/compiler-diff.sh(verification harness)