kervinck / gigatron-rom

System, apps and tooling for the Gigatron TTL microcomputer
BSD 2-Clause "Simplified" License
229 stars 79 forks source link

lcc: align stack items to word boundaries #65

Open kervinck opened 5 years ago

kervinck commented 5 years ago

The C data stack typically lives in $400..$5ff and can therefore cross a page boundary. If an int-sized variable or function argument happens to be split over these pages, accessing it with DEEK/DOKE will give the wrong result because these instructions wrap around the page. This can be prevented by aligning int-sized variables to 2-byte boundaries.

kervinck commented 5 years ago

Low priority

lb3361 commented 2 years ago

Suggesting to close this issue since glcc handles stack alignment in a finer way.