Changeset d44e001 in buchla-68k
- Timestamp:
- 07/29/2017 11:05:41 PM (7 years ago)
- Branches:
- master
- Children:
- 8b685e0
- Parents:
- d2b9839
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
readme.txt
rd2b9839 rd44e001 209 209 repository. Just in case you are interested in them, but would prefer 210 210 not to go through the emulator exercise. 211 212 213 Pitfalls 214 -------- 215 216 There are a few differences between the Alcyon compiler and a 217 modern-day GCC cross-compiler for the Motorola 68k. 218 219 * Alcyon uses 16-bit integers, whereas GCC defaults to 32-bit 220 integers. That's why we pass the -mshort option to GCC. 221 222 * The Alcyon compiler's ABI assumes that registers A2 and D2 are 223 saved by the caller of a function, if needed. GCC, however, 224 assumes that it's the called function that is responsible for 225 preserving A2 and D2. 226 227 Right now, we work around this issue by passing the -ffixed-d2 and 228 -ffixed-a2 options to GCC. This prevents GCC from using these two 229 registers at all when generating code. 230 231 Ultimately, we should fix the hand-written assembly language 232 functions to preserve A2 and D2, so that GCC code generation can 233 use all registers. 234 235 * The hand-written assembly language code expects C function names 236 to be prefixed with an underscore. That's why we pass the 237 -fleading-underscore option to GCC. However, this breaks linking 238 with libgcc, which doesn't use leading underscores. 239 240 Currently, we work around this issue by stripping the leading 241 underscore from references to libgcc functions using objcopy. See 242 misc/rewrite.txt for the function name mapping. 243 244 Ultimately, we should fix any references to C functions in the 245 hand-written assembly language code.
Note:
See TracChangeset
for help on using the changeset viewer.