theandrew168 / derzforth

Bare-metal Forth implementation for RISC-V
MIT License
42 stars 5 forks source link

General refactor #1

Closed theandrew168 closed 3 years ago

theandrew168 commented 3 years ago

Once Bronzebeard supports compressed instruction optimizations, make a pass through the DerzForth assembly code to better prepare it for compression. Optimize the register selection as well based on the C extension's "popular" registers. Consider flipping the stack direction but only slightly. Also simplify how procedures are handled: no need to hardcode each arg / ret register if they never nest (or only nest a couple times).

Verify that the existing examples still work.