Page 6 of 6

Re: EJC (C-Compiler) experiments

Posted: Tue Aug 11, 2020 11:59 pm
by tofro
ql_freak wrote:IF ALL ELSE FAILS, READ THE MANUAL!

Shame on YOU! No one answered me, that C68 is capable of creating reentrant code:

You might want to read back a few pages where I told you it can.

The problem is simply that the compiler tends to imtermittently crash when using this option. I couldn't make it run reliably in a larger project.

Re: EJC (C-Compiler) experiments

Posted: Wed Aug 12, 2020 12:37 am
by ql_freak
tofro wrote:You might want to read back a few pages where I told you it can.
Mea culpa I've missed your post:
tofro wrote:Q68 in fact has the option to produce position-independent code. It just doesn't work but rather crashes the compiler, at least in my experience. (If interested, have a look at the codemodel=small, datamodel=small and regdata=ax command line options)
BTW: The PDF manual for C68 on Dilwyns page is wrong, Tofro (above) is correct, the manual says

Code: Select all

codemode=small
        ^ (the 'l' is missing)
tofro wrote:The problem is simply that the compiler tends to imtermittently crash when using this option. I couldn't make it run reliably in a larger project.
Is really the compiler (c68) crashing or does the program just not run (or crashes), or another phase (e.g. as68 or ld) crashes? As the C68 manual states: YOU CANNOT USE codemodel=small and/ore datamodel=small with startup code and libraries from the C68 Development system. Especially for datamodel=small the startup code must initialize register a5 (all static data is addressed via a5). But with the library of EJC this should be possible (the startup code is no separate file in EJC but in the _link file of GST-linker the startup code is extracted from the library with "extract startup ejc_lib").

Re: EJC (C-Compiler) experiments

Posted: Wed Aug 12, 2020 7:39 am
by tofro
It's the compiler crashing with an "internal error". I didn't use any libraries or startup code from C68 when I tried.

Re: EJC (C-Compiler) experiments

Posted: Fri Aug 14, 2020 1:38 am
by ql_freak
Sad to hear, but at least we have the source!